diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-02-04 01:49:49 +0300 |
---|---|---|
committer | Adrian Bunk <bunk@r063144.stusta.swh.mhn.de> | 2006-02-04 01:49:49 +0300 |
commit | 01d206a7c1167639f6ca6dac22140fbdca017558 (patch) | |
tree | bc3ccf1a8140a7f787c4728cfa4c30e65ad56eb2 /drivers/pnp/card.c | |
parent | 9c4b562abc9005e4b413de02c85d3d29da707cba (diff) | |
parent | d6c8f6aaa1d7f68c1e6471ab0839d9047cdd159f (diff) | |
download | linux-01d206a7c1167639f6ca6dac22140fbdca017558.tar.xz |
Merge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'drivers/pnp/card.c')
-rw-r--r-- | drivers/pnp/card.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/pnp/card.c b/drivers/pnp/card.c index 0ecbe4edbec1..aaa568a3806e 100644 --- a/drivers/pnp/card.c +++ b/drivers/pnp/card.c @@ -363,7 +363,7 @@ static int card_resume(struct pnp_dev *dev) int pnp_register_card_driver(struct pnp_card_driver * drv) { - int count = 0; + int count; struct list_head *pos, *temp; drv->link.name = drv->name; @@ -374,10 +374,15 @@ int pnp_register_card_driver(struct pnp_card_driver * drv) drv->link.suspend = drv->suspend ? card_suspend : NULL; drv->link.resume = drv->resume ? card_resume : NULL; + count = pnp_register_driver(&drv->link); + if (count < 0) + return count; + spin_lock(&pnp_lock); list_add_tail(&drv->global_list, &pnp_card_drivers); spin_unlock(&pnp_lock); - pnp_register_driver(&drv->link); + + count = 0; list_for_each_safe(pos,temp,&pnp_cards){ struct pnp_card *card = list_entry(pos, struct pnp_card, global_list); |