[PATCH 05/12] tty: amba-pl011: add register lookup table

Dave Martin Dave.Martin at arm.com
Thu Nov 19 06:10:53 PST 2015


On Mon, Nov 16, 2015 at 05:40:26PM +0000, Russell King wrote:
> Add a register lookup table, which allows the register offsets to be
> adjusted on a per-port basis.
> 
> Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>

[...]

> diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
> index 5ea5b0a3dbb9..628557f6a7a1 100644
> --- a/drivers/tty/serial/amba-pl011.c
> +++ b/drivers/tty/serial/amba-pl011.c
> @@ -73,6 +73,34 @@
>  #define UART_DR_ERROR		(UART011_DR_OE|UART011_DR_BE|UART011_DR_PE|UART011_DR_FE)
>  #define UART_DUMMY_DR_RX	(1 << 16)
>  
> +static u16 pl011_std_offsets[REG_ARRAY_SIZE] = {

Any reason not to make all these tables const?

Unless I missed something, I don't see them modified anywhere.

[...]

Cheers
---Dave




More information about the linux-arm-kernel mailing list