pxa2xx-ac97.c (f0eef25339f92f7cd4aeea23d9ae97987a5a1e82) | pxa2xx-ac97.c (788c6043335590e0a483fdc18f85b1405a157bf9) |
---|---|
1/* 2 * linux/sound/pxa2xx-ac97.c -- AC97 support for the Intel PXA2xx chip. 3 * 4 * Author: Nicolas Pitre 5 * Created: Dec 02, 2004 6 * Copyright: MontaVista Software Inc. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 291 unchanged lines hidden (view full) --- 300 return ret; 301} 302 303#else 304#define pxa2xx_ac97_suspend NULL 305#define pxa2xx_ac97_resume NULL 306#endif 307 | 1/* 2 * linux/sound/pxa2xx-ac97.c -- AC97 support for the Intel PXA2xx chip. 3 * 4 * Author: Nicolas Pitre 5 * Created: Dec 02, 2004 6 * Copyright: MontaVista Software Inc. 7 * 8 * This program is free software; you can redistribute it and/or modify --- 291 unchanged lines hidden (view full) --- 300 return ret; 301} 302 303#else 304#define pxa2xx_ac97_suspend NULL 305#define pxa2xx_ac97_resume NULL 306#endif 307 |
308static int pxa2xx_ac97_probe(struct platform_device *dev) | 308static int __devinit pxa2xx_ac97_probe(struct platform_device *dev) |
309{ 310 struct snd_card *card; 311 struct snd_ac97_bus *ac97_bus; 312 struct snd_ac97_template ac97_template; 313 int ret; 314 315 ret = -ENOMEM; 316 card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, --- 47 unchanged lines hidden (view full) --- 364 if (CKEN & CKEN2_AC97) { 365 GCR |= GCR_ACLINK_OFF; 366 free_irq(IRQ_AC97, NULL); 367 pxa_set_cken(CKEN2_AC97, 0); 368 } 369 return ret; 370} 371 | 309{ 310 struct snd_card *card; 311 struct snd_ac97_bus *ac97_bus; 312 struct snd_ac97_template ac97_template; 313 int ret; 314 315 ret = -ENOMEM; 316 card = snd_card_new(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, --- 47 unchanged lines hidden (view full) --- 364 if (CKEN & CKEN2_AC97) { 365 GCR |= GCR_ACLINK_OFF; 366 free_irq(IRQ_AC97, NULL); 367 pxa_set_cken(CKEN2_AC97, 0); 368 } 369 return ret; 370} 371 |
372static int pxa2xx_ac97_remove(struct platform_device *dev) | 372static int __devexit pxa2xx_ac97_remove(struct platform_device *dev) |
373{ 374 struct snd_card *card = platform_get_drvdata(dev); 375 376 if (card) { 377 snd_card_free(card); 378 platform_set_drvdata(dev, NULL); 379 GCR |= GCR_ACLINK_OFF; 380 free_irq(IRQ_AC97, NULL); 381 pxa_set_cken(CKEN2_AC97, 0); 382 } 383 384 return 0; 385} 386 387static struct platform_driver pxa2xx_ac97_driver = { 388 .probe = pxa2xx_ac97_probe, | 373{ 374 struct snd_card *card = platform_get_drvdata(dev); 375 376 if (card) { 377 snd_card_free(card); 378 platform_set_drvdata(dev, NULL); 379 GCR |= GCR_ACLINK_OFF; 380 free_irq(IRQ_AC97, NULL); 381 pxa_set_cken(CKEN2_AC97, 0); 382 } 383 384 return 0; 385} 386 387static struct platform_driver pxa2xx_ac97_driver = { 388 .probe = pxa2xx_ac97_probe, |
389 .remove = pxa2xx_ac97_remove, | 389 .remove = __devexit_p(pxa2xx_ac97_remove), |
390 .suspend = pxa2xx_ac97_suspend, 391 .resume = pxa2xx_ac97_resume, 392 .driver = { 393 .name = "pxa2xx-ac97", 394 }, 395}; 396 397static int __init pxa2xx_ac97_init(void) --- 15 unchanged lines hidden --- | 390 .suspend = pxa2xx_ac97_suspend, 391 .resume = pxa2xx_ac97_resume, 392 .driver = { 393 .name = "pxa2xx-ac97", 394 }, 395}; 396 397static int __init pxa2xx_ac97_init(void) --- 15 unchanged lines hidden --- |