diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-25 11:45:26 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-28 09:27:48 +0300 |
commit | 517d4927aabe488144863e72b52bb3e506fecd34 (patch) | |
tree | 44ae824e50ea0437e765c1521481527c26bd73fc /include/linux/device | |
parent | 2f9e87f5a2941b259336c7ea6c5a1499ede4554a (diff) | |
download | linux-517d4927aabe488144863e72b52bb3e506fecd34.tar.xz |
driver core: bus: constify class_unregister/destroy()
The class_unregister() and class_destroy() function should be taking a
const * to struct class, not just a *, so fix that up.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230325084526.3622123-1-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device')
-rw-r--r-- | include/linux/device/class.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/device/class.h b/include/linux/device/class.h index d3960733c0fa..73436c578d37 100644 --- a/include/linux/device/class.h +++ b/include/linux/device/class.h @@ -83,7 +83,7 @@ struct class_dev_iter { extern struct kobject *sysfs_dev_block_kobj; int __must_check class_register(struct class *class); -void class_unregister(struct class *class); +void class_unregister(const struct class *class); struct class_compat; struct class_compat *class_compat_register(const char *name); @@ -231,6 +231,6 @@ int __must_check class_interface_register(struct class_interface *); void class_interface_unregister(struct class_interface *); struct class * __must_check class_create(const char *name); -void class_destroy(struct class *cls); +void class_destroy(const struct class *cls); #endif /* _DEVICE_CLASS_H_ */ |