diff options
| author | Greg Kroah-Hartman <[email protected]> | 2023-01-11 11:30:08 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-01-27 12:45:38 +0000 |
| commit | a9b12f8b4e3309c4c25d39e7ab818943b9c48c1c (patch) | |
| tree | 5ef52a709f8a123ac3f1357f55e9d2c3725931ef /drivers/usb/core/usb.c | |
| parent | driver core: make struct device_type.uevent() take a const * (diff) | |
| download | kernel-a9b12f8b4e3309c4c25d39e7ab818943b9c48c1c.tar.gz kernel-a9b12f8b4e3309c4c25d39e7ab818943b9c48c1c.zip | |
driver core: make struct device_type.devnode() take a const *
The devnode() callback in struct device_type should not be modifying the
device that is passed into it, so mark it as a const * and propagate the
function signature changes out into all relevant subsystems that use
this callback.
Cc: Jens Axboe <[email protected]>
Cc: Alison Schofield <[email protected]>
Cc: Vishal Verma <[email protected]>
Cc: Ira Weiny <[email protected]>
Cc: Ben Widawsky <[email protected]>
Cc: Jeremy Kerr <[email protected]>
Cc: Joel Stanley <[email protected]>
Cc: Alistar Popple <[email protected]>
Cc: Eddie James <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Jilin Yuan <[email protected]>
Cc: Heikki Krogerus <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Andy Shevchenko <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Won Chung <[email protected]>
Acked-by: Dan Williams <[email protected]>
Acked-by: Alexander Shishkin <[email protected]>
Acked-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/core/usb.c')
| -rw-r--r-- | drivers/usb/core/usb.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/core/usb.c b/drivers/usb/core/usb.c index 8527c06b65e6..4df26f4f76e6 100644 --- a/drivers/usb/core/usb.c +++ b/drivers/usb/core/usb.c @@ -505,10 +505,10 @@ static const struct dev_pm_ops usb_device_pm_ops = { #endif /* CONFIG_PM */ -static char *usb_devnode(struct device *dev, +static char *usb_devnode(const struct device *dev, umode_t *mode, kuid_t *uid, kgid_t *gid) { - struct usb_device *usb_dev; + const struct usb_device *usb_dev; usb_dev = to_usb_device(dev); return kasprintf(GFP_KERNEL, "bus/usb/%03d/%03d", |
