diff options
author | Alan Cox <alan@linux.intel.com> | 2012-11-06 14:30:28 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-15 16:59:58 -0800 |
commit | 7a876b39b5bc94f67e8a3a7adfd270b8c21fc762 (patch) | |
tree | 8581c708900789b30fb177bdabe849315c9054b0 /drivers/tty | |
parent | 4bb535d2b6fe1466d89037c95945cc7bf5ba2377 (diff) | |
download | kernel_goldelico_gta04-7a876b39b5bc94f67e8a3a7adfd270b8c21fc762.zip kernel_goldelico_gta04-7a876b39b5bc94f67e8a3a7adfd270b8c21fc762.tar.gz kernel_goldelico_gta04-7a876b39b5bc94f67e8a3a7adfd270b8c21fc762.tar.bz2 |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/serial_core.c b/drivers/tty/serial/serial_core.c index d3dd4ad..63b3388 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, |