summaryrefslogtreecommitdiffstats
path: root/include/sound
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2023-08-16 18:02:47 +0200
committerTakashi Iwai <tiwai@suse.de>2023-08-17 09:24:01 +0200
commit897c8882df5875fe0bbc3e93ee8e9ba4a2c6ca0d (patch)
tree155baa24635991f2b8cbc82d485fd86b46284acb /include/sound
parentbc41a7228cedc39395d032b2502975e53b7a9180 (diff)
downloadlinux-stable-897c8882df5875fe0bbc3e93ee8e9ba4a2c6ca0d.tar.gz
linux-stable-897c8882df5875fe0bbc3e93ee8e9ba4a2c6ca0d.tar.bz2
linux-stable-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 'include/sound')
-rw-r--r--include/sound/hwdep.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h
index 8d6cdb254039..b0da633184cd 100644
--- a/include/sound/hwdep.h
+++ b/include/sound/hwdep.h
@@ -53,7 +53,7 @@ struct snd_hwdep {
wait_queue_head_t open_wait;
void *private_data;
void (*private_free) (struct snd_hwdep *hwdep);
- struct device dev;
+ struct device *dev;
struct mutex open_mutex;
int used; /* reference counter */