]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ALSA: hda - Decouple PCM and hwdep devices from codec object
authorTakashi Iwai <tiwai@suse.de>
Tue, 17 Feb 2015 16:15:04 +0000 (17:15 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Feb 2015 08:16:06 +0000 (09:16 +0100)
This is a preliminary patch for the hda_bus implementation, removing
the parent device setup to codec device.  Since the bus and the class
devices can't be crossed over, leave the sound devices to the default
parent device as is.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_beep.c
sound/pci/hda/hda_controller.c
sound/pci/hda/hda_hwdep.c

index 1e7de08e77cbf46729412443591f4d18d103f23c..d6be4e852c4d5c11a5fb56cecb62508e026c7c5b 100644 (file)
@@ -168,7 +168,6 @@ static int snd_hda_do_attach(struct hda_beep *beep)
        input_dev->evbit[0] = BIT_MASK(EV_SND);
        input_dev->sndbit[0] = BIT_MASK(SND_BELL) | BIT_MASK(SND_TONE);
        input_dev->event = snd_hda_beep_event;
-       input_dev->dev.parent = &codec->dev;
        input_set_drvdata(input_dev, beep);
 
        beep->dev = input_dev;
index ebb7a644bd866773eed754cc6b4c43e8da995274..4c7a6f9bfcde04d835abc47ed7ca9c5d819f31e1 100644 (file)
@@ -958,9 +958,6 @@ static int azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec,
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
                                              chip->card->dev,
                                              size, MAX_PREALLOC_SIZE);
-       /* link to codec */
-       for (s = 0; s < 2; s++)
-               pcm->streams[s].dev.parent = &codec->dev;
        return 0;
 }
 
index 11b5a42b4ec8cf33571631b8ceab890b29f31a15..125f3420fa6ae156328123ce46112f49743b767c 100644 (file)
@@ -116,9 +116,6 @@ int snd_hda_create_hwdep(struct hda_codec *codec)
        hwdep->ops.ioctl_compat = hda_hwdep_ioctl_compat;
 #endif
 
-       /* link to codec */
-       hwdep->dev.parent = &codec->dev;
-
        /* for sysfs */
        hwdep->dev.groups = snd_hda_dev_attr_groups;
        dev_set_drvdata(&hwdep->dev, codec);