diff options
Diffstat (limited to 'drivers/pnp')
-rw-r--r-- | drivers/pnp/manager.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/pnp/manager.c b/drivers/pnp/manager.c index c9af87a8fb16..2251dd7da062 100644 --- a/drivers/pnp/manager.c +++ b/drivers/pnp/manager.c | |||
@@ -281,8 +281,9 @@ void pnp_init_resources(struct pnp_dev *dev) | |||
281 | * pnp_clean_resources - clears resources that were not manually set | 281 | * pnp_clean_resources - clears resources that were not manually set |
282 | * @res: the resources to clean | 282 | * @res: the resources to clean |
283 | */ | 283 | */ |
284 | static void pnp_clean_resource_table(struct pnp_resource_table *res) | 284 | static void pnp_clean_resource_table(struct pnp_dev *dev) |
285 | { | 285 | { |
286 | struct pnp_resource_table *res = &dev->res; | ||
286 | int idx; | 287 | int idx; |
287 | 288 | ||
288 | for (idx = 0; idx < PNP_MAX_IRQ; idx++) { | 289 | for (idx = 0; idx < PNP_MAX_IRQ; idx++) { |
@@ -339,7 +340,7 @@ static int pnp_assign_resources(struct pnp_dev *dev, int depnum) | |||
339 | 340 | ||
340 | dbg_pnp_show_resources(dev, "before pnp_assign_resources"); | 341 | dbg_pnp_show_resources(dev, "before pnp_assign_resources"); |
341 | mutex_lock(&pnp_res_mutex); | 342 | mutex_lock(&pnp_res_mutex); |
342 | pnp_clean_resource_table(&dev->res); /* start with a fresh slate */ | 343 | pnp_clean_resource_table(dev); |
343 | if (dev->independent) { | 344 | if (dev->independent) { |
344 | dev_dbg(&dev->dev, "assigning independent options\n"); | 345 | dev_dbg(&dev->dev, "assigning independent options\n"); |
345 | port = dev->independent->port; | 346 | port = dev->independent->port; |
@@ -415,7 +416,7 @@ static int pnp_assign_resources(struct pnp_dev *dev, int depnum) | |||
415 | return 1; | 416 | return 1; |
416 | 417 | ||
417 | fail: | 418 | fail: |
418 | pnp_clean_resource_table(&dev->res); | 419 | pnp_clean_resource_table(dev); |
419 | mutex_unlock(&pnp_res_mutex); | 420 | mutex_unlock(&pnp_res_mutex); |
420 | dbg_pnp_show_resources(dev, "after pnp_assign_resources (failed)"); | 421 | dbg_pnp_show_resources(dev, "after pnp_assign_resources (failed)"); |
421 | return 0; | 422 | return 0; |
@@ -595,7 +596,7 @@ int pnp_disable_dev(struct pnp_dev *dev) | |||
595 | 596 | ||
596 | /* release the resources so that other devices can use them */ | 597 | /* release the resources so that other devices can use them */ |
597 | mutex_lock(&pnp_res_mutex); | 598 | mutex_lock(&pnp_res_mutex); |
598 | pnp_clean_resource_table(&dev->res); | 599 | pnp_clean_resource_table(dev); |
599 | mutex_unlock(&pnp_res_mutex); | 600 | mutex_unlock(&pnp_res_mutex); |
600 | 601 | ||
601 | return 0; | 602 | return 0; |