Skip to content

Commit

Permalink
[ARM] pxa: make second argument of clk_add_alias a name instead of th…
Browse files Browse the repository at this point in the history
…e 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>
  • Loading branch information
Dmitry Eremin-Solenikov authored and Eric Miao committed Mar 19, 2009
1 parent d1b9560 commit c68ffdd
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions arch/arm/mach-pxa/clock.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ void clks_register(struct clk_lookup *clks, size_t num)
clkdev_add(&clks[i]);
}

int clk_add_alias(char *alias, struct device *alias_dev, char *id,
int clk_add_alias(const char *alias, const char *alias_dev_name, char *id,
struct device *dev)
{
struct clk *r = clk_get(dev, id);
Expand All @@ -96,7 +96,7 @@ int clk_add_alias(char *alias, struct device *alias_dev, char *id,
if (!r)
return -ENODEV;

l = clkdev_alloc(r, alias, alias_dev ? dev_name(alias_dev) : NULL);
l = clkdev_alloc(r, alias, alias_dev_name);
clk_put(r);
if (!l)
return -ENODEV;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,6 @@ extern void clk_pxa3xx_cken_disable(struct clk *);
#endif

void clks_register(struct clk_lookup *clks, size_t num);
int clk_add_alias(char *alias, struct device *alias_dev, char *id,
int clk_add_alias(const char *alias, const char *alias_name, char *id,
struct device *dev);

2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/e740.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ static void __init e740_init(void)
{
pxa2xx_mfp_config(ARRAY_AND_SIZE(e740_pin_config));
eseries_register_clks();
clk_add_alias("CLK_CK48M", &e740_t7l66xb_device.dev,
clk_add_alias("CLK_CK48M", e740_t7l66xb_device.name,
"UDCCLK", &pxa25x_device_udc.dev),
eseries_get_tmio_gpios();
platform_add_devices(devices, ARRAY_SIZE(devices));
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/e750.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ static struct platform_device *devices[] __initdata = {
static void __init e750_init(void)
{
pxa2xx_mfp_config(ARRAY_AND_SIZE(e750_pin_config));
clk_add_alias("CLK_CK3P6MI", &e750_tc6393xb_device.dev,
clk_add_alias("CLK_CK3P6MI", e750_tc6393xb_device.name,
"GPIO11_CLK", NULL),
eseries_get_tmio_gpios();
platform_add_devices(devices, ARRAY_SIZE(devices));
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/e800.c
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ static struct platform_device *devices[] __initdata = {

static void __init e800_init(void)
{
clk_add_alias("CLK_CK3P6MI", &e800_tc6393xb_device.dev,
clk_add_alias("CLK_CK3P6MI", e800_tc6393xb_device.name,
"GPIO11_CLK", NULL),
eseries_get_tmio_gpios();
platform_add_devices(devices, ARRAY_SIZE(devices));
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-pxa/tosa.c
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ static void __init tosa_init(void)
pxa2xx_set_spi_info(2, &pxa_ssp_master_info);
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));

clk_add_alias("CLK_CK3P6MI", &tc6393xb_device.dev, "GPIO11_CLK", NULL);
clk_add_alias("CLK_CK3P6MI", tc6393xb_device.name, "GPIO11_CLK", NULL);

platform_add_devices(devices, ARRAY_SIZE(devices));
}
Expand Down

0 comments on commit c68ffdd

Please sign in to comment.