summaryrefslogtreecommitdiffstats
path: root/drivers/pnp
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp')
-rw-r--r--drivers/pnp/interface.c2
-rw-r--r--drivers/pnp/isapnp/core.c11
-rw-r--r--drivers/pnp/manager.c2
-rw-r--r--drivers/pnp/pnpacpi/core.c8
-rw-r--r--drivers/pnp/pnpbios/core.c10
5 files changed, 14 insertions, 19 deletions
diff --git a/drivers/pnp/interface.c b/drivers/pnp/interface.c
index 982658477a5..e882896bdbd 100644
--- a/drivers/pnp/interface.c
+++ b/drivers/pnp/interface.c
@@ -364,7 +364,7 @@ pnp_set_current_resources(struct device *dmdev, struct device_attribute *attr,
if (!strnicmp(buf, "get", 3)) {
mutex_lock(&pnp_res_mutex);
if (pnp_can_read(dev))
- dev->protocol->get(dev, &dev->res);
+ dev->protocol->get(dev);
mutex_unlock(&pnp_res_mutex);
goto done;
}
diff --git a/drivers/pnp/isapnp/core.c b/drivers/pnp/isapnp/core.c
index 38ff64dce9c..1ae3d899615 100644
--- a/drivers/pnp/isapnp/core.c
+++ b/drivers/pnp/isapnp/core.c
@@ -976,21 +976,20 @@ static int isapnp_read_resources(struct pnp_dev *dev,
return 0;
}
-static int isapnp_get_resources(struct pnp_dev *dev,
- struct pnp_resource_table *res)
+static int isapnp_get_resources(struct pnp_dev *dev)
{
int ret;
- pnp_init_resource_table(res);
+ pnp_init_resource_table(&dev->res);
isapnp_cfg_begin(dev->card->number, dev->number);
- ret = isapnp_read_resources(dev, res);
+ ret = isapnp_read_resources(dev, &dev->res);
isapnp_cfg_end();
return ret;
}
-static int isapnp_set_resources(struct pnp_dev *dev,
- struct pnp_resource_table *res)
+static int isapnp_set_resources(struct pnp_dev *dev)
{
+ struct pnp_resource_table *res = &dev->res;
int tmp;
isapnp_cfg_begin(dev->card->number, dev->number);
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c
index c28caf272c1..6a1f0b0b24b 100644
--- a/drivers/pnp/manager.c
+++ b/drivers/pnp/manager.c
@@ -473,7 +473,7 @@ int pnp_start_dev(struct pnp_dev *dev)
return -EINVAL;
}
- if (dev->protocol->set(dev, &dev->res) < 0) {
+ if (dev->protocol->set(dev) < 0) {
dev_err(&dev->dev, "activation failed\n");
return -EIO;
}
diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c
index 27546873880..590fbcb0ee8 100644
--- a/drivers/pnp/pnpacpi/core.c
+++ b/drivers/pnp/pnpacpi/core.c
@@ -73,8 +73,7 @@ static int __init ispnpidacpi(char *id)
return 1;
}
-static int pnpacpi_get_resources(struct pnp_dev *dev,
- struct pnp_resource_table *res)
+static int pnpacpi_get_resources(struct pnp_dev *dev)
{
acpi_status status;
@@ -83,8 +82,7 @@ static int pnpacpi_get_resources(struct pnp_dev *dev,
return ACPI_FAILURE(status) ? -ENODEV : 0;
}
-static int pnpacpi_set_resources(struct pnp_dev *dev,
- struct pnp_resource_table *res)
+static int pnpacpi_set_resources(struct pnp_dev *dev)
{
acpi_handle handle = dev->data;
struct acpi_buffer buffer;
@@ -94,7 +92,7 @@ static int pnpacpi_set_resources(struct pnp_dev *dev,
ret = pnpacpi_build_resource_template(dev, &buffer);
if (ret)
return ret;
- ret = pnpacpi_encode_resources(res, &buffer);
+ ret = pnpacpi_encode_resources(&dev->res, &buffer);
if (ret) {
kfree(buffer.pointer);
return ret;
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 6af2be2c1d6..9852755b559 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -204,8 +204,7 @@ static int pnp_dock_thread(void *unused)
#endif /* CONFIG_HOTPLUG */
-static int pnpbios_get_resources(struct pnp_dev *dev,
- struct pnp_resource_table *res)
+static int pnpbios_get_resources(struct pnp_dev *dev)
{
u8 nodenum = dev->number;
struct pnp_bios_node *node;
@@ -220,14 +219,13 @@ static int pnpbios_get_resources(struct pnp_dev *dev,
kfree(node);
return -ENODEV;
}
- pnpbios_read_resources_from_node(res, node);
+ pnpbios_read_resources_from_node(&dev->res, node);
dev->active = pnp_is_active(dev);
kfree(node);
return 0;
}
-static int pnpbios_set_resources(struct pnp_dev *dev,
- struct pnp_resource_table *res)
+static int pnpbios_set_resources(struct pnp_dev *dev)
{
u8 nodenum = dev->number;
struct pnp_bios_node *node;
@@ -243,7 +241,7 @@ static int pnpbios_set_resources(struct pnp_dev *dev,
kfree(node);
return -ENODEV;
}
- if (pnpbios_write_resources_to_node(res, node) < 0) {
+ if (pnpbios_write_resources_to_node(&dev->res, node) < 0) {
kfree(node);
return -1;
}