From: Oliver Neukum <oneukum@suse.de>
To: Jagdish Gedia <jvgediya@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: Check if usb device is suspended
Date: Fri, 21 Mar 2014 14:22:20 +0100 [thread overview]
Message-ID: <1395408140.9455.1.camel@linux-fkkt.site> (raw)
In-Reply-To: <CAOAoqGuiBrg_tYhdNXd3r48YC9KQ5GNm7jrV4ttNiMjNkrCKRA@mail.gmail.com>
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
prev parent reply other threads:[~2014-03-21 13:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-13 11:43 Jagdish Gedia
2014-03-13 13:05 ` Oliver Neukum
2014-03-13 14:20 ` Alan Stern
2014-03-21 11:47 ` Jagdish Gedia
2014-03-21 13:22 ` Oliver Neukum [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1395408140.9455.1.camel@linux-fkkt.site \
--to=oneukum@suse.de \
--cc=jvgediya@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®