diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-01-29 11:13:32 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-02-02 08:42:42 -0500 |
commit | 7b46160000197209f7ebca8b92bdbb75795c473f (patch) | |
tree | 8655e2cacefc6fa10cfdd4b84a3c697bbbafdc6b /include/sound | |
parent | 0fcd9f4b3c60382205e5819c456aa9ea17b6f20f (diff) |
ALSA: hwdep: Embed struct device
Like the previous patch, this one embeds the device object into hwdep
object. For a proper object lifecycle, it's freed in the release
callback.
This also allows us to create sysfs entries via passing to the groups
field of the device without explicit function calls. Since each
driver can see the device and touch its groups field directly, we
don't need to delegate in hwdep core any longer. So, remove the
groups field from snd_hwdep, and let the user (in this case only
hda_hwdep.c) modify the device groups.
Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound')
-rw-r--r-- | include/sound/hwdep.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/sound/hwdep.h b/include/sound/hwdep.h index ae04a3ec9c77..ab9fcb2f97f0 100644 --- a/include/sound/hwdep.h +++ b/include/sound/hwdep.h | |||
@@ -68,8 +68,7 @@ struct snd_hwdep { | |||
68 | wait_queue_head_t open_wait; | 68 | wait_queue_head_t open_wait; |
69 | void *private_data; | 69 | void *private_data; |
70 | void (*private_free) (struct snd_hwdep *hwdep); | 70 | void (*private_free) (struct snd_hwdep *hwdep); |
71 | struct device *dev; | 71 | struct device dev; |
72 | const struct attribute_group **groups; | ||
73 | 72 | ||
74 | struct mutex open_mutex; | 73 | struct mutex open_mutex; |
75 | int used; /* reference counter */ | 74 | int used; /* reference counter */ |