Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24352
b: refs/heads/master
c: 5f53f4e
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Linus Torvalds committed Mar 27, 2006
1 parent 08fa7ec commit 7b19053
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 982c609448b9d724e1c3a0d5aeee388c064479f0
refs/heads/master: 5f53f4e2107fcfdd33da1cc34a86c9aef5e76af6
12 changes: 9 additions & 3 deletions trunk/sound/isa/ad1816a/ad1816a.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard
return 0;
}

static unsigned int __devinitdata ad1816a_devices;

static int __devinit snd_ad1816a_pnp_detect(struct pnp_card_link *card,
const struct pnp_card_device_id *id)
{
Expand All @@ -275,6 +277,7 @@ static int __devinit snd_ad1816a_pnp_detect(struct pnp_card_link *card,
if (res < 0)
return res;
dev++;
ad1816a_devices++;
return 0;
}
return -ENODEV;
Expand All @@ -297,10 +300,13 @@ static struct pnp_card_driver ad1816a_pnpc_driver = {

static int __init alsa_card_ad1816a_init(void)
{
int cards;
int err;

err = pnp_register_card_driver(&ad1816a_pnpc_driver);
if (err)
return err;

cards = pnp_register_card_driver(&ad1816a_pnpc_driver);
if (cards <= 0) {
if (!ad1816a_devices) {
pnp_unregister_card_driver(&ad1816a_pnpc_driver);
#ifdef MODULE
printk(KERN_ERR "no AD1816A based soundcards found.\n");
Expand Down

0 comments on commit 7b19053

Please sign in to comment.