path: root/sound/pci/oxygen/oxygen_lib.c
diff options
authorClemens Ladisch <clemens@ladisch.de>2009-02-19 08:37:13 +0100
committerTakashi Iwai <tiwai@suse.de>2009-02-19 10:22:22 +0100
commitbb71858853a5c9616eea98512f4075d4f081154d (patch)
tree62447849ac3a255219029d99ee29557ad9c8de76 /sound/pci/oxygen/oxygen_lib.c
parenta5e0e970c06065a14844b406a0c2a59776a1ccc6 (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')
1 files changed, 2 insertions, 1 deletions
diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c
index 9c81e0b0511..b5560fa5a5e 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)
int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
+ struct module *owner,
const struct oxygen_model *model,
unsigned long driver_data)
@@ -459,7 +460,7 @@ int oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
struct oxygen *chip;
int err;
- err = snd_card_create(index, id, model->owner,
+ err = snd_card_create(index, id, owner,
sizeof(*chip) + model->model_data_size, &card);
if (err < 0)
return err;