From patchwork Wed Jul 13 21:54:18 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rafael Wysocki X-Patchwork-Id: 973562 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p6DLuRO4024779 for ; Wed, 13 Jul 2011 21:56:28 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752082Ab1GMV4E (ORCPT ); Wed, 13 Jul 2011 17:56:04 -0400 Received: from ogre.sisk.pl ([217.79.144.158]:52448 "EHLO ogre.sisk.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751648Ab1GMV4C (ORCPT ); Wed, 13 Jul 2011 17:56:02 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by ogre.sisk.pl (Postfix) with ESMTP id 1C6541B54E4; Wed, 13 Jul 2011 23:28:30 +0200 (CEST) Received: from ogre.sisk.pl ([127.0.0.1]) by localhost (ogre.sisk.pl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 03738-06; Wed, 13 Jul 2011 23:28:02 +0200 (CEST) Received: from ferrari.rjw.lan (220-bem-13.acn.waw.pl [82.210.184.220]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ogre.sisk.pl (Postfix) with ESMTP id 1C2D41B54E6; Wed, 13 Jul 2011 23:28:02 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux PM mailing list Subject: [PATCH 1/3] ARM / shmobile: Use genpd_queue_power_off_work() Date: Wed, 13 Jul 2011 23:54:18 +0200 User-Agent: KMail/1.13.6 (Linux/3.0.0-rc7+; KDE/4.6.0; x86_64; ; ) Cc: LKML , Paul Mundt , Magnus Damm , linux-sh@vger.kernel.org References: <201107132352.59801.rjw@sisk.pl> In-Reply-To: <201107132352.59801.rjw@sisk.pl> MIME-Version: 1.0 Message-Id: <201107132354.18324.rjw@sisk.pl> X-Virus-Scanned: amavisd-new at ogre.sisk.pl using MkS_Vir for Linux Sender: linux-sh-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 13 Jul 2011 21:56:28 +0000 (UTC) From: Rafael J. Wysocki Make pd_power_down_a3rv() use genpd_queue_power_off_work() to queue up the powering off of the A4LC domain to avoid queuing it up when it is pending. Signed-off-by: Rafael J. Wysocki --- arch/arm/mach-shmobile/pm-sh7372.c | 2 +- drivers/base/power/domain.c | 2 +- include/linux/pm_domain.h | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Index: linux-2.6/arch/arm/mach-shmobile/pm-sh7372.c =================================================================== --- linux-2.6.orig/arch/arm/mach-shmobile/pm-sh7372.c +++ linux-2.6/arch/arm/mach-shmobile/pm-sh7372.c @@ -107,7 +107,7 @@ static int pd_power_down_a3rv(struct gen /* try to power down A4LC after A3RV is requested off */ pm_genpd_poweron(&sh7372_a4lc.genpd); - queue_work(pm_wq, &sh7372_a4lc.genpd.power_off_work); + genpd_queue_power_off_work(&sh7372_a4lc.genpd); return ret; } Index: linux-2.6/drivers/base/power/domain.c =================================================================== --- linux-2.6.orig/drivers/base/power/domain.c +++ linux-2.6/drivers/base/power/domain.c @@ -222,7 +222,7 @@ static bool genpd_abort_poweroff(struct * Queue up the execution of pm_genpd_poweroff() unless it's already been done * before. */ -static void genpd_queue_power_off_work(struct generic_pm_domain *genpd) +void genpd_queue_power_off_work(struct generic_pm_domain *genpd) { if (!work_pending(&genpd->power_off_work)) queue_work(pm_wq, &genpd->power_off_work); Index: linux-2.6/include/linux/pm_domain.h =================================================================== --- linux-2.6.orig/include/linux/pm_domain.h +++ linux-2.6/include/linux/pm_domain.h @@ -73,6 +73,7 @@ extern void pm_genpd_init(struct generic struct dev_power_governor *gov, bool is_off); extern int pm_genpd_poweron(struct generic_pm_domain *genpd); extern void pm_genpd_poweroff_unused(void); +extern void genpd_queue_power_off_work(struct generic_pm_domain *genpd); #else static inline int pm_genpd_add_device(struct generic_pm_domain *genpd, struct device *dev) @@ -101,6 +102,7 @@ static inline int pm_genpd_poweron(struc return -ENOSYS; } static inline void pm_genpd_poweroff_unused(void) {} +static inline void genpd_queue_power_off_work(struct generic_pm_domain *gpd) {} #endif #endif /* _LINUX_PM_DOMAIN_H */