Re: [PATCH 2/3] ARM: EXYNOS: pm_domain: Fix power domain name initialization
On 6 September 2012 15:08, Tomasz Figa t.f...@samsung.com wrote: This patch adds initialization of name field in generic power domain struct. Signed-off-by: Tomasz Figa t.f...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- arch/arm/mach-exynos/pm_domains.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index d1abc1a..5b7ce7e 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c @@ -98,7 +98,8 @@ static __init int exynos_pm_dt_parse_domains(void) return -ENOMEM; } - pd-name = np-name; + pd-pd.name = kstrdup(np-name, GFP_KERNEL); + pd-name = pd-pd.name; Since device tree blob is always resident, why not just use np-name instead of copying it to a new place? pd-base = of_iomap(np, 0); pd-pd.power_off = exynos_pd_power_off; pd-pd.power_on = exynos_pd_power_on; -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] ARM: EXYNOS: pm_domain: Fix power domain name initialization
Hi Thomas, On Saturday 08 of September 2012 13:37:59 Thomas Abraham wrote: - pd-name = np-name; + pd-pd.name = kstrdup(np-name, GFP_KERNEL); + pd-name = pd-pd.name; Since device tree blob is always resident, why not just use np-name instead of copying it to a new place? The problem is that np-name is const, while pd-pd.name is not. -- Best regards, Tomasz Figa -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/3] ARM: EXYNOS: pm_domain: Fix power domain name initialization
This patch adds initialization of name field in generic power domain struct. Signed-off-by: Tomasz Figa t.f...@samsung.com Signed-off-by: Kyungmin Park kyungmin.p...@samsung.com --- arch/arm/mach-exynos/pm_domains.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-exynos/pm_domains.c b/arch/arm/mach-exynos/pm_domains.c index d1abc1a..5b7ce7e 100644 --- a/arch/arm/mach-exynos/pm_domains.c +++ b/arch/arm/mach-exynos/pm_domains.c @@ -98,7 +98,8 @@ static __init int exynos_pm_dt_parse_domains(void) return -ENOMEM; } - pd-name = np-name; + pd-pd.name = kstrdup(np-name, GFP_KERNEL); + pd-name = pd-pd.name; pd-base = of_iomap(np, 0); pd-pd.power_off = exynos_pd_power_off; pd-pd.power_on = exynos_pd_power_on; -- 1.7.12 -- To unsubscribe from this list: send the line unsubscribe linux-samsung-soc in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html