diff options
author | Takashi Iwai <tiwai@suse.de> | 2023-08-16 18:02:47 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-08-17 09:24:01 +0200 |
commit | 897c8882df5875fe0bbc3e93ee8e9ba4a2c6ca0d (patch) | |
tree | 155baa24635991f2b8cbc82d485fd86b46284acb /sound/pci/hda | |
parent | ALSA: pcm: Don't embed device (diff) | |
download | linux-897c8882df5875fe0bbc3e93ee8e9ba4a2c6ca0d.tar.xz linux-897c8882df5875fe0bbc3e93ee8e9ba4a2c6ca0d.zip |
ALSA: hwdep: Don't embed device
Like control and PCM devices, it's better to avoid the embedded struct
device for hwdep (although it's more or less well working), too.
Change it to allocate via snd_device_alloc(), and free the memory at
the common snd_hwdep_free().
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
Tested-by: Curtis Malainey <cujomalainey@chromium.org>
Link: https://lore.kernel.org/r/20230816160252.23396-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r-- | sound/pci/hda/hda_hwdep.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c index 125e97fe0b1c..727f39acedfc 100644 --- a/sound/pci/hda/hda_hwdep.c +++ b/sound/pci/hda/hda_hwdep.c @@ -114,8 +114,8 @@ int snd_hda_create_hwdep(struct hda_codec *codec) #endif /* for sysfs */ - hwdep->dev.groups = snd_hda_dev_attr_groups; - dev_set_drvdata(&hwdep->dev, codec); + hwdep->dev->groups = snd_hda_dev_attr_groups; + dev_set_drvdata(hwdep->dev, codec); return 0; } |