summaryrefslogtreecommitdiff
path: root/drivers/rpmsg/rpmsg_internal.h
diff options
context:
space:
mode:
authorRicardo B. Marliere <ricardo@marliere.net>2024-03-05 21:28:27 +0300
committerMathieu Poirier <mathieu.poirier@linaro.org>2024-03-26 20:25:13 +0300
commit193d0c4e1e42517958b6510687fbd9a92165aa0d (patch)
tree550f26eeee688c510372aa50f768658f0f166ccb /drivers/rpmsg/rpmsg_internal.h
parent4cece764965020c22cff7665b18a012006359095 (diff)
downloadlinux-193d0c4e1e42517958b6510687fbd9a92165aa0d.tar.xz
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>
Diffstat (limited to 'drivers/rpmsg/rpmsg_internal.h')
-rw-r--r--drivers/rpmsg/rpmsg_internal.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rpmsg/rpmsg_internal.h b/drivers/rpmsg/rpmsg_internal.h
index b950d6f790a3..a3ba768138f1 100644
--- a/drivers/rpmsg/rpmsg_internal.h
+++ b/drivers/rpmsg/rpmsg_internal.h
@@ -18,7 +18,7 @@
#define to_rpmsg_device(d) container_of(d, struct rpmsg_device, dev)
#define to_rpmsg_driver(d) container_of(d, struct rpmsg_driver, drv)
-extern struct class *rpmsg_class;
+extern const struct class rpmsg_class;
/**
* struct rpmsg_device_ops - indirection table for the rpmsg_device operations