From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alan Stern Subject: Re: [patch update] Re: Run-time PM idea (was: Re: [RFC][PATCH 0/2] PM: Rearrange core suspend code) Date: Fri, 12 Jun 2009 10:25:34 -0400 (EDT) Message-ID: References: <200906112143.57361.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <200906112143.57361.rjw@sisk.pl> 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: "Rafael J. Wysocki" Cc: ACPI Devel Maling List , Linux-pm mailing list , LKML List-Id: linux-pm@vger.kernel.org On Thu, 11 Jun 2009, Rafael J. Wysocki wrote: > > > > It might also be nice to make sure that the driver core autoresumes a > > > > device before probing it and autosuspends a device (after some > > > > reasonable delay) after unbinding its driver. > > > > > > Agreed. > > > > This is another case where a usage counter comes in handy. The driver > > core resumes the device and increments the counter -- thus preventing > > any unwanted autosuspends -- before making the probe and remove calls. > > I like this idea. > > BTW, where exactly the counter should be increased in that case? > > I thought of driver_probe_device(), but is it sufficient? Or is there a better > place? That's okay. Or you could put it in really_probe(). Either one. Alan Stern