PNP: remove pnp_resource_table from internal get/set interfaces

When we call protocol->get() and protocol->set() methods, we currently
supply pointers to both the pnp_dev and the pnp_resource_table even
though the pnp_resource_table should always be the one associated with
the pnp_dev.

This removes the pnp_resource_table arguments to make it clear that
these methods only operate on the specified pnp_dev.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Acked-By: Rene Herman <rene.herman@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Bjorn Helgaas
2008-04-28 16:34:05 -06:00
committed by Len Brown
parent c1caf06ccf
commit 59284cb409
6 changed files with 16 additions and 21 deletions

View File

@@ -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;
}