Messages in this thread | | | Date | Fri, 11 Mar 2011 13:50:24 +0000 | From | Alan Cox <> | Subject | Re: [PATCH 1/3] tty: serial: Use hub6_serial_X when CONFIG_SERIAL_8250_HUB6 is defined |
| |
Most of these are not needed
> +#if CONFIG_SERIAL_8250_HUB6 > static unsigned int hub6_serial_in(struct uart_port *p, int offset) > { > offset = map_8250_in_reg(p, offset) << p->regshift; > @@ -400,6 +401,7 @@ static void hub6_serial_out(struct uart_port *p, int offset, int value) > outb(p->hub6 - 1 + offset, p->iobase); > outb(value, p->iobase + 1); > } > +#endif
This one is needed > > static unsigned int mem_serial_in(struct uart_port *p, int offset) > { > @@ -508,10 +510,12 @@ static void set_io_from_upio(struct uart_port *p) > struct uart_8250_port *up = > container_of(p, struct uart_8250_port, port); > switch (p->iotype) { > +#if CONFIG_SERIAL_8250_HUB6 > case UPIO_HUB6: > p->serial_in = hub6_serial_in; > p->serial_out = hub6_serial_out; > break; > +#endif
And this - but not the rest.
It is also such a miniscule amount of code it seems like it does not justify the complexity of being configurable this way.
| |