summaryrefslogtreecommitdiff
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-03 19:57:16 +0300
committerTakashi Iwai <tiwai@suse.de>2015-02-03 19:57:16 +0300
commit3fe9cf390f6dc84f76b112b0a660967a84f9a81b (patch)
tree18b8573687ae8131db155aa791f4d2357d91e6c5 /sound/pci
parent6ccd93bdb989507717edb375d40534f1177822c5 (diff)
parent830953c0724b42be30a74febcde6c89c706ed286 (diff)
downloadlinux-3fe9cf390f6dc84f76b112b0a660967a84f9a81b.tar.xz
Merge branch 'topic/snd-device' into for-next
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_controller.c3
-rw-r--r--sound/pci/hda/hda_hwdep.c7
2 files changed, 7 insertions, 3 deletions
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index 657b604e1a2b..27dcb142f596 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -939,7 +939,8 @@ static int azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
chip->card->dev,
size, MAX_PREALLOC_SIZE);
/* link to codec */
- pcm->dev = &codec->dev;
+ for (s = 0; s < 2; s++)
+ pcm->streams[s].dev.parent = &codec->dev;
return 0;
}
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c
index 014a7849e8fd..11b5a42b4ec8 100644
--- a/sound/pci/hda/hda_hwdep.c
+++ b/sound/pci/hda/hda_hwdep.c
@@ -109,7 +109,6 @@ int snd_hda_create_hwdep(struct hda_codec *codec)
hwdep->iface = SNDRV_HWDEP_IFACE_HDA;
hwdep->private_data = codec;
hwdep->exclusive = 1;
- hwdep->groups = snd_hda_dev_attr_groups;
hwdep->ops.open = hda_hwdep_open;
hwdep->ops.ioctl = hda_hwdep_ioctl;
@@ -118,7 +117,11 @@ int snd_hda_create_hwdep(struct hda_codec *codec)
#endif
/* link to codec */
- hwdep->dev = &codec->dev;
+ hwdep->dev.parent = &codec->dev;
+
+ /* for sysfs */
+ hwdep->dev.groups = snd_hda_dev_attr_groups;
+ dev_set_drvdata(&hwdep->dev, codec);
return 0;
}