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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user