Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

+3 -3
+1 -1
drivers/base/base.h
··· 158 158 void device_release_driver_internal(struct device *dev, const struct device_driver *drv, 159 159 struct device *parent); 160 160 161 - void driver_detach(struct device_driver *drv); 161 + void driver_detach(const struct device_driver *drv); 162 162 void driver_deferred_probe_del(struct device *dev); 163 163 void device_set_deferred_probe_reason(const struct device *dev, struct va_format *vaf); 164 164 static inline int driver_match_device(struct device_driver *drv,
+2 -2
drivers/base/dd.c
··· 863 863 } 864 864 __setup("driver_async_probe=", save_async_options); 865 865 866 - static bool driver_allows_async_probing(struct device_driver *drv) 866 + static bool driver_allows_async_probing(const struct device_driver *drv) 867 867 { 868 868 switch (drv->probe_type) { 869 869 case PROBE_PREFER_ASYNCHRONOUS: ··· 1333 1333 * driver_detach - detach driver from all devices it controls. 1334 1334 * @drv: driver. 1335 1335 */ 1336 - void driver_detach(struct device_driver *drv) 1336 + void driver_detach(const struct device_driver *drv) 1337 1337 { 1338 1338 struct device_private *dev_prv; 1339 1339 struct device *dev;