diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-13 21:18:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-03-17 17:16:43 +0300 |
commit | d2fff09656369d5465585ad2c72d8ba8ada758b5 (patch) | |
tree | c80453f9b8e6fb3a9fc3798ee016846398775ee9 /drivers/base/core.c | |
parent | 80842a92907bd68454591f9c7a73778f130ac38f (diff) | |
download | linux-d2fff09656369d5465585ad2c72d8ba8ada758b5.tar.xz |
driver core: device: make device_destroy() take a const class *
device_destroy() does not modify the struct class passed into it, so
mark it as const to enforce this rule.
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313181843.1207845-9-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/core.c')
-rw-r--r-- | drivers/base/core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/core.c b/drivers/base/core.c index 57076837b33e..f3b7040ef9b6 100644 --- a/drivers/base/core.c +++ b/drivers/base/core.c @@ -4383,7 +4383,7 @@ EXPORT_SYMBOL_GPL(device_create_with_groups); * This call unregisters and cleans up a device that was created with a * call to device_create(). */ -void device_destroy(struct class *class, dev_t devt) +void device_destroy(const struct class *class, dev_t devt) { struct device *dev; |