Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 327ef4f0 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: hda - Decouple PCM and hwdep devices from codec object



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: default avatarTakashi Iwai <tiwai@suse.de>
parent 72f770c6
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -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;
+0 −3
Original line number Diff line number Diff line
@@ -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;
}

+0 −3
Original line number Diff line number Diff line
@@ -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);