diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-25 10:53:47 +0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-25 15:12:54 +0400 |
commit | 13aeaf68019d297be79c99f828c2a9d6affef06b (patch) | |
tree | b3f2946b2f335fa4f7c13c68e199d980279d1e5b /sound/pci/hda/hda_hwdep.c | |
parent | 2565c89908850337940d1f55dd015f229788de1e (diff) | |
download | linux-13aeaf68019d297be79c99f828c2a9d6affef06b.tar.xz |
ALSA: hda - Create own device struct for each codec
As the HD-audio is treated individually in each codec driver, it's
more convenient to assign an own struct device to each codec object.
Then we'll be able to use dev_err() more easily for each codec, for
example.
For achieving it, this patch just creates an object "hdaudioCxDy".
It belongs to sound class instead of creating a new bus, just for
simplicity, at this stage. No pm ops is implemented in the device
struct level but currently it's merely a container. The PCM and hwdep
devices are now children of this codec device.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_hwdep.c')
-rw-r--r-- | sound/pci/hda/hda_hwdep.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 0fada0f8cfe8..896d116ca951 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c @@ -155,6 +155,9 @@ int snd_hda_create_hwdep(struct hda_codec *codec) snd_array_init(&codec->hints, sizeof(struct hda_hint), 32); snd_array_init(&codec->user_pins, sizeof(struct hda_pincfg), 16); + /* link to codec */ + hwdep->dev = &codec->dev; + return 0; } |