On 2010-09-28 at 15:35:37 +0200, Anton Vorontsov <cbouatmailru@xxxxxxxxx> wrote: > Some controllers implement registers with a stride, to support > those we must implement the proper IO accessors. > > Signed-off-by: Anton Vorontsov <cbouatmailru@xxxxxxxxx> > --- > drivers/serial/altera_uart.c | 59 +++++++++++++++++++++++++++--------------- > include/linux/altera_uart.h | 1 + > 2 files changed, 39 insertions(+), 21 deletions(-) > > diff --git a/drivers/serial/altera_uart.c b/drivers/serial/altera_uart.c > index 7686aaa..0a1a066 100644 > --- a/drivers/serial/altera_uart.c > +++ b/drivers/serial/altera_uart.c > @@ -78,13 +78,28 @@ > struct altera_uart { > struct uart_port port; > struct timer_list tmr; > + int bus_shift; This member is never used (only bus_shift from struct altera_uart_platform_uart). Seems to be a leftover. > unsigned int sigs; /* Local copy of line sigs */ > unsigned short imr; /* Local IMR mirror */ > }; > > +static u32 altera_uart_readl(struct uart_port *port, int reg) > +{ > + struct altera_uart_platform_uart *platp = port->private_data; > + > + return readl(port->membase + (reg << platp->bus_shift)); > +} > + > +static void altera_uart_writel(struct uart_port *port, u32 dat, int reg) > +{ > + struct altera_uart_platform_uart *platp = port->private_data; > + > + writel(dat, port->membase + (reg << platp->bus_shift)); > +} Why not make these inline? Cheers, Tobias -- To unsubscribe from this list: send the line "unsubscribe linux-serial" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html