usb_trylock_device

Name

usb_trylock_device --  attempt to acquire the lock for a usb device structure

Synopsis

int usb_trylock_device (struct usb_device * udev);

Arguments

udev

device that's being locked

Description

Don't use this routine if you already hold a device lock; use down_trylock(&udev->serialize) instead. This is necessary for proper interaction with usb_lock_all_devices.

Returns 1 if successful, 0 if contention.