summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial
diff options
context:
space:
mode:
authorGovindraj.R <govindraj.raja@ti.com>2011-12-14 16:54:11 +0100
committerKevin Hilman <khilman@ti.com>2011-12-15 01:05:27 +0100
commitda27468655540b083525177f5dc6f3b1f6e3b869 (patch)
tree7ec8e5044d48cc33cc7126a36021bd3fe4b57d90 /drivers/tty/serial
parentARM: OMAP2+: UART: Remove omap_uart_can_sleep and add pm_qos (diff)
downloadlinux-da27468655540b083525177f5dc6f3b1f6e3b869.tar.xz
linux-da27468655540b083525177f5dc6f3b1f6e3b869.zip
ARM: OMAP2+: UART: Fix compilation/sparse warnings
Fixes below compilation warning. drivers/tty/serial/omap-serial.c: In function 'serial_omap_irq': drivers/tty/serial/omap-serial.c:228:29: warning: 'ch' may be used uninitialized in this function [-Wuninitialized] Fix below sparse warning. drivers/tty/serial/omap-serial.c:392:52: warning: incorrect type in argument 2 (different signedness) drivers/tty/serial/omap-serial.c:392:52: expected int *status drivers/tty/serial/omap-serial.c:392:52: got unsigned int *<noident> Reported-by: Kevin Hilman <khilman@ti.com> Signed-off-by: Govindraj.R <govindraj.raja@ti.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes) Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r--drivers/tty/serial/omap-serial.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tty/serial/omap-serial.c b/drivers/tty/serial/omap-serial.c
index f3ff0ca377c5..7b0303d34021 100644
--- a/drivers/tty/serial/omap-serial.c
+++ b/drivers/tty/serial/omap-serial.c
@@ -166,11 +166,12 @@ static void serial_omap_stop_rx(struct uart_port *port)
pm_runtime_put_autosuspend(&up->pdev->dev);
}
-static inline void receive_chars(struct uart_omap_port *up, int *status)
+static inline void receive_chars(struct uart_omap_port *up,
+ unsigned int *status)
{
struct tty_struct *tty = up->port.state->port.tty;
- unsigned int flag;
- unsigned char ch, lsr = *status;
+ unsigned int flag, lsr = *status;
+ unsigned char ch = 0;
int max_count = 256;
do {