From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kevin Hilman Subject: Re: [PATCH v3 5/6] OMAP: omap_device: Create a default omap_device_pm_latency Date: Tue, 27 Sep 2011 11:29:51 -0700 Message-ID: <87hb3xzvmo.fsf@ti.com> References: <1317143886-13285-1-git-send-email-b-cousson@ti.com> <1317143886-13285-6-git-send-email-b-cousson@ti.com> <20110927173048.GM6324@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from na3sys009aog118.obsmtp.com ([74.125.149.244]:43686 "EHLO na3sys009aog118.obsmtp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751678Ab1I0S34 (ORCPT ); Tue, 27 Sep 2011 14:29:56 -0400 Received: by qyk7 with SMTP id 7so8226726qyk.19 for ; Tue, 27 Sep 2011 11:29:55 -0700 (PDT) In-Reply-To: <20110927173048.GM6324@atomide.com> (Tony Lindgren's message of "Tue, 27 Sep 2011 10:30:48 -0700") Sender: linux-omap-owner@vger.kernel.org List-Id: linux-omap@vger.kernel.org To: Tony Lindgren Cc: Benoit Cousson , paul@pwsan.com, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Tony Lindgren writes: > * Benoit Cousson [110927 09:45]: >> Most devices are using the same default omap_device_pm_latency structure >> during device built. In order to avoid the duplication of the same >> structure everywhere, add a default structure that will be used if >> the device does not have an explicit one. >> >> Next patches will clean the duplicated structures. >> >> Signed-off-by: Benoit Cousson >> Cc: Kevin Hilman >> Cc: Paul Walmsley >> --- >> arch/arm/plat-omap/omap_device.c | 19 ++++++++++++++++++- >> 1 files changed, 18 insertions(+), 1 deletions(-) >> >> diff --git a/arch/arm/plat-omap/omap_device.c b/arch/arm/plat-omap/omap_device.c >> index f832f92..cd8d977 100644 >> --- a/arch/arm/plat-omap/omap_device.c >> +++ b/arch/arm/plat-omap/omap_device.c >> @@ -97,6 +97,14 @@ >> static int omap_device_register(struct platform_device *pdev); >> static int omap_early_device_register(struct platform_device *pdev); >> >> +static struct omap_device_pm_latency omap_default_latency[] = { >> + { >> + .deactivate_func = omap_device_idle_hwmods, >> + .activate_func = omap_device_enable_hwmods, >> + .flags = OMAP_DEVICE_LATENCY_AUTO_ADJUST, >> + } >> +}; >> + >> /* Private functions */ > > Isn't this racey between devices if the latency values get adjusted > automatically for each device? A copy of this is made for each device (uses kmemdup later in the patch.) Kevin