leds: Make leds_class a static const structure
authorIvan Orlov <ivan.orlov0322@gmail.com>
Thu, 10 Aug 2023 17:49:05 +0000 (21:49 +0400)
committerLee Jones <lee@kernel.org>
Fri, 18 Aug 2023 07:43:11 +0000 (08:43 +0100)
commit43a707ae58406200597b03a5be782e726b3c175b
tree46fb8cb26855f59afa5848accac4bd53187da543
parent3d590af89b1e61568395ab37e9b5f88fd711f638
leds: Make leds_class a static const structure

Now that the driver core allows for struct class to be in read-only
memory, move the leds_class structure to be declared at build time
placing it into read-only memory, instead of having to be dynamically
allocated at boot time.

Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ivan Orlov <ivan.orlov0322@gmail.com>
Link: https://lore.kernel.org/r/20230810174905.7997-1-ivan.orlov0322@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/led-class.c