• Greg Kroah-Hartman's avatar
    ALSA: mark all struct bus_type as const · 66e82d21
    Greg Kroah-Hartman authored
    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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    Link: https://lore.kernel.org/r/2023121945-immersion-budget-d0aa@gregkhSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
    66e82d21
ac97_bus.c 2.55 KB