summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2012-11-06 14:30:28 +0000
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-15 16:59:58 -0800
commit7a876b39b5bc94f67e8a3a7adfd270b8c21fc762 (patch)
tree8581c708900789b30fb177bdabe849315c9054b0 /drivers/tty
parent4bb535d2b6fe1466d89037c95945cc7bf5ba2377 (diff)
serial: cast before shifting on port io
Without this we will shift data into oblivion and give wrong results on some configurations Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/serial_core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c
index d3dd4ad984f6..63b33889d515 100644
--- a/drivers/tty/serial/serial_core.c
+++ b/drivers/tty/serial/serial_core.c
@@ -2366,7 +2366,7 @@ static ssize_t uart_get_attr_port(struct device *dev,
struct tty_port *port = dev_get_drvdata(dev);
uart_get_info(port, &tmp);
- return snprintf(buf, PAGE_SIZE, "0x%lX\n", (unsigned long)(tmp.port | (tmp.port_high << HIGH_BITS_OFFSET)));
+ return snprintf(buf, PAGE_SIZE, "0x%lX\n", (unsigned long)(tmp.port | (((unsigned long)tmp.port_high) << HIGH_BITS_OFFSET)));
}
static ssize_t uart_get_attr_irq(struct device *dev,