summaryrefslogtreecommitdiff
path: root/drivers/pnp/card.c
diff options
context:
space:
mode:
authorTrond Myklebust <Trond.Myklebust@netapp.com>2006-02-02 21:51:52 -0500
committerTrond Myklebust <Trond.Myklebust@netapp.com>2006-02-02 21:51:52 -0500
commit33052057e3e2db7f37fc78aa3f25c98f7e989fae (patch)
treee80a3aa1371f513c833dc94a16674f78faeeeb1d /drivers/pnp/card.c
parent00b464debf0038b1628996065f0be564ccfbfd86 (diff)
parent1113a7e92e483074c6235da59460759e33b9b144 (diff)
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/pnp/card.c')
-rw-r--r--drivers/pnp/card.c9
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);