linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tomasz.figa@gmail.com (Tomasz Figa)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 04/11] ARM: s3c64xx: pm: Use name field of generic_pm_domain
Date: Mon,  3 Mar 2014 17:02:09 +0100	[thread overview]
Message-ID: <1393862536-9842-5-git-send-email-tomasz.figa@gmail.com> (raw)
In-Reply-To: <1393862536-9842-1-git-send-email-tomasz.figa@gmail.com>

This patch removes name field from private s3c64xx_pm_domain struct and
moves domain name to dedicated field of generic_pm_domain struct.

Signed-off-by: Tomasz Figa <tomasz.figa@gmail.com>
---
 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 b5a6698..df4b7b2 100644
--- a/arch/arm/mach-s3c64xx/pm.c
+++ b/arch/arm/mach-s3c64xx/pm.c
@@ -36,7 +36,6 @@
 #include "regs-syscon-power.h"
 
 struct s3c64xx_pm_domain {
-	char *const name;
 	u32 ena;
 	u32 pwr_stat;
 	struct generic_pm_domain pd;
@@ -77,7 +76,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;
 		}
 	}
@@ -86,78 +85,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 = "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 = "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 = "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 = "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 = "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 = "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 = "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 = "V",
 		.power_off = s3c64xx_pd_off,
 		.power_on = s3c64xx_pd_on,
 	},
-- 
1.9.0

  parent reply	other threads:[~2014-03-03 16:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-03 16:02 [PATCH v2 00/11] Generic Device Tree based power domain look-up Tomasz Figa
2014-03-03 16:02 ` [PATCH v2 01/11] base: power: Add generic OF-based " Tomasz Figa
2014-03-04 18:23   ` Stephen Boyd
2014-03-05 11:53     ` Tomasz Figa
2014-03-05  4:24   ` Mark Brown
2014-03-05  6:41   ` Rob Herring
2014-03-05  7:19   ` Ulf Hansson
2014-03-05 11:47     ` Tomasz Figa
2014-03-05 12:44       ` Tomasz Figa
2014-03-05 18:37   ` Lorenzo Pieralisi
2014-03-14 23:07   ` Kevin Hilman
2014-03-19 23:13   ` Sören Brinkmann
2014-03-19 23:16     ` Tomasz Figa
2014-04-03 12:16   ` Ulf Hansson
2014-04-03 12:30     ` Tomasz Figa
2014-04-03 13:32       ` Ulf Hansson
2014-03-03 16:02 ` [PATCH v2 02/11] drivercore: Bind/unbind power domain on probe/remove Tomasz Figa
2014-03-04 18:29   ` Stephen Boyd
2014-03-04 19:17   ` Philipp Zabel
2014-03-05  4:26   ` Mark Brown
2014-03-05  7:22   ` Ulf Hansson
2014-03-03 16:02 ` [PATCH v2 03/11] ARM: exynos: Move to generic power domain bindings Tomasz Figa
2014-03-05 16:15   ` Bartlomiej Zolnierkiewicz
2014-03-05 16:20     ` Tomasz Figa
2014-03-07 13:04       ` Bartlomiej Zolnierkiewicz
2014-03-03 16:02 ` Tomasz Figa [this message]
2014-03-05  4:28   ` [PATCH v2 04/11] ARM: s3c64xx: pm: Use name field of generic_pm_domain Mark Brown
2014-03-03 16:02 ` [PATCH v2 05/11] ARM: s3c64xx: pm: Add always_on field to s3c64xx_pm_domain struct Tomasz Figa
2014-03-05  4:28   ` Mark Brown
2014-03-03 16:02 ` [PATCH v2 06/11] ARM: s3c64xx: pm: Add pwr_stat bit for domain G Tomasz Figa
2014-03-05  4:28   ` Mark Brown
2014-03-03 16:02 ` [PATCH v2 07/11] ARM: s3c64xx: pm: Add device tree based power domain instantiation Tomasz Figa
2014-03-05  4:29   ` Mark Brown
2014-03-03 16:02 ` [PATCH v2 08/11] ARM: s3c64xx: dt: Enable SoC-level power management Tomasz Figa
2014-03-05  4:30   ` Mark Brown
2014-03-03 16:02 ` [PATCH v2 09/11] ARM: dts: s3c64xx: Add nodes for power domains Tomasz Figa
2014-03-05  4:31   ` Mark Brown
2014-03-03 16:02 ` [PATCH v2 10/11] ARM: dts: s3c64xx: Add node for display controller Tomasz Figa
2014-03-03 16:02 ` [PATCH v2 11/11] ARM: dts: s3c6410-mini6410: Add support for LCD screen Tomasz Figa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1393862536-9842-5-git-send-email-tomasz.figa@gmail.com \
    --to=tomasz.figa@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).