aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen_lib.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-09-22 02:56:01 -0400
committerClemens Ladisch <clemens@ladisch.de>2008-09-22 02:56:01 -0400
commit568c59e722da22c9b0a485c2f1aaf28cb1b36b79 (patch)
tree295bdb15737e938992a9cd01450be516276b0ccd /sound/pci/oxygen/oxygen_lib.c
parent9bd6a73aef955216816fd6e28f371a868ed073d5 (diff)
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.c8
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)
424} 424}
425 425
426int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, 426int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
427 const struct oxygen_model *model) 427 const struct oxygen_model *model,
428 unsigned long driver_data)
428{ 429{
429 struct snd_card *card; 430 struct snd_card *card;
430 struct oxygen *chip; 431 struct oxygen *chip;
@@ -470,6 +471,11 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
470 snd_card_set_dev(card, &pci->dev); 471 snd_card_set_dev(card, &pci->dev);
471 card->private_free = oxygen_card_free; 472 card->private_free = oxygen_card_free;
472 473
474 if (chip->model.probe) {
475 err = chip->model.probe(chip, driver_data);
476 if (err < 0)
477 goto err_card;
478 }
473 oxygen_init(chip); 479 oxygen_init(chip);
474 chip->model.init(chip); 480 chip->model.init(chip);
475 481