Commit 9220ebff authored by Sudip Mukherjee's avatar Sudip Mukherjee Committed by Greg Kroah-Hartman

Revert "serial-uartlite: Constify uartlite_be/uartlite_le"

This reverts commit 2905697a.

The commit introduced two build warnings:
drivers/tty/serial/uartlite.c: In function ‘ulite_request_port’:
drivers/tty/serial/uartlite.c:348:21: warning: assignment discards
			‘const’ qualifier from pointer target type
  port->private_data = &uartlite_be;
                     ^
drivers/tty/serial/uartlite.c:354:22: warning: assignment discards
			‘const’ qualifier from pointer target type
   port->private_data = &uartlite_le;
                      ^
Signed-off-by: default avatarSudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Cc: Maarten Brock <m.brock@vanmierlo.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c3b46c73
...@@ -72,7 +72,7 @@ static void uartlite_outbe32(u32 val, void __iomem *addr) ...@@ -72,7 +72,7 @@ static void uartlite_outbe32(u32 val, void __iomem *addr)
iowrite32be(val, addr); iowrite32be(val, addr);
} }
static const struct uartlite_reg_ops uartlite_be = { static struct uartlite_reg_ops uartlite_be = {
.in = uartlite_inbe32, .in = uartlite_inbe32,
.out = uartlite_outbe32, .out = uartlite_outbe32,
}; };
...@@ -87,21 +87,21 @@ static void uartlite_outle32(u32 val, void __iomem *addr) ...@@ -87,21 +87,21 @@ static void uartlite_outle32(u32 val, void __iomem *addr)
iowrite32(val, addr); iowrite32(val, addr);
} }
static const struct uartlite_reg_ops uartlite_le = { static struct uartlite_reg_ops uartlite_le = {
.in = uartlite_inle32, .in = uartlite_inle32,
.out = uartlite_outle32, .out = uartlite_outle32,
}; };
static inline u32 uart_in32(u32 offset, struct uart_port *port) static inline u32 uart_in32(u32 offset, struct uart_port *port)
{ {
const struct uartlite_reg_ops *reg_ops = port->private_data; struct uartlite_reg_ops *reg_ops = port->private_data;
return reg_ops->in(port->membase + offset); return reg_ops->in(port->membase + offset);
} }
static inline void uart_out32(u32 val, u32 offset, struct uart_port *port) static inline void uart_out32(u32 val, u32 offset, struct uart_port *port)
{ {
const struct uartlite_reg_ops *reg_ops = port->private_data; struct uartlite_reg_ops *reg_ops = port->private_data;
reg_ops->out(val, port->membase + offset); reg_ops->out(val, port->membase + offset);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment