linux-serial.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] tty: serial: vt8500: Fix clock code in probe
@ 2013-03-09  5:44 Tony Prisk
  2013-03-09  5:44 ` [PATCH] tty: serial: vt8500: Unneccessary duplicated clock code removed Tony Prisk
  0 siblings, 1 reply; 2+ messages in thread
From: Tony Prisk @ 2013-03-09  5:44 UTC (permalink / raw)
  To: gregkh
  Cc: vt8500-wm8505-linux-kernel, linux-arm-kernel, linux-serial,
	Tony Prisk

Hi Greg,

Looks like there was some kind of copy-paste messup in the probe function
which has resulted in some incorrect code being left after the conversion from
a fixed 24Mhz reference to a clock based driver.

This patch tidies up the initialization in probe() of the clock related bits.

Regards
Tony Prisk

Tony Prisk (1):
  tty: serial: vt8500: Unneccessary duplicated clock code removed

 drivers/tty/serial/vt8500_serial.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

-- 
1.7.9.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH] tty: serial: vt8500: Unneccessary duplicated clock code removed
  2013-03-09  5:44 [PATCH] tty: serial: vt8500: Fix clock code in probe Tony Prisk
@ 2013-03-09  5:44 ` Tony Prisk
  0 siblings, 0 replies; 2+ messages in thread
From: Tony Prisk @ 2013-03-09  5:44 UTC (permalink / raw)
  To: gregkh
  Cc: vt8500-wm8505-linux-kernel, linux-arm-kernel, linux-serial,
	Tony Prisk

Remove the extra code left over when the serial driver was changed
to require a clock. There is no fallback to 24Mhz as a clock is
now required.

Also remove a second call to of_clk_get which is unnecessary.

Signed-off-by: Tony Prisk <linux@prisktech.co.nz>
---
 drivers/tty/serial/vt8500_serial.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/tty/serial/vt8500_serial.c b/drivers/tty/serial/vt8500_serial.c
index a3f9dd5..705240e 100644
--- a/drivers/tty/serial/vt8500_serial.c
+++ b/drivers/tty/serial/vt8500_serial.c
@@ -611,14 +611,7 @@ static int vt8500_serial_probe(struct platform_device *pdev)
 	vt8500_port->uart.dev = &pdev->dev;
 	vt8500_port->uart.flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
 
-	vt8500_port->clk = of_clk_get(pdev->dev.of_node, 0);
-	if (!IS_ERR(vt8500_port->clk)) {
-		vt8500_port->uart.uartclk = clk_get_rate(vt8500_port->clk);
-	} else {
-		/* use the default of 24Mhz if not specified and warn */
-		pr_warn("%s: serial clock source not specified\n", __func__);
-		vt8500_port->uart.uartclk = 24000000;
-	}
+	vt8500_port->uart.uartclk = clk_get_rate(vt8500_port->clk);
 
 	snprintf(vt8500_port->name, sizeof(vt8500_port->name),
 		 "VT8500 UART%d", pdev->id);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-03-09  5:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-09  5:44 [PATCH] tty: serial: vt8500: Fix clock code in probe Tony Prisk
2013-03-09  5:44 ` [PATCH] tty: serial: vt8500: Unneccessary duplicated clock code removed Tony Prisk

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).