Messages in this thread | | | Subject | Re: Check if usb device is suspended | From | Oliver Neukum <> | Date | Fri, 21 Mar 2014 14:22:20 +0100 |
| |
On Fri, 2014-03-21 at 17:17 +0530, Jagdish Gedia wrote: > I want to resume the usb device on some event, so i want to check if > it is suspended. I think by above method i can check if the device is > already suspended, but may be i will miss to resume the device if it > is suspending. Is there any way through which i can check if device is > suspending?
Just don't do that. If a device needs to be awake for some operation, call usb_autopm_get(). If the device is already awake, it is a nop besides keeping the device awake. Checking is not a sensible strategy.
Regards Oliver
| |