diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-01-07 14:40:05 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-01-07 14:40:05 +0000 |
commit | 123656d4cc8c946f578ebd18c2050f5251720428 (patch) | |
tree | 3d5432eff034a3b9cfdc98b37e245abe5695342d /sound/isa/ad1816a/ad1816a.c | |
parent | a62c80e559809e6c7851ec04d30575e85ad6f6ed (diff) | |
parent | 0aec63e67c69545ca757a73a66f5dcf05fa484bf (diff) |
Merge with Linus' kernel.
Diffstat (limited to 'sound/isa/ad1816a/ad1816a.c')
-rw-r--r-- | sound/isa/ad1816a/ad1816a.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c index 0eb442ca23d..7051f7798ed 100644 --- a/sound/isa/ad1816a/ad1816a.c +++ b/sound/isa/ad1816a/ad1816a.c @@ -188,10 +188,10 @@ static int __devinit snd_card_ad1816a_probe(int dev, struct pnp_card_link *pcard const struct pnp_card_device_id *pid) { int error; - snd_card_t *card; + struct snd_card *card; struct snd_card_ad1816a *acard; - ad1816a_t *chip; - opl3_t *opl3; + struct snd_ad1816a *chip; + struct snd_opl3 *opl3; if ((card = snd_card_new(index[dev], id[dev], THIS_MODULE, sizeof(struct snd_card_ad1816a))) == NULL) @@ -282,10 +282,8 @@ static int __devinit snd_ad1816a_pnp_detect(struct pnp_card_link *card, static void __devexit snd_ad1816a_pnp_remove(struct pnp_card_link * pcard) { - snd_card_t *card = (snd_card_t *) pnp_get_card_drvdata(pcard); - - snd_card_disconnect(card); - snd_card_free_in_thread(card); + snd_card_free(pnp_get_card_drvdata(pcard)); + pnp_set_card_drvdata(pcard, NULL); } static struct pnp_card_driver ad1816a_pnpc_driver = { @@ -294,20 +292,22 @@ static struct pnp_card_driver ad1816a_pnpc_driver = { .id_table = snd_ad1816a_pnpids, .probe = snd_ad1816a_pnp_detect, .remove = __devexit_p(snd_ad1816a_pnp_remove), + /* FIXME: suspend/resume */ }; static int __init alsa_card_ad1816a_init(void) { - int cards = 0; + int cards; - cards += pnp_register_card_driver(&ad1816a_pnpc_driver); -#ifdef MODULE - if (!cards) { + cards = pnp_register_card_driver(&ad1816a_pnpc_driver); + if (cards <= 0) { pnp_unregister_card_driver(&ad1816a_pnpc_driver); +#ifdef MODULE printk(KERN_ERR "no AD1816A based soundcards found.\n"); - } #endif /* MODULE */ - return cards ? 0 : -ENODEV; + return -ENODEV; + } + return 0; } static void __exit alsa_card_ad1816a_exit(void) |