diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-11 15:01:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-13 16:43:51 +0200 |
commit | 0725e8f9c442650924271a35017e6cce4315f3f1 (patch) | |
tree | 5f82faa2ffef00cb193251eb75b70e156f8a718d /drivers/base/base.h | |
parent | 841b7ebf819491b4a7e701ee4d42a55810606c96 (diff) | |
download | linux-0725e8f9c442650924271a35017e6cce4315f3f1.tar.gz linux-0725e8f9c442650924271a35017e6cce4315f3f1.tar.bz2 linux-0725e8f9c442650924271a35017e6cce4315f3f1.zip |
driver core: driver: mark driver_add/remove_groups constant
driver_add_groups() and driver_remove_groups should take a constant
pointer as the structure is not modified, so make the change.
Cc: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20240611130103.3262749-9-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/base.h')
-rw-r--r-- | drivers/base/base.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h index db4f910e8e36..cba8307908c7 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -175,8 +175,8 @@ static inline void dev_sync_state(struct device *dev) dev->driver->sync_state(dev); } -int driver_add_groups(struct device_driver *drv, const struct attribute_group **groups); -void driver_remove_groups(struct device_driver *drv, const struct attribute_group **groups); +int driver_add_groups(const struct device_driver *drv, const struct attribute_group **groups); +void driver_remove_groups(const struct device_driver *drv, const struct attribute_group **groups); void device_driver_detach(struct device *dev); int devres_release_all(struct device *dev); |