diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2009-02-19 02:37:13 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-02-19 04:22:22 -0500 |
commit | bb71858853a5c9616eea98512f4075d4f081154d (patch) | |
tree | 62447849ac3a255219029d99ee29557ad9c8de76 /sound/pci/oxygen/oxygen_lib.c | |
parent | a5e0e970c06065a14844b406a0c2a59776a1ccc6 (diff) |
sound: oxygen: make the owner module a parameter of the probe function
Move the owner field out of the oxygen_model structure and make it
a parameter of oxygen_pci_probe(), because the actual owner module does
not depend on the card model. Furthermore, moving it out of the model
structure allows us to create the card structure before the actual model
is known.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/oxygen/oxygen_lib.c')
-rw-r--r-- | sound/pci/oxygen/oxygen_lib.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index 9c81e0b05113..b5560fa5a5e3 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c | |||
@@ -452,6 +452,7 @@ static void oxygen_card_free(struct snd_card *card) | |||
452 | } | 452 | } |
453 | 453 | ||
454 | int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | 454 | int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, |
455 | struct module *owner, | ||
455 | const struct oxygen_model *model, | 456 | const struct oxygen_model *model, |
456 | unsigned long driver_data) | 457 | unsigned long driver_data) |
457 | { | 458 | { |
@@ -459,7 +460,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id, | |||
459 | struct oxygen *chip; | 460 | struct oxygen *chip; |
460 | int err; | 461 | int err; |
461 | 462 | ||
462 | err = snd_card_create(index, id, model->owner, | 463 | err = snd_card_create(index, id, owner, |
463 | sizeof(*chip) + model->model_data_size, &card); | 464 | sizeof(*chip) + model->model_data_size, &card); |
464 | if (err < 0) | 465 | if (err < 0) |
465 | return err; | 466 | return err; |