From 947deee8904b3c2edc7f59ab6e6242499e4dc434 Mon Sep 17 00:00:00 2001 From: Russell King Date: Sun, 2 Jul 2006 20:45:51 +0100 Subject: [SERIAL] Convert fifosize to an unsigned int Some UARTs have more than 255 bytes of FIFO, which can't be represented by an unsigned char. Change the kernel's internal structure to be an unsigned int, but still export an unsigned char via the TIOCGSERIAL ioctl. If the TIOCSSERIAL ioctl provides a fifo size of 0, assume this means "don't change" otherwise we'll corrupt the larger fifo sizes. Signed-off-by: Russell King --- drivers/serial/mpc52xx_uart.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/serial/mpc52xx_uart.c') diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 6459edc7f5c..1b2cdc91c22 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c @@ -728,8 +728,7 @@ mpc52xx_uart_probe(struct platform_device *dev) spin_lock_init(&port->lock); port->uartclk = __res.bi_ipbfreq / 2; /* Look at CTLR doc */ - port->fifosize = 255; /* Should be 512 ! But it can't be */ - /* stored in a unsigned char */ + port->fifosize = 512; port->iotype = UPIO_MEM; port->flags = UPF_BOOT_AUTOCONF | ( uart_console(port) ? 0 : UPF_IOREMAP ); -- cgit v1.2.3