ALSA: oxygen: add probe callback

Add a probe callback to the model structure so that model-specific
drivers can refine their model detection before the card is initialized.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
This commit is contained in:
Clemens Ladisch
2008-09-22 08:56:01 +02:00
parent 9bd6a73aef
commit 568c59e722
5 changed files with 14 additions and 5 deletions

View File

@@ -424,7 +424,8 @@ static void oxygen_card_free(struct snd_card *card)
}
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;
@@ -470,6 +471,11 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
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);