rpmsg: core: Make rpmsg_class constant
authorRicardo B. Marliere <ricardo@marliere.net>
Tue, 5 Mar 2024 18:28:27 +0000 (15:28 -0300)
committerMathieu Poirier <mathieu.poirier@linaro.org>
Tue, 26 Mar 2024 17:25:13 +0000 (11:25 -0600)
commit193d0c4e1e42517958b6510687fbd9a92165aa0d
tree550f26eeee688c510372aa50f768658f0f166ccb
parent4cece764965020c22cff7665b18a012006359095
rpmsg: core: Make rpmsg_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 rpmsg_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>
Link: https://lore.kernel.org/r/20240305-class_cleanup-remoteproc-v1-1-19373374e003@marliere.net
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
drivers/rpmsg/rpmsg_char.c
drivers/rpmsg/rpmsg_core.c
drivers/rpmsg/rpmsg_ctrl.c
drivers/rpmsg/rpmsg_internal.h