summaryrefslogtreecommitdiffstats
path: root/sound/pci/ice1712/ice1712.c
diff options
context:
space:
mode:
authorOndrej Zary <linux@rainbow-software.org>2012-10-14 21:09:19 +0200
committerTakashi Iwai <tiwai@suse.de>2012-10-17 09:01:26 +0200
commit267bccaf0409e2a4e17591bb31e8d1ceb866988c (patch)
treeae57d01b21e2957adc076701d8c2e5658a361b5b /sound/pci/ice1712/ice1712.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/ice1712.c')
-rw-r--r--sound/pci/ice1712/ice1712.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index 5be2e120a14..f42b5b1c1d2 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2686,6 +2686,7 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
for (tbl = card_tables; *tbl; tbl++) {
for (c = *tbl; c->subvendor; c++) {
if (c->subvendor == ice->eeprom.subvendor) {
+ ice->card_info = c;
strcpy(card->shortname, c->name);
if (c->driver) /* specific driver? */
strcpy(card->driver, c->driver);
@@ -2799,7 +2800,12 @@ static int __devinit snd_ice1712_probe(struct pci_dev *pci,
static void __devexit snd_ice1712_remove(struct pci_dev *pci)
{
- snd_card_free(pci_get_drvdata(pci));
+ struct snd_card *card = pci_get_drvdata(pci);
+ struct snd_ice1712 *ice = card->private_data;
+
+ if (ice->card_info && ice->card_info->chip_exit)
+ ice->card_info->chip_exit(ice);
+ snd_card_free(card);
pci_set_drvdata(pci, NULL);
}