From patchwork Sat Jan 11 19:42:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 3469761 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 066AE9F39C for ; Sat, 11 Jan 2014 19:43:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 345AF2015A for ; Sat, 11 Jan 2014 19:43:54 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A775820170 for ; Sat, 11 Jan 2014 19:43:52 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W24T9-0000zU-OZ; Sat, 11 Jan 2014 19:43:43 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W24T7-0000Si-2v; Sat, 11 Jan 2014 19:43:41 +0000 Received: from mail-ee0-x22b.google.com ([2a00:1450:4013:c00::22b]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W24T3-0000PD-LI for linux-arm-kernel@lists.infradead.org; Sat, 11 Jan 2014 19:43:39 +0000 Received: by mail-ee0-f43.google.com with SMTP id c13so2439937eek.16 for ; Sat, 11 Jan 2014 11:43:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=iVo6y7T1jJh+uFFv1FUUNIDqRZU39MVzFLP2K9nK2Ns=; b=0lpDGjdjve98l49Q6sr1f+ZfoRuA2O3RN6kg6WTMMDYmjTW6IzRILxr2AGBR5wv7I+ jbrQljLv7JIZxtyq2yRfQbGR9xS2Ob/9frClPt1S/Rry50Zyoj978yjpc0Wdoa63Tcgx fjG/JzE5DcbJDCE73CxKiZZTwo4wZOpHbOYAOEnPtbd+q+iyKTfM+HjpVg+x1WL7XBZo INr7PBZYExmVS0IFCBB2+F8oWh1atW3c2AeY6wIpluCX4IkmLB6m09E8NR2BdJvpQMXv pNJ9e3k94ojDjdcnYHq3Zeecb0xwRbaJud1cO/jzHFog95NbwChX/xgde0LGheVdpqFQ HZ7g== X-Received: by 10.14.179.130 with SMTP id h2mr17885421eem.34.1389469393495; Sat, 11 Jan 2014 11:43:13 -0800 (PST) Received: from flatron.tomeq (87-207-52-162.dynamic.chello.pl. [87.207.52.162]) by mx.google.com with ESMTPSA id e3sm25312484eeg.11.2014.01.11.11.43.11 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Jan 2014 11:43:13 -0800 (PST) From: Tomasz Figa To: linux-pm@vger.kernel.org Subject: [PATCH RFC 01/10] ARM: s3c64xx: pm: Use name field of generic_pm_domain Date: Sat, 11 Jan 2014 20:42:43 +0100 Message-Id: <1389469372-17199-2-git-send-email-tomasz.figa@gmail.com> X-Mailer: git-send-email 1.8.5.2 In-Reply-To: <1389469372-17199-1-git-send-email-tomasz.figa@gmail.com> References: <1389469372-17199-1-git-send-email-tomasz.figa@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140111_144337_930507_E0F90AA1 X-CRM114-Status: GOOD ( 10.83 ) X-Spam-Score: -2.0 (--) Cc: Mark Rutland , devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Russell King , Pawel Moll , Len Brown , Greg Kroah-Hartman , Tomasz Figa , Ian Campbell , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, Rob Herring , Tomasz Figa , Bartlomiej Zolnierkiewicz , Kukjin Kim , Pavel Machek , Kumar Gala , Stephen Warren , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch removes name field from private s3c64xx_pm_domain struct and moves domain name to dedicated field of generic_pm_domain struct. When at it, beautify the names a bit, since they are used by genpd core as message prefixes. Signed-off-by: Tomasz Figa --- arch/arm/mach-s3c64xx/pm.c | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/arch/arm/mach-s3c64xx/pm.c b/arch/arm/mach-s3c64xx/pm.c index 8cdb824..5238d66 100644 --- a/arch/arm/mach-s3c64xx/pm.c +++ b/arch/arm/mach-s3c64xx/pm.c @@ -35,7 +35,6 @@ #include "regs-syscon-power.h" struct s3c64xx_pm_domain { - char *const name; u32 ena; u32 pwr_stat; struct generic_pm_domain pd; @@ -76,7 +75,7 @@ static int s3c64xx_pd_on(struct generic_pm_domain *domain) } while (retry--); if (!retry) { - pr_err("Failed to start domain %s\n", pd->name); + pr_err("Failed to start domain %s\n", pd->pd.name); return -EBUSY; } } @@ -85,78 +84,78 @@ static int s3c64xx_pd_on(struct generic_pm_domain *domain) } static struct s3c64xx_pm_domain s3c64xx_pm_irom = { - .name = "IROM", .ena = S3C64XX_NORMALCFG_IROM_ON, .pd = { + .name = "domain_irom", .power_off = s3c64xx_pd_off, .power_on = s3c64xx_pd_on, }, }; static struct s3c64xx_pm_domain s3c64xx_pm_etm = { - .name = "ETM", .ena = S3C64XX_NORMALCFG_DOMAIN_ETM_ON, .pwr_stat = S3C64XX_BLKPWRSTAT_ETM, .pd = { + .name = "domain_etm", .power_off = s3c64xx_pd_off, .power_on = s3c64xx_pd_on, }, }; static struct s3c64xx_pm_domain s3c64xx_pm_s = { - .name = "S", .ena = S3C64XX_NORMALCFG_DOMAIN_S_ON, .pwr_stat = S3C64XX_BLKPWRSTAT_S, .pd = { + .name = "domain_s", .power_off = s3c64xx_pd_off, .power_on = s3c64xx_pd_on, }, }; static struct s3c64xx_pm_domain s3c64xx_pm_f = { - .name = "F", .ena = S3C64XX_NORMALCFG_DOMAIN_F_ON, .pwr_stat = S3C64XX_BLKPWRSTAT_F, .pd = { + .name = "domain_f", .power_off = s3c64xx_pd_off, .power_on = s3c64xx_pd_on, }, }; static struct s3c64xx_pm_domain s3c64xx_pm_p = { - .name = "P", .ena = S3C64XX_NORMALCFG_DOMAIN_P_ON, .pwr_stat = S3C64XX_BLKPWRSTAT_P, .pd = { + .name = "domain_p", .power_off = s3c64xx_pd_off, .power_on = s3c64xx_pd_on, }, }; static struct s3c64xx_pm_domain s3c64xx_pm_i = { - .name = "I", .ena = S3C64XX_NORMALCFG_DOMAIN_I_ON, .pwr_stat = S3C64XX_BLKPWRSTAT_I, .pd = { + .name = "domain_i", .power_off = s3c64xx_pd_off, .power_on = s3c64xx_pd_on, }, }; static struct s3c64xx_pm_domain s3c64xx_pm_g = { - .name = "G", .ena = S3C64XX_NORMALCFG_DOMAIN_G_ON, .pd = { + .name = "domain_g", .power_off = s3c64xx_pd_off, .power_on = s3c64xx_pd_on, }, }; static struct s3c64xx_pm_domain s3c64xx_pm_v = { - .name = "V", .ena = S3C64XX_NORMALCFG_DOMAIN_V_ON, .pwr_stat = S3C64XX_BLKPWRSTAT_V, .pd = { + .name = "domain_v", .power_off = s3c64xx_pd_off, .power_on = s3c64xx_pd_on, },