summaryrefslogtreecommitdiff
path: root/sound/pci/oxygen/oxygen_lib.c
diff options
context:
space:
mode:
authorClemens Ladisch <clemens@ladisch.de>2008-01-21 10:51:55 +0300
committerJaroslav Kysela <perex@perex.cz>2008-01-31 19:30:08 +0300
commit7ef37cd95494a0a9be425c4d75f21ee8d2807b5a (patch)
tree8c1ed7c6fab7c787ec98815be44417256a09d81e /sound/pci/oxygen/oxygen_lib.c
parent3b94253bc9c950d2038a2db4f9c804b50f82001a (diff)
downloadlinux-7ef37cd95494a0a9be425c4d75f21ee8d2807b5a.tar.xz
[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,
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,