X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fserial%2Fmux.c;h=e94031731a4797af1d94b9f47db6fc51d0a8bc8c;hb=a38d6e37c0bc073bae5eff37c939978974ea9712;hp=f5b17f5333fbea6e8ac3143ec65d93ccd2012df3;hpb=614254458452d09ea0376862160662f2a6075ab9;p=linux-2.6-omap-h63xx.git diff --git a/drivers/serial/mux.c b/drivers/serial/mux.c index f5b17f5333f..e94031731a4 100644 --- a/drivers/serial/mux.c +++ b/drivers/serial/mux.c @@ -83,19 +83,20 @@ static struct timer_list mux_timer; */ static int __init get_mux_port_count(struct parisc_device *dev) { + int status; u8 iodc_data[32]; unsigned long bytecnt; - int status = pdc_iodc_read(&bytecnt, dev->hpa.start, 0, iodc_data, 32); - BUG_ON(status != PDC_OK); - /* If this is the built-in Mux for the K-Class (Eole CAP/MUX), * we only need to allocate resources for 1 port since the * other 7 ports are not connected. */ - if(((iodc_data[0] << 4) | ((iodc_data[1] & 0xf0) >> 4)) == 0x15) + if(dev->id.hversion == 0x15) return 1; + status = pdc_iodc_read(&bytecnt, dev->hpa.start, 0, iodc_data, 32); + BUG_ON(status != PDC_OK); + /* Return the number of ports specified in the iodc data. */ return ((((iodc_data)[4] & 0xf0) >> 4) * 8) + 8; } @@ -306,8 +307,8 @@ static void mux_shutdown(struct uart_port *port) * The Serial Mux does not support this function. */ static void -mux_set_termios(struct uart_port *port, struct termios *termios, - struct termios *old) +mux_set_termios(struct uart_port *port, struct ktermios *termios, + struct ktermios *old) { } @@ -581,7 +582,7 @@ static struct parisc_driver serial_mux_driver = { }; /** - * mux_init - Serial MUX initalization procedure. + * mux_init - Serial MUX initialization procedure. * * Register the Serial MUX driver. */