Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24354
b: refs/heads/master
c: db2735e
h: refs/heads/master
v: v3
  • Loading branch information
Bjorn Helgaas authored and Linus Torvalds committed Mar 27, 2006
1 parent b2c64c1 commit a6e9069
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: 51427ec0f222cb73b21f3849416a95d751bdd742
refs/heads/master: db2735eb9076c5176ec9dcbbaefd38e7d82f0e47
12 changes: 9 additions & 3 deletions trunk/sound/isa/azt2320.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,8 @@ static int __devinit snd_card_azt2320_probe(int dev,
return 0;
}

static unsigned int __devinitdata azt2320_devices;

static int __devinit snd_azt2320_pnp_detect(struct pnp_card_link *card,
const struct pnp_card_device_id *id)
{
Expand All @@ -323,6 +325,7 @@ static int __devinit snd_azt2320_pnp_detect(struct pnp_card_link *card,
if (res < 0)
return res;
dev++;
azt2320_devices++;
return 0;
}
return -ENODEV;
Expand Down Expand Up @@ -372,10 +375,13 @@ static struct pnp_card_driver azt2320_pnpc_driver = {

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

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

cards = pnp_register_card_driver(&azt2320_pnpc_driver);
if (cards <= 0) {
if (!azt2320_devices) {
pnp_unregister_card_driver(&azt2320_pnpc_driver);
#ifdef MODULE
snd_printk(KERN_ERR "no AZT2320 based soundcards found\n");
Expand Down

0 comments on commit a6e9069

Please sign in to comment.