diff options
Diffstat (limited to 'include/linux/usb.h')
| -rw-r--r-- | include/linux/usb.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/usb.h b/include/linux/usb.h index df3ba0f3b90e..a20b33d953aa 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -329,7 +329,7 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size) { int actual; actual = snprintf (buf, size, "usb-%s-%s", dev->bus->bus_name, dev->devpath); - return (actual >= size) ? -1 : actual; + return (actual >= (int)size) ? -1 : actual; } /*-------------------------------------------------------------------------*/ @@ -410,6 +410,8 @@ static inline int usb_make_path (struct usb_device *dev, char *buf, size_t size) * the "usbfs" filesystem. This lets devices provide ways to * expose information to user space regardless of where they * do (or don't) show up otherwise in the filesystem. + * @suspend: Called when the device is going to be suspended by the system. + * @resume: Called when the device is being resumed by the system. * @id_table: USB drivers use ID table to support hotplugging. * Export this with MODULE_DEVICE_TABLE(usb,...). This must be set * or your driver's probe function will never get called. @@ -445,6 +447,9 @@ struct usb_driver { int (*ioctl) (struct usb_interface *intf, unsigned int code, void *buf); + int (*suspend) (struct usb_interface *intf, u32 state); + int (*resume) (struct usb_interface *intf); + const struct usb_device_id *id_table; struct device_driver driver; |
