serial: cpm_uart: Deduplicate cpm_line_cr_cmd()
authorChristophe Leroy <christophe.leroy@csgroup.eu>
Thu, 3 Aug 2023 13:56:47 +0000 (15:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Aug 2023 13:08:30 +0000 (15:08 +0200)
cpm_line_cr_cmd() is identical for CPM1 and CPM2 and
is used only in cpm_uart_core.c. Move it there.

Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/r/6996e6ff93067dcddebf0d0c86487345149e165c.1691068700.git.christophe.leroy@csgroup.eu
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/cpm_uart/cpm_uart.h
drivers/tty/serial/cpm_uart/cpm_uart_core.c
drivers/tty/serial/cpm_uart/cpm_uart_cpm1.c
drivers/tty/serial/cpm_uart/cpm_uart_cpm2.c

index 81c1c5f97d190248fbd1910a68b83c394dd6105b..1b5523474ab4354ee7b1915fbfc086ac43146451 100644 (file)
@@ -76,7 +76,6 @@ struct uart_cpm_port {
 };
 
 /* these are located in their respective files */
-void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd);
 void __iomem *cpm_uart_map_pram(struct uart_cpm_port *port,
                                struct device_node *np);
 void cpm_uart_unmap_pram(struct uart_cpm_port *port, void __iomem *pram);
index 743892c0e14375203c727c91fd6cad2cc1ec93e3..e6f3e4da3144893dc5a5b68774fb78a60eb1923f 100644 (file)
@@ -54,6 +54,11 @@ static void cpm_uart_initbd(struct uart_cpm_port *pinfo);
 
 #define HW_BUF_SPD_THRESHOLD    2400
 
+static void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
+{
+       cpm_command(port->command, cmd);
+}
+
 /*
  * Check, if transmit buffers are processed
 */
index 56fc527015cba508da1269950e8c68793f1a1347..b5680376ff3cb0d637ae8bfc2fba602836c7518a 100644 (file)
 
 /**************************************************************/
 
-void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
-{
-       cpm_command(port->command, cmd);
-}
-
 void __iomem *cpm_uart_map_pram(struct uart_cpm_port *port,
                                struct device_node *np)
 {
index 108af254e8f30342edcba64d4095478c18c2d13e..35f539fcfde867c3dc1060fc3a4afe0dc17f6b7c 100644 (file)
 
 /**************************************************************/
 
-void cpm_line_cr_cmd(struct uart_cpm_port *port, int cmd)
-{
-       cpm_command(port->command, cmd);
-}
-
 void __iomem *cpm_uart_map_pram(struct uart_cpm_port *port,
                                struct device_node *np)
 {