Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753289AbbDAMlc (ORCPT ); Wed, 1 Apr 2015 08:41:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:50971 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752695AbbDAMla (ORCPT ); Wed, 1 Apr 2015 08:41:30 -0400 Message-ID: <1427892050.30440.10.camel@suse.de> Subject: Re: [PATCH 6/6] USB / PM: Allow USB devices to remain runtime-suspended when sleeping From: Oliver Neukum To: Alan Stern Cc: Tomeu Vizoso , Linux-pm mailing list , Greg Kroah-Hartman , Scot Doyle , Dan Williams , Julius Werner , "Rafael J. Wysocki" , Pratyush Anand , Sebastian Andrzej Siewior , USB list , Kernel development list Date: Wed, 01 Apr 2015 14:40:50 +0200 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 821 Lines: 25 On Tue, 2015-03-31 at 13:09 -0400, Alan Stern wrote: > In other words, if the device is currently in runtime suspend with > remote wakeup enabled, but device_may_wakeup() returns 0 (so that the > device should be disabled for wakeup when the system goes into > suspend), then the prepare callback has to return 0. > > Therefore what you need to do here is something like this: > > struct usb_device *udev = to_usb_device(dev); > > /* Return 0 if the current wakeup setting is wrong, otherwise > 1 */ And the other way round? Regards Oliver -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/