Skip to content

Commit

Permalink
serial-uartlite: Constify uartlite_be/uartlite_le
Browse files Browse the repository at this point in the history
Made uartlite_be and uartlite_le constants.

Signed-off-by: Maarten Brock <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
maartenbrock authored and gregkh committed Mar 8, 2016
1 parent acf5e6c commit 2905697
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/tty/serial/uartlite.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ static void uartlite_outbe32(u32 val, void __iomem *addr)
iowrite32be(val, addr);
}

static struct uartlite_reg_ops uartlite_be = {
static const struct uartlite_reg_ops uartlite_be = {
.in = uartlite_inbe32,
.out = uartlite_outbe32,
};
Expand All @@ -87,21 +87,21 @@ static void uartlite_outle32(u32 val, void __iomem *addr)
iowrite32(val, addr);
}

static struct uartlite_reg_ops uartlite_le = {
static const struct uartlite_reg_ops uartlite_le = {
.in = uartlite_inle32,
.out = uartlite_outle32,
};

static inline u32 uart_in32(u32 offset, struct uart_port *port)
{
struct uartlite_reg_ops *reg_ops = port->private_data;
const struct uartlite_reg_ops *reg_ops = port->private_data;

return reg_ops->in(port->membase + offset);
}

static inline void uart_out32(u32 val, u32 offset, struct uart_port *port)
{
struct uartlite_reg_ops *reg_ops = port->private_data;
const struct uartlite_reg_ops *reg_ops = port->private_data;

reg_ops->out(val, port->membase + offset);
}
Expand Down

0 comments on commit 2905697

Please sign in to comment.