media: lirc_dev: Make lirc_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Tue, 5 Mar 2024 13:26:26 +0000 (10:26 -0300)
committerHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 25 Mar 2024 09:13:44 +0000 (10:13 +0100)
commit8d93d0674bb1b3770d96e585248f0d5856bf0f64
treef3c87d4999edb5c387a9fe642f28f3d917a6e382
parent888eefd91cbfe143e2f57f4463832861950457a0
media: lirc_dev: Make lirc_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 lirc_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: Sean Young <sean@mess.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
drivers/media/rc/lirc_dev.c