diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-11 15:01:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-06-13 16:44:00 +0200 |
commit | c6c631d2b72b9390587cd1ee5b7905f8ea5bb1ea (patch) | |
tree | 84df0e34cad5497b93faea879244489d3bc1605c /drivers/base/base.h | |
parent | driver core: make driver_detach() take a const * (diff) | |
download | linux-c6c631d2b72b9390587cd1ee5b7905f8ea5bb1ea.tar.xz linux-c6c631d2b72b9390587cd1ee5b7905f8ea5bb1ea.zip |
driver core: mark async_driver as a const *
Within struct device_private, mark the async_driver * as const as it is
never modified. This requires some internal-to-the-driver-core
functions to also have their parameters marked as constant, and there is
one place where we cast _back_ from the const pointer to a real one, as
the driver core still wants to modify the structure in a number of
remaining places.
Cc: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20240611130103.3262749-12-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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/base/base.h b/drivers/base/base.h index 9df8028c3201..50151e7db796 100644 --- a/drivers/base/base.h +++ b/drivers/base/base.h @@ -112,7 +112,7 @@ struct device_private { struct klist_node knode_bus; struct klist_node knode_class; struct list_head deferred_probe; - struct device_driver *async_driver; + const struct device_driver *async_driver; char *deferred_probe_reason; struct device *device; u8 dead:1; |