aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/ice1724.c
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2012-10-14 15:09:19 -0400
committerTakashi Iwai <tiwai@suse.de>2012-10-17 03:01:26 -0400
commit267bccaf0409e2a4e17591bb31e8d1ceb866988c (patch)
treeae57d01b21e2957adc076701d8c2e5658a361b5b /sound/pci/ice1712/ice1724.c
parentdcda5806165c155d90b9aa466a1602cf4726012b (diff)
ALSA: ice1712: add chip_exit callback
Add chip_exit callback to allow card subdrivers to do cleanup work on module removal. Needed by Philips PSC724 subdriver to cancel delayed work. Signed-off-by: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ice1712/ice1724.c')
-rw-r--r--sound/pci/ice1712/ice1724.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/pci/ice1712/ice1724.c b/sound/pci/ice1712/ice1724.c
index 3050a5279253..287df68a9df8 100644
--- a/sound/pci/ice1712/ice1724.c
+++ b/sound/pci/ice1712/ice1724.c
@@ -2348,6 +2348,7 @@ static int __devinit snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
2348 ice->eeprom.subvendor = c->subvendor; 2348 ice->eeprom.subvendor = c->subvendor;
2349 } else if (c->subvendor != ice->eeprom.subvendor) 2349 } else if (c->subvendor != ice->eeprom.subvendor)
2350 continue; 2350 continue;
2351 ice->card_info = c;
2351 if (!c->eeprom_size || !c->eeprom_data) 2352 if (!c->eeprom_size || !c->eeprom_data)
2352 goto found; 2353 goto found;
2353 /* if the EEPROM is given by the driver, use it */ 2354 /* if the EEPROM is given by the driver, use it */
@@ -2788,7 +2789,12 @@ __found:
2788 2789
2789static void __devexit snd_vt1724_remove(struct pci_dev *pci) 2790static void __devexit snd_vt1724_remove(struct pci_dev *pci)
2790{ 2791{
2791 snd_card_free(pci_get_drvdata(pci)); 2792 struct snd_card *card = pci_get_drvdata(pci);
2793 struct snd_ice1712 *ice = card->private_data;
2794
2795 if (ice->card_info && ice->card_info->chip_exit)
2796 ice->card_info->chip_exit(ice);
2797 snd_card_free(card);
2792 pci_set_drvdata(pci, NULL); 2798 pci_set_drvdata(pci, NULL);
2793} 2799}
2794 2800