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>
This commit is contained in:
Alan Cox 2012-11-06 14:30:28 +00:00 committed by Greg Kroah-Hartman
parent 4bb535d2b6
commit 7a876b39b5
1 changed files with 1 additions and 1 deletions

View File

@ -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,