[PATCH v2 12/24] serial: mpc512x: remove now obsolete clock lookup name
Gerhard Sittig
gsi at denx.de
Fri Jul 19 03:00:43 EST 2013
after device tree based clock lookup became available, the peripheral
driver need no longer construct clock names which include the PSC index,
remove the "psc%d_mclk" template and unconditionally use "mclk"
Signed-off-by: Gerhard Sittig <gsi at denx.de>
---
drivers/tty/serial/mpc52xx_uart.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/drivers/tty/serial/mpc52xx_uart.c b/drivers/tty/serial/mpc52xx_uart.c
index 98a1f43..8643dcf 100644
--- a/drivers/tty/serial/mpc52xx_uart.c
+++ b/drivers/tty/serial/mpc52xx_uart.c
@@ -623,14 +623,11 @@ static struct clk *psc_mclk_clk[MPC52xx_PSC_MAXNUM];
/* called from within the .request_port() callback (allocation) */
static int mpc512x_psc_alloc_clock(struct uart_port *port)
{
- int psc_num;
- char clk_name[16];
struct clk *clk;
int err;
+ int psc_num;
- psc_num = (port->mapbase & 0xf00) >> 8;
- snprintf(clk_name, sizeof(clk_name), "psc%d_mclk", psc_num);
- clk = clk_get(port->dev, clk_name);
+ clk = clk_get(port->dev, "mclk");
if (IS_ERR(clk)) {
dev_err(port->dev, "Failed to get MCLK!\n");
return PTR_ERR(clk);
@@ -641,6 +638,7 @@ static int mpc512x_psc_alloc_clock(struct uart_port *port)
clk_put(clk);
return err;
}
+ psc_num = (port->mapbase & 0xf00) >> 8;
psc_mclk_clk[psc_num] = clk;
return 0;
}
--
1.7.10.4
More information about the Linuxppc-dev
mailing list