backlight: lcd: Make lcd_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Thu, 28 Mar 2024 11:59:07 +0000 (12:59 +0100)
committerLee Jones <lee@kernel.org>
Fri, 10 May 2024 14:44:28 +0000 (15:44 +0100)
commit717bbf03d28bfe50feee4c5fd7dcbe2217683888
tree754742dc684bfc5293e90110072f326b800e86cd
parentcda12ba5550650daa1bab3347aea509d4f7ee361
backlight: lcd: Make lcd_class constant

Since commit 43a7206b0963 ("driver core: class: make class_register() take
a const *"), the driver core allows for struct class to be in read-only
memory, so move the lcd_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Link: https://lore.kernel.org/r/2024032809-enchanted-conducive-3677@gregkh
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/video/backlight/lcd.c