diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-13 19:18:36 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-17 15:16:35 +0100 |
commit | a2fd6e42e4fb661e183977072022b7dd8dd65d90 (patch) | |
tree | 1fcb7061a83a6b7fd6505cc8bee538fdd25ec8b4 /drivers/base/class.c | |
parent | 1aaba11da9aa7d7d6b52a74d45b31cac118295a1 (diff) | |
download | lwn-a2fd6e42e4fb661e183977072022b7dd8dd65d90.tar.gz lwn-a2fd6e42e4fb661e183977072022b7dd8dd65d90.zip |
driver core: class: make class_dev_iter_init() options const
class_dev_iter_init() does not modify the struct class or the struct
device passed into it, so mark them as const * to enforce that.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313181843.1207845-5-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/class.c')
-rw-r--r-- | drivers/base/class.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/class.c b/drivers/base/class.c index 9439c6c7466f..5a60e8895165 100644 --- a/drivers/base/class.c +++ b/drivers/base/class.c @@ -284,8 +284,8 @@ EXPORT_SYMBOL_GPL(class_destroy); * otherwise if it is NULL, the iteration starts at the beginning of * the list. */ -void class_dev_iter_init(struct class_dev_iter *iter, struct class *class, - struct device *start, const struct device_type *type) +void class_dev_iter_init(struct class_dev_iter *iter, const struct class *class, + const struct device *start, const struct device_type *type) { struct klist_node *start_knode = NULL; |