diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2008-09-22 10:56:01 +0400 |
---|---|---|
committer | Clemens Ladisch <clemens@ladisch.de> | 2008-09-22 10:56:01 +0400 |
commit | 568c59e722da22c9b0a485c2f1aaf28cb1b36b79 (patch) | |
tree | 295bdb15737e938992a9cd01450be516276b0ccd /sound/pci/oxygen/oxygen_lib.c | |
parent | 9bd6a73aef955216816fd6e28f371a868ed073d5 (diff) | |
download | linux-568c59e722da22c9b0a485c2f1aaf28cb1b36b79.tar.xz |
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>
Diffstat (limited to 'sound/pci/oxygen/oxygen_lib.c')
-rw-r--r-- | sound/pci/oxygen/oxygen_lib.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index 07b0563cc903..58bbc010ed89 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c @@ -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); |