]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ALSA: core: fix up bus match const issues.
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 22 May 2025 10:08:05 +0000 (12:08 +0200)
committerTakashi Iwai <tiwai@suse.de>
Thu, 22 May 2025 18:29:45 +0000 (20:29 +0200)
commit62f134ab190c5fd5c9f68fe638ad8e13bb8a4cb4
tree973a0ec0435f13127b7b166840a1502dedd8e2dd
parent462e244faba02d92c9e349f9877abc4a6564f4e7
ALSA: core: fix up bus match const issues.

In commit d69d80484598 ("driver core: have match() callback in struct
bus_type take a const *"), the match bus callback was changed to have
the driver be a const pointer.  Unfortunately that const attribute was
thrown away when container_of() is called, which is not correct and was
not caught by the compiler due to how container_of() is implemented.
Fix this up by correctly preserving the const attribute of the driver
passed to the bus match function which requires the hdac_driver match
function to also take a const pointer for the driver structure.

Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Fixes: d69d80484598 ("driver core: have match() callback in struct bus_type take a const *")
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://patch.msgid.link/2025052204-hyphen-thermal-3e72@gregkh
Signed-off-by: Takashi Iwai <tiwai@suse.de>
include/sound/hdaudio.h
sound/core/seq_device.c
sound/hda/hda_bus_type.c
sound/pci/hda/hda_bind.c