1USB_LOCK_DEVICE_FOR_(9)          USB Core APIs         USB_LOCK_DEVICE_FOR_(9)
2
3
4

NAME

6       usb_lock_device_for_reset - cautiously acquire the lock for a usb
7       device structure
8

SYNOPSIS

10       int usb_lock_device_for_reset(struct usb_device * udev,
11                                     const struct usb_interface * iface);
12

ARGUMENTS

14       udev
15           device that's being locked
16
17       iface
18           interface bound to the driver making the request (optional)
19

DESCRIPTION

21       Attempts to acquire the device lock, but fails if the device is
22       NOTATTACHED or SUSPENDED, or if iface is specified and the interface is
23       neither BINDING nor BOUND. Rather than sleeping to wait for the lock,
24       the routine polls repeatedly. This is to prevent deadlock with
25       disconnect; in some drivers (such as usb-storage) the disconnect or
26       suspend method will block waiting for a device reset to complete.
27

RETURN

29       A negative error code for failure, otherwise 0.
30
32Kernel Hackers Manual 3.10         June 2019           USB_LOCK_DEVICE_FOR_(9)
Impressum