summaryrefslogtreecommitdiffstats
path: root/drivers/base/dd.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-11 15:01:08 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-06-13 16:43:54 +0200
commitf6e98ef5f78a106821d451f9783dd96ba8551cb3 (patch)
tree21bdd382da44677f1f47dec91e3c7b94dc283bcc /drivers/base/dd.c
parentdriver core: make device_release_driver_internal() take a const * (diff)
downloadlinux-f6e98ef5f78a106821d451f9783dd96ba8551cb3.tar.xz
linux-f6e98ef5f78a106821d451f9783dd96ba8551cb3.zip
driver core: make driver_detach() take a const *
driver_detach() does not modify the driver itself, so make the pointer constant. In doing so, the function driver_allows_async_probing() also needs to be changed so that the pointer type passes through to that function properly. Cc: Rafael J. Wysocki <rafael@kernel.org> Link: https://lore.kernel.org/r/20240611130103.3262749-11-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to '')
-rw-r--r--drivers/base/dd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/base/dd.c b/drivers/base/dd.c
index c24eca917d41..76b26096b033 100644
--- a/drivers/base/dd.c
+++ b/drivers/base/dd.c
@@ -863,7 +863,7 @@ static int __init save_async_options(char *buf)
}
__setup("driver_async_probe=", save_async_options);
-static bool driver_allows_async_probing(struct device_driver *drv)
+static bool driver_allows_async_probing(const struct device_driver *drv)
{
switch (drv->probe_type) {
case PROBE_PREFER_ASYNCHRONOUS:
@@ -1333,7 +1333,7 @@ void device_driver_detach(struct device *dev)
* driver_detach - detach driver from all devices it controls.
* @drv: driver.
*/
-void driver_detach(struct device_driver *drv)
+void driver_detach(const struct device_driver *drv)
{
struct device_private *dev_prv;
struct device *dev;