aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/amba-pl011.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-06-17 09:44:19 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-18 20:34:08 -0400
commite643f87f714c430062c634b5acd69a3a52279e51 (patch)
tree1b9e60e540865b1c889e001d0651a669a6c792c3 /drivers/tty/serial/amba-pl011.c
parentcfe275c2db6932e81ea23288a8a74f0b815c9513 (diff)
serial/amba-pl011: fix ages old copy-paste errors
The PL011 driver has a number of symbols referring to "pl01x" (probably once shared with the pl010 driver) and some even named "pl010" (probably a pure copy-paste artifact). Lets name all local static functions with the prefix pl011_* for clarity. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/amba-pl011.c')
-rw-r--r--drivers/tty/serial/amba-pl011.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c
index 4ad721fb8405..314664829e7b 100644
--- a/drivers/tty/serial/amba-pl011.c
+++ b/drivers/tty/serial/amba-pl011.c
@@ -1211,14 +1211,14 @@ static irqreturn_t pl011_int(int irq, void *dev_id)
1211 return IRQ_RETVAL(handled); 1211 return IRQ_RETVAL(handled);
1212} 1212}
1213 1213
1214static unsigned int pl01x_tx_empty(struct uart_port *port) 1214static unsigned int pl011_tx_empty(struct uart_port *port)
1215{ 1215{
1216 struct uart_amba_port *uap = (struct uart_amba_port *)port; 1216 struct uart_amba_port *uap = (struct uart_amba_port *)port;
1217 unsigned int status = readw(uap->port.membase + UART01x_FR); 1217 unsigned int status = readw(uap->port.membase + UART01x_FR);
1218 return status & (UART01x_FR_BUSY|UART01x_FR_TXFF) ? 0 : TIOCSER_TEMT; 1218 return status & (UART01x_FR_BUSY|UART01x_FR_TXFF) ? 0 : TIOCSER_TEMT;
1219} 1219}
1220 1220
1221static unsigned int pl01x_get_mctrl(struct uart_port *port) 1221static unsigned int pl011_get_mctrl(struct uart_port *port)
1222{ 1222{
1223 struct uart_amba_port *uap = (struct uart_amba_port *)port; 1223 struct uart_amba_port *uap = (struct uart_amba_port *)port;
1224 unsigned int result = 0; 1224 unsigned int result = 0;
@@ -1281,7 +1281,7 @@ static void pl011_break_ctl(struct uart_port *port, int break_state)
1281} 1281}
1282 1282
1283#ifdef CONFIG_CONSOLE_POLL 1283#ifdef CONFIG_CONSOLE_POLL
1284static int pl010_get_poll_char(struct uart_port *port) 1284static int pl011_get_poll_char(struct uart_port *port)
1285{ 1285{
1286 struct uart_amba_port *uap = (struct uart_amba_port *)port; 1286 struct uart_amba_port *uap = (struct uart_amba_port *)port;
1287 unsigned int status; 1287 unsigned int status;
@@ -1293,7 +1293,7 @@ static int pl010_get_poll_char(struct uart_port *port)
1293 return readw(uap->port.membase + UART01x_DR); 1293 return readw(uap->port.membase + UART01x_DR);
1294} 1294}
1295 1295
1296static void pl010_put_poll_char(struct uart_port *port, 1296static void pl011_put_poll_char(struct uart_port *port,
1297 unsigned char ch) 1297 unsigned char ch)
1298{ 1298{
1299 struct uart_amba_port *uap = (struct uart_amba_port *)port; 1299 struct uart_amba_port *uap = (struct uart_amba_port *)port;
@@ -1616,7 +1616,7 @@ static const char *pl011_type(struct uart_port *port)
1616/* 1616/*
1617 * Release the memory region(s) being used by 'port' 1617 * Release the memory region(s) being used by 'port'
1618 */ 1618 */
1619static void pl010_release_port(struct uart_port *port) 1619static void pl011_release_port(struct uart_port *port)
1620{ 1620{
1621 release_mem_region(port->mapbase, SZ_4K); 1621 release_mem_region(port->mapbase, SZ_4K);
1622} 1622}
@@ -1624,7 +1624,7 @@ static void pl010_release_port(struct uart_port *port)
1624/* 1624/*
1625 * Request the memory region(s) being used by 'port' 1625 * Request the memory region(s) being used by 'port'
1626 */ 1626 */
1627static int pl010_request_port(struct uart_port *port) 1627static int pl011_request_port(struct uart_port *port)
1628{ 1628{
1629 return request_mem_region(port->mapbase, SZ_4K, "uart-pl011") 1629 return request_mem_region(port->mapbase, SZ_4K, "uart-pl011")
1630 != NULL ? 0 : -EBUSY; 1630 != NULL ? 0 : -EBUSY;
@@ -1633,18 +1633,18 @@ static int pl010_request_port(struct uart_port *port)
1633/* 1633/*
1634 * Configure/autoconfigure the port. 1634 * Configure/autoconfigure the port.
1635 */ 1635 */
1636static void pl010_config_port(struct uart_port *port, int flags) 1636static void pl011_config_port(struct uart_port *port, int flags)
1637{ 1637{
1638 if (flags & UART_CONFIG_TYPE) { 1638 if (flags & UART_CONFIG_TYPE) {
1639 port->type = PORT_AMBA; 1639 port->type = PORT_AMBA;
1640 pl010_request_port(port); 1640 pl011_request_port(port);
1641 } 1641 }
1642} 1642}
1643 1643
1644/* 1644/*
1645 * verify the new serial_struct (for TIOCSSERIAL). 1645 * verify the new serial_struct (for TIOCSSERIAL).
1646 */ 1646 */
1647static int pl010_verify_port(struct uart_port *port, struct serial_struct *ser) 1647static int pl011_verify_port(struct uart_port *port, struct serial_struct *ser)
1648{ 1648{
1649 int ret = 0; 1649 int ret = 0;
1650 if (ser->type != PORT_UNKNOWN && ser->type != PORT_AMBA) 1650 if (ser->type != PORT_UNKNOWN && ser->type != PORT_AMBA)
@@ -1657,9 +1657,9 @@ static int pl010_verify_port(struct uart_port *port, struct serial_struct *ser)
1657} 1657}
1658 1658
1659static struct uart_ops amba_pl011_pops = { 1659static struct uart_ops amba_pl011_pops = {
1660 .tx_empty = pl01x_tx_empty, 1660 .tx_empty = pl011_tx_empty,
1661 .set_mctrl = pl011_set_mctrl, 1661 .set_mctrl = pl011_set_mctrl,
1662 .get_mctrl = pl01x_get_mctrl, 1662 .get_mctrl = pl011_get_mctrl,
1663 .stop_tx = pl011_stop_tx, 1663 .stop_tx = pl011_stop_tx,
1664 .start_tx = pl011_start_tx, 1664 .start_tx = pl011_start_tx,
1665 .stop_rx = pl011_stop_rx, 1665 .stop_rx = pl011_stop_rx,
@@ -1670,13 +1670,13 @@ static struct uart_ops amba_pl011_pops = {
1670 .flush_buffer = pl011_dma_flush_buffer, 1670 .flush_buffer = pl011_dma_flush_buffer,
1671 .set_termios = pl011_set_termios, 1671 .set_termios = pl011_set_termios,
1672 .type = pl011_type, 1672 .type = pl011_type,
1673 .release_port = pl010_release_port, 1673 .release_port = pl011_release_port,
1674 .request_port = pl010_request_port, 1674 .request_port = pl011_request_port,
1675 .config_port = pl010_config_port, 1675 .config_port = pl011_config_port,
1676 .verify_port = pl010_verify_port, 1676 .verify_port = pl011_verify_port,
1677#ifdef CONFIG_CONSOLE_POLL 1677#ifdef CONFIG_CONSOLE_POLL
1678 .poll_get_char = pl010_get_poll_char, 1678 .poll_get_char = pl011_get_poll_char,
1679 .poll_put_char = pl010_put_poll_char, 1679 .poll_put_char = pl011_put_poll_char,
1680#endif 1680#endif
1681}; 1681};
1682 1682