aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/s3c2410.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/serial/s3c2410.c')
-rw-r--r--drivers/serial/s3c2410.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/serial/s3c2410.c b/drivers/serial/s3c2410.c
index 4ffa2585429a..2b6a013639e6 100644
--- a/drivers/serial/s3c2410.c
+++ b/drivers/serial/s3c2410.c
@@ -1022,6 +1022,7 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
1022 struct uart_port *port = &ourport->port; 1022 struct uart_port *port = &ourport->port;
1023 struct s3c2410_uartcfg *cfg; 1023 struct s3c2410_uartcfg *cfg;
1024 struct resource *res; 1024 struct resource *res;
1025 int ret;
1025 1026
1026 dbg("s3c24xx_serial_init_port: port=%p, platdev=%p\n", port, platdev); 1027 dbg("s3c24xx_serial_init_port: port=%p, platdev=%p\n", port, platdev);
1027 1028
@@ -1064,9 +1065,11 @@ static int s3c24xx_serial_init_port(struct s3c24xx_uart_port *ourport,
1064 1065
1065 port->mapbase = res->start; 1066 port->mapbase = res->start;
1066 port->membase = S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART); 1067 port->membase = S3C24XX_VA_UART + (res->start - S3C24XX_PA_UART);
1067 port->irq = platform_get_irq(platdev, 0); 1068 ret = platform_get_irq(platdev, 0);
1068 if (port->irq < 0) 1069 if (ret < 0)
1069 port->irq = 0; 1070 port->irq = 0;
1071 else
1072 port->irq = ret;
1070 1073
1071 ourport->clk = clk_get(&platdev->dev, "uart"); 1074 ourport->clk = clk_get(&platdev->dev, "uart");
1072 1075
@@ -1093,13 +1096,13 @@ static int s3c24xx_serial_probe(struct platform_device *dev,
1093 ourport = &s3c24xx_serial_ports[probe_index]; 1096 ourport = &s3c24xx_serial_ports[probe_index];
1094 probe_index++; 1097 probe_index++;
1095 1098
1096 dbg("%s: initialising port %p...\n", __FUNCTION__, ourport); 1099 dbg("%s: initialising port %p...\n", __func__, ourport);
1097 1100
1098 ret = s3c24xx_serial_init_port(ourport, info, dev); 1101 ret = s3c24xx_serial_init_port(ourport, info, dev);
1099 if (ret < 0) 1102 if (ret < 0)
1100 goto probe_err; 1103 goto probe_err;
1101 1104
1102 dbg("%s: adding port\n", __FUNCTION__); 1105 dbg("%s: adding port\n", __func__);
1103 uart_add_one_port(&s3c24xx_uart_drv, &ourport->port); 1106 uart_add_one_port(&s3c24xx_uart_drv, &ourport->port);
1104 platform_set_drvdata(dev, &ourport->port); 1107 platform_set_drvdata(dev, &ourport->port);
1105 1108
@@ -1584,7 +1587,7 @@ static int s3c2412_serial_resetport(struct uart_port *port,
1584 unsigned long ucon = rd_regl(port, S3C2410_UCON); 1587 unsigned long ucon = rd_regl(port, S3C2410_UCON);
1585 1588
1586 dbg("%s: port=%p (%08lx), cfg=%p\n", 1589 dbg("%s: port=%p (%08lx), cfg=%p\n",
1587 __FUNCTION__, port, port->mapbase, cfg); 1590 __func__, port, port->mapbase, cfg);
1588 1591
1589 /* ensure we don't change the clock settings... */ 1592 /* ensure we don't change the clock settings... */
1590 1593