summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-13 21:18:36 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-03-17 17:16:35 +0300
commita2fd6e42e4fb661e183977072022b7dd8dd65d90 (patch)
tree1fcb7061a83a6b7fd6505cc8bee538fdd25ec8b4 /drivers
parent1aaba11da9aa7d7d6b52a74d45b31cac118295a1 (diff)
downloadlinux-a2fd6e42e4fb661e183977072022b7dd8dd65d90.tar.xz
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')
-rw-r--r--drivers/base/class.c4
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;