aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/pnpbios
diff options
context:
space:
mode:
authorBjorn Helgaas <bjorn.helgaas@hp.com>2008-04-28 18:34:05 -0400
committerLen Brown <len.brown@intel.com>2008-04-29 03:22:21 -0400
commit59284cb4099411bc6f4915a5a4cb76414440c447 (patch)
tree2965bbad48655a6c1e0bf2ef5d51994ab28d627d /drivers/pnp/pnpbios
parentc1caf06ccfd3a4efd4b489f89bcdabd2362f31d0 (diff)
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>
Diffstat (limited to 'drivers/pnp/pnpbios')
-rw-r--r--drivers/pnp/pnpbios/core.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/pnp/pnpbios/core.c b/drivers/pnp/pnpbios/core.c
index 6af2be2c1d67..9852755b5590 100644
--- a/drivers/pnp/pnpbios/core.c
+++ b/drivers/pnp/pnpbios/core.c
@@ -204,8 +204,7 @@ static int pnp_dock_thread(void *unused)
204 204
205#endif /* CONFIG_HOTPLUG */ 205#endif /* CONFIG_HOTPLUG */
206 206
207static int pnpbios_get_resources(struct pnp_dev *dev, 207static int pnpbios_get_resources(struct pnp_dev *dev)
208 struct pnp_resource_table *res)
209{ 208{
210 u8 nodenum = dev->number; 209 u8 nodenum = dev->number;
211 struct pnp_bios_node *node; 210 struct pnp_bios_node *node;
@@ -220,14 +219,13 @@ static int pnpbios_get_resources(struct pnp_dev *dev,
220 kfree(node); 219 kfree(node);
221 return -ENODEV; 220 return -ENODEV;
222 } 221 }
223 pnpbios_read_resources_from_node(res, node); 222 pnpbios_read_resources_from_node(&dev->res, node);
224 dev->active = pnp_is_active(dev); 223 dev->active = pnp_is_active(dev);
225 kfree(node); 224 kfree(node);
226 return 0; 225 return 0;
227} 226}
228 227
229static int pnpbios_set_resources(struct pnp_dev *dev, 228static int pnpbios_set_resources(struct pnp_dev *dev)
230 struct pnp_resource_table *res)
231{ 229{
232 u8 nodenum = dev->number; 230 u8 nodenum = dev->number;
233 struct pnp_bios_node *node; 231 struct pnp_bios_node *node;
@@ -243,7 +241,7 @@ static int pnpbios_set_resources(struct pnp_dev *dev,
243 kfree(node); 241 kfree(node);
244 return -ENODEV; 242 return -ENODEV;
245 } 243 }
246 if (pnpbios_write_resources_to_node(res, node) < 0) { 244 if (pnpbios_write_resources_to_node(&dev->res, node) < 0) {
247 kfree(node); 245 kfree(node);
248 return -1; 246 return -1;
249 } 247 }