aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/msm_serial.c
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2013-07-24 14:37:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-26 19:13:29 -0400
commitf8fb952fd409a4c854a66473c11d35b4e5e9c2eb (patch)
tree3ba9ff18c27eaac3b797543bcb903e80cc2e4d55 /drivers/tty/serial/msm_serial.c
parent4a5662d6a6412dabe0b5518bec111e17babbba05 (diff)
msm_serial: Fix sparse warnings
drivers/tty/serial/msm_serial.c:302:6: warning: symbol 'msm_set_mctrl' was not declared. Should it be static? drivers/tty/serial/msm_serial.c:597:17: warning: incorrect type in argument 2 (different address spaces) drivers/tty/serial/msm_serial.c:597:17: expected void volatile [noderef] <asn:2>*addr drivers/tty/serial/msm_serial.c:597:17: got unsigned int * drivers/tty/serial/msm_serial.c:608:33: warning: incorrect type in argument 1 (different address spaces) drivers/tty/serial/msm_serial.c:608:33: expected void volatile [noderef] <asn:2>*addr drivers/tty/serial/msm_serial.c:608:33: got unsigned int *gsbi_base drivers/tty/serial/msm_serial.c:648:37: warning: incorrect type in assignment (different address spaces) drivers/tty/serial/msm_serial.c:648:37: expected unsigned int *gsbi_base drivers/tty/serial/msm_serial.c:648:37: got void [noderef] <asn:2>* Mark the ioremapped memory as __iomem and use writel instead of iowrite because we're not dealing with PCI devices. Also, mark msm_set_mctrl() static because it isn't used outside this file. Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: David Brown <davidb@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/msm_serial.c')
-rw-r--r--drivers/tty/serial/msm_serial.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/tty/serial/msm_serial.c b/drivers/tty/serial/msm_serial.c
index 5a88d88b25da..4184c5164ab4 100644
--- a/drivers/tty/serial/msm_serial.c
+++ b/drivers/tty/serial/msm_serial.c
@@ -45,7 +45,7 @@ struct msm_port {
45 struct clk *clk; 45 struct clk *clk;
46 struct clk *pclk; 46 struct clk *pclk;
47 unsigned int imr; 47 unsigned int imr;
48 unsigned int *gsbi_base; 48 void __iomem *gsbi_base;
49 int is_uartdm; 49 int is_uartdm;
50 unsigned int old_snap_state; 50 unsigned int old_snap_state;
51}; 51};
@@ -299,7 +299,7 @@ static void msm_reset(struct uart_port *port)
299 msm_write(port, UART_CR_CMD_SET_RFR, UART_CR); 299 msm_write(port, UART_CR_CMD_SET_RFR, UART_CR);
300} 300}
301 301
302void msm_set_mctrl(struct uart_port *port, unsigned int mctrl) 302static void msm_set_mctrl(struct uart_port *port, unsigned int mctrl)
303{ 303{
304 unsigned int mr; 304 unsigned int mr;
305 mr = msm_read(port, UART_MR1); 305 mr = msm_read(port, UART_MR1);
@@ -593,12 +593,10 @@ static void msm_release_port(struct uart_port *port)
593 port->membase = NULL; 593 port->membase = NULL;
594 594
595 if (msm_port->gsbi_base) { 595 if (msm_port->gsbi_base) {
596 iowrite32(GSBI_PROTOCOL_IDLE, msm_port->gsbi_base + 596 writel_relaxed(GSBI_PROTOCOL_IDLE,
597 GSBI_CONTROL); 597 msm_port->gsbi_base + GSBI_CONTROL);
598
599 gsbi_resource = platform_get_resource(pdev,
600 IORESOURCE_MEM, 1);
601 598
599 gsbi_resource = platform_get_resource(pdev, IORESOURCE_MEM, 1);
602 if (unlikely(!gsbi_resource)) 600 if (unlikely(!gsbi_resource))
603 return; 601 return;
604 602
@@ -672,10 +670,9 @@ static void msm_config_port(struct uart_port *port, int flags)
672 if (ret) 670 if (ret)
673 return; 671 return;
674 } 672 }
675
676 if (msm_port->is_uartdm) 673 if (msm_port->is_uartdm)
677 iowrite32(GSBI_PROTOCOL_UART, msm_port->gsbi_base + 674 writel_relaxed(GSBI_PROTOCOL_UART,
678 GSBI_CONTROL); 675 msm_port->gsbi_base + GSBI_CONTROL);
679} 676}
680 677
681static int msm_verify_port(struct uart_port *port, struct serial_struct *ser) 678static int msm_verify_port(struct uart_port *port, struct serial_struct *ser)