summaryrefslogtreecommitdiff
path: root/include/linux/device
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-02 19:58:47 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-04-03 21:42:46 +0200
commit43a7206b0963c2153c95d6985624d1dc1b3abd4d (patch)
tree60bcb1a3443249326a550c1fcf54ea7685c7ff01 /include/linux/device
parent979207cac517833c828133ffb2633bcdf6edce00 (diff)
driver core: class: make class_register() take a const *
Now that the class code is cleaned up to not modify the class pointer registered with it, change class_register() to take a const * to allow the structure to be placed into read-only memory. Acked-by: Rafael J. Wysocki <rafael@kernel.org> Link: https://lore.kernel.org/r/2023040248-customary-release-4aec@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 f3c418fa129a..4bf46f9bbb56 100644
--- a/include/linux/device/class.h
+++ b/include/linux/device/class.h
@@ -76,7 +76,7 @@ struct class_dev_iter {
const struct device_type *type;
};
-int __must_check class_register(struct class *class);
+int __must_check class_register(const struct class *class);
void class_unregister(const struct class *class);
bool class_is_registered(const struct class *class);