Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1762220AbZFLOZl (ORCPT ); Fri, 12 Jun 2009 10:25:41 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1756291AbZFLOZd (ORCPT ); Fri, 12 Jun 2009 10:25:33 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:50715 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1753325AbZFLOZc (ORCPT ); Fri, 12 Jun 2009 10:25:32 -0400 Date: Fri, 12 Jun 2009 10:25:34 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: "Rafael J. Wysocki" cc: Oliver Neukum , Linux-pm mailing list , ACPI Devel Maling List , LKML Subject: Re: [patch update] Re: [linux-pm] Run-time PM idea (was: Re: [RFC][PATCH 0/2] PM: Rearrange core suspend code) In-Reply-To: <200906112143.57361.rjw@sisk.pl> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1014 Lines: 28 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 -- 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/