From bb71858853a5c9616eea98512f4075d4f081154d Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Thu, 19 Feb 2009 08:37:13 +0100 Subject: 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 Signed-off-by: Takashi Iwai --- sound/pci/oxygen/oxygen_lib.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'sound/pci/oxygen/oxygen_lib.c') 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) } 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; -- cgit v1.2.3