OSDN Git Service

driver core: class: make class_dev_iter_init() options const
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Mar 2023 18:18:36 +0000 (19:18 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Mar 2023 14:16:35 +0000 (15:16 +0100)
commita2fd6e42e4fb661e183977072022b7dd8dd65d90
tree1fcb7061a83a6b7fd6505cc8bee538fdd25ec8b4
parent1aaba11da9aa7d7d6b52a74d45b31cac118295a1
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>
drivers/base/class.c
include/linux/device/class.h