Skip to contentSkip to conversation

tty: serial: vt8500: Fix clock code in probe

PATCH New Tony Prisk 1 participant 2 messages Mar 9, 2013

Subsystems (2)
lore
Share & tools
lore

Tony Prisk

author
#0 lore raw

PATCH 1/1 tty: serial: vt8500: Fix clock code in probe

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(-)
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/1 tty: serial: vt8500: Unneccessary duplicated clock code removed

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.

---
 drivers/tty/serial/vt8500_serial.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/tty/serial/vt8500_serial.c +1 -8
index a3f9dd5..705240e 100644
@@ -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);
Signature · 1 line
1.7.9.5