aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/oxygen/oxygen_lib.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-01-21 02:51:55 -0500
committerJaroslav Kysela <perex@perex.cz>2008-01-31 11:30:08 -0500
commit7ef37cd95494a0a9be425c4d75f21ee8d2807b5a (patch)
tree8c1ed7c6fab7c787ec98815be44417256a09d81e /sound/pci/oxygen/oxygen_lib.c
parent3b94253bc9c950d2038a2db4f9c804b50f82001a (diff)
[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 <clemens@ladisch.de> Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Diffstat (limited to 'sound/pci/oxygen/oxygen_lib.c')
-rw-r--r--sound/pci/oxygen/oxygen_lib.c4
1 files changed, 3 insertions, 1 deletions
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,
320 struct oxygen *chip; 320 struct oxygen *chip;
321 int err; 321 int err;
322 322
323 card = snd_card_new(index, id, model->owner, sizeof *chip); 323 card = snd_card_new(index, id, model->owner,
324 sizeof *chip + model->model_data_size);
324 if (!card) 325 if (!card)
325 return -ENOMEM; 326 return -ENOMEM;
326 327
@@ -329,6 +330,7 @@ int __devinit oxygen_pci_probe(struct pci_dev *pci, int index, char *id,
329 chip->pci = pci; 330 chip->pci = pci;
330 chip->irq = -1; 331 chip->irq = -1;
331 chip->model = model; 332 chip->model = model;
333 chip->model_data = chip + 1;
332 spin_lock_init(&chip->reg_lock); 334 spin_lock_init(&chip->reg_lock);
333 mutex_init(&chip->mutex); 335 mutex_init(&chip->mutex);
334 INIT_WORK(&chip->spdif_input_bits_work, 336 INIT_WORK(&chip->spdif_input_bits_work,