Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342548
b: refs/heads/master
c: 267bcca
h: refs/heads/master
v: v3
  • Loading branch information
Ondrej Zary authored and Takashi Iwai committed Oct 17, 2012
1 parent a6ab274 commit 7819a59
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dcda5806165c155d90b9aa466a1602cf4726012b
refs/heads/master: 267bccaf0409e2a4e17591bb31e8d1ceb866988c
8 changes: 7 additions & 1 deletion trunk/sound/pci/ice1712/ice1712.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
}

Expand Down
3 changes: 3 additions & 0 deletions trunk/sound/pci/ice1712/ice1712.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ struct snd_ice1712_spdif {
} ops;
};

struct snd_ice1712_card_info;

struct snd_ice1712 {
unsigned long conp_dma_size;
Expand Down Expand Up @@ -324,6 +325,7 @@ struct snd_ice1712 {
struct snd_info_entry *proc_entry;

struct snd_ice1712_eeprom eeprom;
struct snd_ice1712_card_info *card_info;

unsigned int pro_volumes[20];
unsigned int omni:1; /* Delta Omni I/O */
Expand Down Expand Up @@ -517,6 +519,7 @@ struct snd_ice1712_card_info {
char *model;
char *driver;
int (*chip_init)(struct snd_ice1712 *);
void (*chip_exit)(struct snd_ice1712 *);
int (*build_controls)(struct snd_ice1712 *);
unsigned int no_mpu401:1;
unsigned int mpu401_1_info_flags;
Expand Down
8 changes: 7 additions & 1 deletion trunk/sound/pci/ice1712/ice1724.c
Original file line number Diff line number Diff line change
Expand Up @@ -2348,6 +2348,7 @@ static int __devinit snd_vt1724_read_eeprom(struct snd_ice1712 *ice,
ice->eeprom.subvendor = c->subvendor;
} else if (c->subvendor != ice->eeprom.subvendor)
continue;
ice->card_info = c;
if (!c->eeprom_size || !c->eeprom_data)
goto found;
/* if the EEPROM is given by the driver, use it */
Expand Down Expand Up @@ -2788,7 +2789,12 @@ static int __devinit snd_vt1724_probe(struct pci_dev *pci,

static void __devexit snd_vt1724_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);
}

Expand Down

0 comments on commit 7819a59

Please sign in to comment.