tty: remove CMSPAR ifdefs
authorIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Fri, 13 May 2022 08:29:02 +0000 (11:29 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 19 May 2022 16:26:16 +0000 (18:26 +0200)
CMSPAR is defined by all architectures since commit 6bf08cb246b5
("[PATCH] Add CMSPAR to termbits.h for powerpc and alpha").

Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Link: https://lore.kernel.org/r/20220513082906.11096-2-ilpo.jarvinen@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/pcmcia/synclink_cs.c
drivers/tty/amiserial.c
drivers/tty/serial/8250/8250_port.c
drivers/tty/serial/jsm/jsm_cls.c
drivers/tty/serial/jsm/jsm_neo.c
drivers/tty/serial/sunsu.c
drivers/usb/class/cdc-acm.h
drivers/usb/serial/ark3116.c
drivers/usb/serial/whiteheat.c

index 78baba5..c20f2cb 100644 (file)
@@ -1432,10 +1432,8 @@ static void mgslpc_change_params(MGSLPC_INFO *info, struct tty_struct *tty)
                        info->params.parity = ASYNC_PARITY_ODD;
                else
                        info->params.parity = ASYNC_PARITY_EVEN;
-#ifdef CMSPAR
                if (cflag & CMSPAR)
                        info->params.parity = ASYNC_PARITY_SPACE;
-#endif
        }
 
        /* calculate number of jiffies to transmit a full
index 533d02b..afb2d37 100644 (file)
@@ -588,10 +588,8 @@ static void change_speed(struct tty_struct *tty, struct serial_state *info,
        }
        if (!(cflag & PARODD))
                cval |= UART_LCR_EPAR;
-#ifdef CMSPAR
        if (cflag & CMSPAR)
                cval |= UART_LCR_SPAR;
-#endif
 
        /* Determine divisor based on baud rate */
        baud = tty_get_baud_rate(tty);
index 5591f18..78b6ded 100644 (file)
@@ -2620,10 +2620,8 @@ static unsigned char serial8250_compute_lcr(struct uart_8250_port *up,
        }
        if (!(c_cflag & PARODD))
                cval |= UART_LCR_EPAR;
-#ifdef CMSPAR
        if (c_cflag & CMSPAR)
                cval |= UART_LCR_SPAR;
-#endif
 
        return cval;
 }
index 444f233..046b624 100644 (file)
@@ -723,14 +723,8 @@ static void cls_param(struct jsm_channel *ch)
        if (!(ch->ch_c_cflag & PARODD))
                lcr |= UART_LCR_EPAR;
 
-       /*
-        * Not all platforms support mark/space parity,
-        * so this will hide behind an ifdef.
-        */
-#ifdef CMSPAR
        if (ch->ch_c_cflag & CMSPAR)
                lcr |= UART_LCR_SPAR;
-#endif
 
        if (ch->ch_c_cflag & CSTOPB)
                lcr |= UART_LCR_STOP;
index 110696c..0cf586c 100644 (file)
@@ -997,14 +997,8 @@ static void neo_param(struct jsm_channel *ch)
        if (!(ch->ch_c_cflag & PARODD))
                lcr |= UART_LCR_EPAR;
 
-       /*
-        * Not all platforms support mark/space parity,
-        * so this will hide behind an ifdef.
-        */
-#ifdef CMSPAR
        if (ch->ch_c_cflag & CMSPAR)
                lcr |= UART_LCR_SPAR;
-#endif
 
        if (ch->ch_c_cflag & CSTOPB)
                lcr |= UART_LCR_STOP;
index c313891..fff50b5 100644 (file)
@@ -798,10 +798,8 @@ sunsu_change_speed(struct uart_port *port, unsigned int cflag,
                cval |= UART_LCR_PARITY;
        if (!(cflag & PARODD))
                cval |= UART_LCR_EPAR;
-#ifdef CMSPAR
        if (cflag & CMSPAR)
                cval |= UART_LCR_SPAR;
-#endif
 
        /*
         * Work around a bug in the Oxford Semiconductor 952 rev B
index 3aa7f0a..d26ecd1 100644 (file)
@@ -8,14 +8,6 @@
  */
 
 /*
- * CMSPAR, some architectures can't have space and mark parity.
- */
-
-#ifndef CMSPAR
-#define CMSPAR                 0
-#endif
-
-/*
  * Major and minor numbers.
  */
 
index c0e4df8..39eaa7b 100644 (file)
@@ -208,10 +208,9 @@ static void ark3116_set_termios(struct tty_struct *tty,
                lcr |= UART_LCR_PARITY;
        if (!(cflag & PARODD))
                lcr |= UART_LCR_EPAR;
-#ifdef CMSPAR
        if (cflag & CMSPAR)
                lcr |= UART_LCR_SPAR;
-#endif
+
        /* handshake control */
        hcr = (cflag & CRTSCTS) ? 0x03 : 0x00;
 
index 06aad0d..332fb92 100644 (file)
 #include <linux/usb/ezusb.h>
 #include "whiteheat.h"                 /* WhiteHEAT specific commands */
 
-#ifndef CMSPAR
-#define CMSPAR 0
-#endif
-
 /*
  * Version Information
  */