diff options
author | Dmitry Eremin-Solenikov <dbaryshkov@gmail.com> | 2009-03-05 10:17:53 -0500 |
---|---|---|
committer | Eric Miao <eric.miao@marvell.com> | 2009-03-19 04:20:39 -0400 |
commit | c68ffddabcaaa64c6ea681d2944cbda50a8654ea (patch) | |
tree | 902543d60f5731206b4aaa0a58be7d17a6b06881 /arch | |
parent | d1b95607e1dde59e2ffae661732c8da34aba445c (diff) |
[ARM] pxa: make second argument of clk_add_alias a name instead of the device
clk_add_alias is commonly called for platform devices that are not yet
registered in the device tree. Thus the clock alias is associated with
NULL device name. Fix this by passing the device name instead of just
device pointer.
Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-pxa/clock.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/clock.h | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/e740.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/e750.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/e800.c | 2 | ||||
-rw-r--r-- | arch/arm/mach-pxa/tosa.c | 2 |
6 files changed, 7 insertions, 7 deletions
diff --git a/arch/arm/mach-pxa/clock.c b/arch/arm/mach-pxa/clock.c index 40b774084514..db52d2c4791d 100644 --- a/arch/arm/mach-pxa/clock.c +++ b/arch/arm/mach-pxa/clock.c | |||
@@ -87,7 +87,7 @@ void clks_register(struct clk_lookup *clks, size_t num) | |||
87 | clkdev_add(&clks[i]); | 87 | clkdev_add(&clks[i]); |
88 | } | 88 | } |
89 | 89 | ||
90 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, | 90 | int clk_add_alias(const char *alias, const char *alias_dev_name, char *id, |
91 | struct device *dev) | 91 | struct device *dev) |
92 | { | 92 | { |
93 | struct clk *r = clk_get(dev, id); | 93 | struct clk *r = clk_get(dev, id); |
@@ -96,7 +96,7 @@ int clk_add_alias(char *alias, struct device *alias_dev, char *id, | |||
96 | if (!r) | 96 | if (!r) |
97 | return -ENODEV; | 97 | return -ENODEV; |
98 | 98 | ||
99 | l = clkdev_alloc(r, alias, alias_dev ? dev_name(alias_dev) : NULL); | 99 | l = clkdev_alloc(r, alias, alias_dev_name); |
100 | clk_put(r); | 100 | clk_put(r); |
101 | if (!l) | 101 | if (!l) |
102 | return -ENODEV; | 102 | return -ENODEV; |
diff --git a/arch/arm/mach-pxa/clock.h b/arch/arm/mach-pxa/clock.h index 4e9c613c6767..5599bceff738 100644 --- a/arch/arm/mach-pxa/clock.h +++ b/arch/arm/mach-pxa/clock.h | |||
@@ -69,6 +69,6 @@ extern void clk_pxa3xx_cken_disable(struct clk *); | |||
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | void clks_register(struct clk_lookup *clks, size_t num); | 71 | void clks_register(struct clk_lookup *clks, size_t num); |
72 | int clk_add_alias(char *alias, struct device *alias_dev, char *id, | 72 | int clk_add_alias(const char *alias, const char *alias_name, char *id, |
73 | struct device *dev); | 73 | struct device *dev); |
74 | 74 | ||
diff --git a/arch/arm/mach-pxa/e740.c b/arch/arm/mach-pxa/e740.c index 6d48e00f4f0b..f2402f669b56 100644 --- a/arch/arm/mach-pxa/e740.c +++ b/arch/arm/mach-pxa/e740.c | |||
@@ -189,7 +189,7 @@ static void __init e740_init(void) | |||
189 | { | 189 | { |
190 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); | 190 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config)); |
191 | eseries_register_clks(); | 191 | eseries_register_clks(); |
192 | clk_add_alias("CLK_CK48M", &e740_t7l66xb_device.dev, | 192 | clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name, |
193 | "UDCCLK", &pxa25x_device_udc.dev), | 193 | "UDCCLK", &pxa25x_device_udc.dev), |
194 | eseries_get_tmio_gpios(); | 194 | eseries_get_tmio_gpios(); |
195 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 195 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-pxa/e750.c b/arch/arm/mach-pxa/e750.c index be1ab8edb973..1379f9ad66a7 100644 --- a/arch/arm/mach-pxa/e750.c +++ b/arch/arm/mach-pxa/e750.c | |||
@@ -190,7 +190,7 @@ static struct platform_device *devices[] __initdata = { | |||
190 | static void __init e750_init(void) | 190 | static void __init e750_init(void) |
191 | { | 191 | { |
192 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config)); | 192 | pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config)); |
193 | clk_add_alias("CLK_CK3P6MI", &e750_tc6393xb_device.dev, | 193 | clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name, |
194 | "GPIO11_CLK", NULL), | 194 | "GPIO11_CLK", NULL), |
195 | eseries_get_tmio_gpios(); | 195 | eseries_get_tmio_gpios(); |
196 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 196 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-pxa/e800.c b/arch/arm/mach-pxa/e800.c index cc9b1293e866..0cc0062ea836 100644 --- a/arch/arm/mach-pxa/e800.c +++ b/arch/arm/mach-pxa/e800.c | |||
@@ -196,7 +196,7 @@ static struct platform_device *devices[] __initdata = { | |||
196 | 196 | ||
197 | static void __init e800_init(void) | 197 | static void __init e800_init(void) |
198 | { | 198 | { |
199 | clk_add_alias("CLK_CK3P6MI", &e800_tc6393xb_device.dev, | 199 | clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name, |
200 | "GPIO11_CLK", NULL), | 200 | "GPIO11_CLK", NULL), |
201 | eseries_get_tmio_gpios(); | 201 | eseries_get_tmio_gpios(); |
202 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 202 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
diff --git a/arch/arm/mach-pxa/tosa.c b/arch/arm/mach-pxa/tosa.c index 3332e5d0356c..3fe137fc72d2 100644 --- a/arch/arm/mach-pxa/tosa.c +++ b/arch/arm/mach-pxa/tosa.c | |||
@@ -919,7 +919,7 @@ static void __init tosa_init(void) | |||
919 | pxa2xx_set_spi_info(2, &pxa_ssp_master_info); | 919 | pxa2xx_set_spi_info(2, &pxa_ssp_master_info); |
920 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); | 920 | spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info)); |
921 | 921 | ||
922 | clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL); | 922 | clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL); |
923 | 923 | ||
924 | platform_add_devices(devices, ARRAY_SIZE(devices)); | 924 | platform_add_devices(devices, ARRAY_SIZE(devices)); |
925 | } | 925 | } |