diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-19 14:34:46 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-12-30 10:10:41 +0100 |
commit | 66e82d219924f6112509f7e8f8e687fcc81a16e3 (patch) | |
tree | 1b6b2906f607cd81e85583a94ee6a0e5e4ee44ac /include/sound/hdaudio.h | |
parent | 64bf8dec54cfe57f416884a6b3d54c7f4259e93f (diff) |
ALSA: mark all struct bus_type as const
Now that the driver core can properly handle constant struct bus_type,
move all of the sound subsystem struct bus_type structures as const,
placing them into read-only memory which can not be modified at runtime.
Note, this fixes a duplicate definition of ac97_bus_type, which somehow
was declared extern in a .h file, and then static as a prototype in a .c
file, and then properly later on in the same .c file. Amazing that no
compiler warning ever showed up for this.
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Dawei Li <set_pte_at@outlook.com>
Cc: Yu Liao <liaoyu15@huawei.com>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: linux-sound@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/2023121945-immersion-budget-d0aa@gregkh
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'include/sound/hdaudio.h')
-rw-r--r-- | include/sound/hdaudio.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/sound/hdaudio.h b/include/sound/hdaudio.h index 62a3cd154ff2..a73d7f34f4e5 100644 --- a/include/sound/hdaudio.h +++ b/include/sound/hdaudio.h @@ -33,7 +33,7 @@ struct hda_device_id; /* * exported bus type */ -extern struct bus_type snd_hda_bus_type; +extern const struct bus_type snd_hda_bus_type; /* * generic arrays |