diff options
author | Takashi Iwai <tiwai@suse.de> | 2005-11-17 11:05:02 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-01-03 06:28:24 -0500 |
commit | 175cdcfb113e2a72f9d1a2ced4b80e0ff17fcaae (patch) | |
tree | d543a187b156f9c468fae56ac4e429e1d4870338 /sound/isa | |
parent | e2fa213591518bb1387f6042b8572c76ecdc6c6e (diff) |
[ALSA] ad1816a - Clean up PnP code
Modules: AD1816A driver
Clean up PnP code of ad1816a driver.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/isa')
-rw-r--r-- | sound/isa/ad1816a/ad1816a.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/sound/isa/ad1816a/ad1816a.c b/sound/isa/ad1816a/ad1816a.c index 543a4e284a40..7051f7798ed7 100644 --- a/sound/isa/ad1816a/ad1816a.c +++ b/sound/isa/ad1816a/ad1816a.c | |||
@@ -282,10 +282,8 @@ static int __devinit snd_ad1816a_pnp_detect(struct pnp_card_link *card, | |||
282 | 282 | ||
283 | static void __devexit snd_ad1816a_pnp_remove(struct pnp_card_link * pcard) | 283 | static void __devexit snd_ad1816a_pnp_remove(struct pnp_card_link * pcard) |
284 | { | 284 | { |
285 | struct snd_card *card = (struct snd_card *) pnp_get_card_drvdata(pcard); | 285 | snd_card_free(pnp_get_card_drvdata(pcard)); |
286 | 286 | pnp_set_card_drvdata(pcard, NULL); | |
287 | snd_card_disconnect(card); | ||
288 | snd_card_free_in_thread(card); | ||
289 | } | 287 | } |
290 | 288 | ||
291 | static struct pnp_card_driver ad1816a_pnpc_driver = { | 289 | static struct pnp_card_driver ad1816a_pnpc_driver = { |
@@ -294,20 +292,22 @@ static struct pnp_card_driver ad1816a_pnpc_driver = { | |||
294 | .id_table = snd_ad1816a_pnpids, | 292 | .id_table = snd_ad1816a_pnpids, |
295 | .probe = snd_ad1816a_pnp_detect, | 293 | .probe = snd_ad1816a_pnp_detect, |
296 | .remove = __devexit_p(snd_ad1816a_pnp_remove), | 294 | .remove = __devexit_p(snd_ad1816a_pnp_remove), |
295 | /* FIXME: suspend/resume */ | ||
297 | }; | 296 | }; |
298 | 297 | ||
299 | static int __init alsa_card_ad1816a_init(void) | 298 | static int __init alsa_card_ad1816a_init(void) |
300 | { | 299 | { |
301 | int cards = 0; | 300 | int cards; |
302 | 301 | ||
303 | cards += pnp_register_card_driver(&ad1816a_pnpc_driver); | 302 | cards = pnp_register_card_driver(&ad1816a_pnpc_driver); |
304 | #ifdef MODULE | 303 | if (cards <= 0) { |
305 | if (!cards) { | ||
306 | pnp_unregister_card_driver(&ad1816a_pnpc_driver); | 304 | pnp_unregister_card_driver(&ad1816a_pnpc_driver); |
305 | #ifdef MODULE | ||
307 | printk(KERN_ERR "no AD1816A based soundcards found.\n"); | 306 | printk(KERN_ERR "no AD1816A based soundcards found.\n"); |
308 | } | ||
309 | #endif /* MODULE */ | 307 | #endif /* MODULE */ |
310 | return cards ? 0 : -ENODEV; | 308 | return -ENODEV; |
309 | } | ||
310 | return 0; | ||
311 | } | 311 | } |
312 | 312 | ||
313 | static void __exit alsa_card_ad1816a_exit(void) | 313 | static void __exit alsa_card_ad1816a_exit(void) |