From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Rafael J. Wysocki" Subject: Re: suggestion on resumption Date: Fri, 27 Nov 2009 01:47:44 +0100 Message-ID: <200911270147.44837.rjw@sisk.pl> References: <200911262259.59152.oliver@neukum.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200911262259.59152.oliver@neukum.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: Oliver Neukum Cc: linux-pm@lists.linux-foundation.org List-Id: linux-pm@vger.kernel.org On Thursday 26 November 2009, Oliver Neukum wrote: > Hi, > > using the USB autosuspend framework I've often faced characteristic > problems coding resume() methods. This has led me to an idea. Resume() > would be much easier to code if I knew about the reason of resumption, > especially about the code path resume() is called in. I wonder whether > we could introduce a message argument to resume and give it a few > bits from the caller. Each of the callbacks in struct dev_pm_ops is executed in exactly one context, so for each of them it is known why it was called. Thanks, Rafael