diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-02 19:58:48 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-04-03 21:42:48 +0200 |
commit | 6b0d49be81cf4f1cf30ebd079cbf4643cab0a01d (patch) | |
tree | f25a0714288c2a60e838c8afaa248e79ecc8014a /drivers/base/class.c | |
parent | 43a7206b0963c2153c95d6985624d1dc1b3abd4d (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 'drivers/base/class.c')
-rw-r--r-- | drivers/base/class.c | 2 |
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; |