diff options
author | Ivan Orlov <ivan.orlov0322@gmail.com> | 2023-06-20 19:56:34 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2023-06-21 07:29:10 +0200 |
commit | 8d0cf150d299148a97653610c256f10c42f85ce0 (patch) | |
tree | 8fcdd51f0de9dfaa0fdf823e05579b4859f1b6d2 /sound/core/control_led.c | |
parent | ALSA: compress: allow setting codec params after next track (diff) | |
download | linux-8d0cf150d299148a97653610c256f10c42f85ce0.tar.xz linux-8d0cf150d299148a97653610c256f10c42f85ce0.zip |
sound: make all 'class' structures const
Now that the driver core allows for struct class to be in read-only
memory, making all 'class' structures to be declared at build time
placing them into read-only memory, instead of having to be dynamically
allocated at load time.
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Ivan Orlov <ivan.orlov0322@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Geoff Levand <geoff@infradead.org>
Cc: Thierry Reding <treding@nvidia.com>
Cc: "Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>
Cc: alsa-devel@alsa-project.org
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20230620175633.641141-2-gregkh@linuxfoundation.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/control_led.c')
-rw-r--r-- | sound/core/control_led.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/core/control_led.c b/sound/core/control_led.c index 3cadd40100f3..ee77547bf8dc 100644 --- a/sound/core/control_led.c +++ b/sound/core/control_led.c @@ -737,7 +737,7 @@ static int __init snd_ctl_led_init(void) unsigned int group; device_initialize(&snd_ctl_led_dev); - snd_ctl_led_dev.class = sound_class; + snd_ctl_led_dev.class = &sound_class; snd_ctl_led_dev.release = snd_ctl_led_dev_release; dev_set_name(&snd_ctl_led_dev, "ctl-led"); if (device_add(&snd_ctl_led_dev)) { |