Skip to content

Commit 33ebea9

Browse files
committed
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 0725e8f commit 33ebea9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/base/base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ bool bus_is_registered(const struct bus_type *bus);
155155

156156
int bus_add_driver(struct device_driver *drv);
157157
void bus_remove_driver(struct device_driver *drv);
158-
void device_release_driver_internal(struct device *dev, struct device_driver *drv,
158+
void device_release_driver_internal(struct device *dev, const struct device_driver *drv,
159159
struct device *parent);
160160

161161
void driver_detach(struct device_driver *drv);

drivers/base/dd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1284,7 +1284,7 @@ static void __device_release_driver(struct device *dev, struct device *parent)
12841284
}
12851285

12861286
void device_release_driver_internal(struct device *dev,
1287-
struct device_driver *drv,
1287+
const struct device_driver *drv,
12881288
struct device *parent)
12891289
{
12901290
__device_driver_lock(dev, parent);

0 commit comments

Comments
 (0)