summaryrefslogtreecommitdiff
path: root/include/linux/usb.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-01 18:51:28 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-20 12:11:56 +0200
commit5033ac5c580cb22245a0c2b9e53d508e8fdd50d8 (patch)
tree30e9e44b7d65a35852e162addfaa14b64795079e /include/linux/usb.h
parent593efa4091f5f05c224f8b7fd204d18dbff97e31 (diff)
USB: make devnode() callback in usb_class_driver take a const *
With the changes to the driver core to make more pointers const, the USB subsystem also needs to be modified to take a const * for the devnode callback so that the driver core's constant pointer will also be properly propagated. Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com> Cc: Juergen Stuber <starblue@users.sourceforge.net> Reviewed-by: Johan Hovold <johan@kernel.org> Acked-by: Pete Zaitcev <zaitcev@redhat.com> Reviewed-by: Jiri Kosina <jkosina@suse.cz> Link: https://lore.kernel.org/r/20221001165128.2688526-1-gregkh@linuxfoundation.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb.h')
-rw-r--r--include/linux/usb.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h
index 3a55131e0ad4..4b463a5e4ba2 100644
--- a/include/linux/usb.h
+++ b/include/linux/usb.h
@@ -1321,7 +1321,7 @@ struct usb_device_driver {
*/
struct usb_class_driver {
char *name;
- char *(*devnode)(struct device *dev, umode_t *mode);
+ char *(*devnode)(const struct device *dev, umode_t *mode);
const struct file_operations *fops;
int minor_base;
};