From: "Rafael J. Wysocki" Subject: Re: [PATCH 2/3] tmio_mmc / PM: Use PM QoS requests, v2 Date: Wed, 7 Mar 2012 00:41:05 +0100 Message-ID: <201203070041.05773.rjw@sisk.pl> References: <201203040101.53177.rjw@sisk.pl> <201203062207.38583.rjw@sisk.pl> Mime-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Return-path: Received: from ogre.sisk.pl ([217.79.144.158]:58790 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756654Ab2CFXg7 (ORCPT ); Tue, 6 Mar 2012 18:36:59 -0500 In-Reply-To: Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: Guennadi Liakhovetski Cc: "linux-mmc@vger.kernel.org" , Linux PM list , Chris Ball , Ulf Hansson , Magnus Damm , Linus Walleij On Tuesday, March 06, 2012, Guennadi Liakhovetski wrote: > On Tue, 6 Mar 2012, Rafael J. Wysocki wrote: > > > On Tuesday, March 06, 2012, Guennadi Liakhovetski wrote: > > > On Sun, 4 Mar 2012, Rafael J. Wysocki wrote: > > > > > > > From: Rafael J. Wysocki > > > > > > > > Make tmio_mmc populate the pm_qos member of struct mmc_host, to > > > > let the core know that it should create the pm_latency_limit_ms > > > > host attribute for it, and set the default value of that attribute > > > > to 100 ms. > > > > > > > > Signed-off-by: Rafael J. Wysocki > > > > --- > > > > drivers/mmc/host/tmio_mmc_pio.c | 8 ++++++++ > > > > 1 file changed, 8 insertions(+) > > > > > > > > Index: linux/drivers/mmc/host/tmio_mmc_pio.c > > > > =================================================================== > > > > --- linux.orig/drivers/mmc/host/tmio_mmc_pio.c > > > > +++ linux/drivers/mmc/host/tmio_mmc_pio.c > > > > @@ -918,6 +918,12 @@ int __devinit tmio_mmc_host_probe(struct > > > > if (ret < 0) > > > > goto pm_disable; > > > > > > > > + mmc->pm_qos = kzalloc(sizeof(*mmc->pm_qos), GFP_KERNEL); > > > > > > Why don't you just add pm_qos to struct tmio_mmc_host? > > > > Because the core has to see it. > > Yes, I understand that. So, you just assign a pointer to it to > mmc->pm_qos, just avoiding an extra allocation / freeing / error handling. Well, I think this is a very minor point. I'm going to move the sysfs attribute creation to the PM core anyway. Thanks, Rafael