diff options
| author | Greg Kroah-Hartman <[email protected]> | 2024-06-14 11:41:02 +0200 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2024-06-20 12:51:42 +0200 |
| commit | 269e974e664207cc45f83b579565ba73de1b75dc (patch) | |
| tree | f93c01cfea166488d18b6b52708026118fd52f7f /include/linux | |
| parent | 2f3cfd2f4b7cf3026fe6b9b2a5320cc18f4c184e (diff) | |
driver core: make [device_]driver_attach take a const *
Change device_driver_attach() and driver_attach() to take a const * to
struct device driver as neither of them modify the structure at all.
Also, for some odd reason, drivers/dma/idxd/compat.c had a duplicate
external reference to device_driver_attach(), so remove that to fix up
the build, it should never have had that there in the first place.
Cc: Rafael J. Wysocki <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Dave Jiang <[email protected]>
Cc: Vinod Koul <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Petr Tesarik <[email protected]>
Cc: Alexander Lobakin <[email protected]>
Cc: [email protected]
Link: https://lore.kernel.org/r/2024061401-rasping-manger-c385@gregkh
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/device.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 3a630942f358..34eb20f5966f 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1177,12 +1177,12 @@ static inline void *dev_get_platdata(const struct device *dev) * Manual binding of a device to driver. See drivers/base/bus.c * for information on use. */ -int __must_check device_driver_attach(struct device_driver *drv, +int __must_check device_driver_attach(const struct device_driver *drv, struct device *dev); int __must_check device_bind_driver(struct device *dev); void device_release_driver(struct device *dev); int __must_check device_attach(struct device *dev); -int __must_check driver_attach(struct device_driver *drv); +int __must_check driver_attach(const struct device_driver *drv); void device_initial_probe(struct device *dev); int __must_check device_reprobe(struct device *dev); |