driver core: make device_release_driver_internal() take a const *

Change device_release_driver_internal() to take a const struct
device_driver * as it is not modifying it at all.

Cc: Rafael J. Wysocki <rafael@kernel.org>
Link: https://lore.kernel.org/r/20240611130103.3262749-10-gregkh@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Greg Kroah-Hartman 2024-06-11 15:01:07 +02:00
parent 0725e8f9c4
commit 33ebea9bc0
2 changed files with 2 additions and 2 deletions

View File

@ -155,7 +155,7 @@ bool bus_is_registered(const struct bus_type *bus);
int bus_add_driver(struct device_driver *drv);
void bus_remove_driver(struct device_driver *drv);
void device_release_driver_internal(struct device *dev, struct device_driver *drv,
void device_release_driver_internal(struct device *dev, const struct device_driver *drv,
struct device *parent);
void driver_detach(struct device_driver *drv);

View File

@ -1284,7 +1284,7 @@ static void __device_release_driver(struct device *dev, struct device *parent)
}
void device_release_driver_internal(struct device *dev,
struct device_driver *drv,
const struct device_driver *drv,
struct device *parent)
{
__device_driver_lock(dev, parent);