Re: [PATCH 1/3] tty: serial: Use hub6_serial_X whenCONFIG_SERIAL_8250_HUB6 is defined

From: Alan Cox
Date: Fri Mar 11 2011 - 08:50:34 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/