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>
This commit is contained in:
Greg Kroah-Hartman
2023-04-02 19:58:48 +02:00
parent 43a7206b09
commit 6b0d49be81
2 changed files with 2 additions and 2 deletions

View File

@@ -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;