aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pnp/card.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pnp/card.c')
-rw-r--r--drivers/pnp/card.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c
index b68eef251614..bb19c64073c6 100644
--- a/drivers/pnp/card.c
+++ b/drivers/pnp/card.c
@@ -47,7 +47,7 @@ static void card_remove(struct pnp_dev * dev)
47{ 47{
48 dev->card_link = NULL; 48 dev->card_link = NULL;
49} 49}
50 50
51static void card_remove_first(struct pnp_dev * dev) 51static void card_remove_first(struct pnp_dev * dev)
52{ 52{
53 struct pnp_card_driver * drv = to_pnp_card_driver(dev->driver); 53 struct pnp_card_driver * drv = to_pnp_card_driver(dev->driver);
@@ -361,7 +361,7 @@ static int card_resume(struct pnp_dev *dev)
361 361
362int pnp_register_card_driver(struct pnp_card_driver * drv) 362int pnp_register_card_driver(struct pnp_card_driver * drv)
363{ 363{
364 int count; 364 int error;
365 struct list_head *pos, *temp; 365 struct list_head *pos, *temp;
366 366
367 drv->link.name = drv->name; 367 drv->link.name = drv->name;
@@ -372,21 +372,19 @@ int pnp_register_card_driver(struct pnp_card_driver * drv)
372 drv->link.suspend = drv->suspend ? card_suspend : NULL; 372 drv->link.suspend = drv->suspend ? card_suspend : NULL;
373 drv->link.resume = drv->resume ? card_resume : NULL; 373 drv->link.resume = drv->resume ? card_resume : NULL;
374 374
375 count = pnp_register_driver(&drv->link); 375 error = pnp_register_driver(&drv->link);
376 if (count < 0) 376 if (error < 0)
377 return count; 377 return error;
378 378
379 spin_lock(&pnp_lock); 379 spin_lock(&pnp_lock);
380 list_add_tail(&drv->global_list, &pnp_card_drivers); 380 list_add_tail(&drv->global_list, &pnp_card_drivers);
381 spin_unlock(&pnp_lock); 381 spin_unlock(&pnp_lock);
382 382
383 count = 0;
384
385 list_for_each_safe(pos,temp,&pnp_cards){ 383 list_for_each_safe(pos,temp,&pnp_cards){
386 struct pnp_card *card = list_entry(pos, struct pnp_card, global_list); 384 struct pnp_card *card = list_entry(pos, struct pnp_card, global_list);
387 count += card_probe(card,drv); 385 card_probe(card,drv);
388 } 386 }
389 return count; 387 return 0;
390} 388}
391 389
392/** 390/**