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 1e7de08..d6be4e8 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 ebb7a64..4c7a6f9 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 11b5a42..125f342 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);