summaryrefslogtreecommitdiffstats
path: root/drivers
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 /drivers
parent43a7206b0963c2153c95d6985624d1dc1b3abd4d (diff)
downloadlinux-6b0d49be81cf4f1cf30ebd079cbf4643cab0a01d.tar.gz
linux-6b0d49be81cf4f1cf30ebd079cbf4643cab0a01d.tar.bz2
linux-6b0d49be81cf4f1cf30ebd079cbf4643cab0a01d.zip
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 'drivers')
-rw-r--r--drivers/base/class.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c
index 05bce79d3d19..ad8b9f163fd2 100644
--- a/drivers/base/class.c
+++ b/drivers/base/class.c
@@ -498,7 +498,7 @@ EXPORT_SYMBOL_GPL(class_interface_register);
void class_interface_unregister(struct class_interface *class_intf)
{
struct subsys_private *sp;
- struct class *parent = class_intf->class;
+ const struct class *parent = class_intf->class;
struct class_dev_iter iter;
struct device *dev;