Linux-USB Archive on lore.kernel.org
 help / color / Atom feed
From: Oliver Neukum <oneukum@suse.com>
To: Alan Stern <stern@rowland.harvard.edu>, Greg KH <greg@kroah.com>,
	Mayuresh Kulkarni <mkulkarni@opensource.cirrus.com>
Cc: USB list <linux-usb@vger.kernel.org>
Subject: Re: [PATCH] usbfs: Add ioctls for runtime power management
Date: Wed, 07 Aug 2019 09:37:45 +0200
Message-ID: <1565163465.8136.36.camel@suse.com> (raw)
In-Reply-To: <Pine.LNX.4.44L0.1908061542140.1571-100000@iolanthe.rowland.org>

Am Dienstag, den 06.08.2019, 15:46 -0400 schrieb Alan Stern:
> +static int proc_wait_for_resume(struct usb_dev_state *ps)
> +{
> +       int ret;
> +
> +       usb_unlock_device(ps->dev);
> +       ret = wait_event_interruptible(ps->wait_for_resume,
> +                       READ_ONCE(ps->not_yet_resumed) == 0);
> +       usb_lock_device(ps->dev);
> +
> +       if (ret != 0)
> +               return ret;
> +       return proc_forbid_suspend(ps);

One nitpick, this seems to return raw -ERESTARTSYS in the interrupt
case. Should it?

	Regards
		Oliver


  reply index

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-06 19:46 Alan Stern
2019-08-07  7:37 ` Oliver Neukum [this message]
2019-08-07 14:29   ` [PATCH v2] " Alan Stern
2019-08-08 15:37     ` Greg KH

Reply instructions:

You may reply publically 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=1565163465.8136.36.camel@suse.com \
    --to=oneukum@suse.com \
    --cc=greg@kroah.com \
    --cc=linux-usb@vger.kernel.org \
    --cc=mkulkarni@opensource.cirrus.com \
    --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

Linux-USB Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-usb/0 linux-usb/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-usb linux-usb/ https://lore.kernel.org/linux-usb \
		linux-usb@vger.kernel.org linux-usb@archiver.kernel.org
	public-inbox-index linux-usb

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-usb


AGPL code for this site: git clone https://public-inbox.org/ public-inbox