++dev;
return -ENOENT;
}
- err = oxygen_pci_probe(pci, index[dev], id[dev], &model_hifier);
+ err = oxygen_pci_probe(pci, index[dev], id[dev], &model_hifier, 0);
if (err >= 0)
++dev;
return err;
}
is_meridian = pci_id->driver_data;
err = oxygen_pci_probe(pci, index[dev], id[dev],
- is_meridian ? &model_meridian : &model_generic);
+ is_meridian ? &model_meridian : &model_generic,
+ 0);
if (err >= 0)
++dev;
return err;
const char *longname;
const char *chip;
struct module *owner;
+ int (*probe)(struct oxygen *chip, unsigned long driver_data);
void (*init)(struct oxygen *chip);
int (*control_filter)(struct snd_kcontrol_new *template);
int (*mixer_init)(struct oxygen *chip);
/* oxygen_lib.c */
int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
- const struct oxygen_model *model);
+ const struct oxygen_model *model,
+ unsigned long driver_data);
void oxygen_pci_remove(struct pci_dev *pci);
#ifdef CONFIG_PM
int oxygen_pci_suspend(struct pci_dev *pci, pm_message_t state);
}
int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
- const struct oxygen_model *model)
+ const struct oxygen_model *model,
+ unsigned long driver_data)
{
struct snd_card *card;
struct oxygen *chip;
snd_card_set_dev(card, &pci->dev);
card->private_free = oxygen_card_free;
+ if (chip->model.probe) {
+ err = chip->model.probe(chip, driver_data);
+ if (err < 0)
+ goto err_card;
+ }
oxygen_init(chip);
chip->model.init(chip);
return -ENOENT;
}
err = oxygen_pci_probe(pci, index[dev], id[dev],
- &xonar_models[pci_id->driver_data]);
+ &xonar_models[pci_id->driver_data], 0);
if (err >= 0)
++dev;
return err;