summaryrefslogtreecommitdiff
path: root/include/linux/device
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-02 19:58:48 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-03 21:42:48 +0200
commit6b0d49be81cf4f1cf30ebd079cbf4643cab0a01d (patch)
treef25a0714288c2a60e838c8afaa248e79ecc8014a /include/linux/device
parent43a7206b0963c2153c95d6985624d1dc1b3abd4d (diff)
driver core: class: mark the struct class in struct class_interface constant
The struct class pointer in struct class_interface is never modified, so mark it as const so that no one accidentally tries to modify it in the future. Acked-by: Rafael J. Wysocki <rafael@kernel.org> Link: https://lore.kernel.org/r/2023040249-handball-gruffly-5da7@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device')
-rw-r--r--include/linux/device/class.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/device/class.h b/include/linux/device/class.h
index 4bf46f9bbb56..53287aa105b8 100644
--- a/include/linux/device/class.h
+++ b/include/linux/device/class.h
@@ -217,7 +217,7 @@ ssize_t show_class_attr_string(const struct class *class, const struct class_att
struct class_interface {
struct list_head node;
- struct class *class;
+ const struct class *class;
int (*add_dev) (struct device *, struct class_interface *);
void (*remove_dev) (struct device *, struct class_interface *);