• Takashi Iwai's avatar
    ALSA: hwdep: Embed struct device · 7b461600
    Takashi Iwai authored
    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: default avatarJaroslav Kysela <perex@perex.cz>
    Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    7b461600
hwdep.c 13.3 KB