From 7ef37cd95494a0a9be425c4d75f21ee8d2807b5a Mon Sep 17 00:00:00 2001 From: Clemens Ladisch Date: Mon, 21 Jan 2008 08:51:55 +0100 Subject: [ALSA] oxygen: move model-specific data out of common header Instead of having model-specific fields in the common struct oxygen, put them into a private structure that is allocated together with the card structure. Signed-off-by: Clemens Ladisch Signed-off-by: Jaroslav Kysela --- sound/pci/oxygen/oxygen_lib.c | 4 +++- 1 file changed, 3 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 aceb1f9e0f35..0927e0423777 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c @@ -320,7 +320,8 @@ int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id, struct oxygen *chip; int err; - card = snd_card_new(index, id, model->owner, sizeof *chip); + card = snd_card_new(index, id, model->owner, + sizeof *chip + model->model_data_size); if (!card) return -ENOMEM; @@ -329,6 +330,7 @@ int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id, chip->pci = pci; chip->irq = -1; chip->model = model; + chip->model_data = chip + 1; spin_lock_init(&chip->reg_lock); mutex_init(&chip->mutex); INIT_WORK(&chip->spdif_input_bits_work, -- cgit v1.2.3