serial: 8250_exar: Decrease indentation level

Decrease indentation level in some places.
No functional change intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Parker Newman <pnewman@connecttech.com>
Link: https://lore.kernel.org/r/20240503171917.2921250-9-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Andy Shevchenko 2024-05-03 20:16:00 +03:00 committed by Greg Kroah-Hartman
parent 709bb04522
commit ee6c49a71a

View File

@ -607,10 +607,13 @@ pci_fastcom335_setup(struct exar8250 *priv, struct pci_dev *pcidev,
writeb(32, p + UART_EXAR_TXTRG);
writeb(32, p + UART_EXAR_RXTRG);
/* Skip the initial (per device) setup */
if (idx)
return 0;
/*
* Setup Multipurpose Input/Output pins.
*/
if (idx == 0) {
switch (pcidev->device) {
case PCI_DEVICE_ID_COMMTECH_4222PCI335:
case PCI_DEVICE_ID_COMMTECH_4224PCI335:
@ -628,7 +631,6 @@ pci_fastcom335_setup(struct exar8250 *priv, struct pci_dev *pcidev,
writeb(0x00, p + UART_EXAR_MPIOINT_7_0);
writeb(0x00, p + UART_EXAR_MPIO3T_7_0);
writeb(0x00, p + UART_EXAR_MPIOOD_7_0);
}
return 0;
}
@ -853,21 +855,19 @@ static enum cti_port_type cti_get_port_type_xr17v35x(struct exar8250 *priv,
port_flags = exar_ee_read(priv, offset);
port_type = FIELD_GET(CTI_EE_MASK_PORT_FLAGS_TYPE, port_flags);
if (!CTI_PORT_TYPE_VALID(port_type)) {
if (CTI_PORT_TYPE_VALID(port_type))
return port_type;
/*
* If the port type is missing the card assume it is a
* RS232/RS422/RS485 card to be safe.
*
* There is one known board (BEG013) that only has
* 3 of 4 port types written to the EEPROM so this
* acts as a work around.
* There is one known board (BEG013) that only has 3 of 4 port types
* written to the EEPROM so this acts as a work around.
*/
dev_warn(&pcidev->dev,
"failed to get port %d type from EEPROM\n", port_num);
port_type = CTI_PORT_TYPE_RS232_422_485_HW;
}
dev_warn(&pcidev->dev, "failed to get port %d type from EEPROM\n", port_num);
return port_type;
return CTI_PORT_TYPE_RS232_422_485_HW;
}
static int cti_rs485_config_mpio_tristate(struct uart_port *port,
@ -1190,7 +1190,6 @@ static void setup_gpio(struct pci_dev *pcidev, u8 __iomem *p)
* devices will export them as GPIOs, so we pre-configure them safely
* as inputs.
*/
u8 dir = 0x00;
if ((pcidev->vendor == PCI_VENDOR_ID_EXAR) &&
@ -1284,7 +1283,9 @@ static int sealevel_rs485_config(struct uart_port *port, struct ktermios *termio
if (ret)
return ret;
if (rs485->flags & SER_RS485_ENABLED) {
if (!(rs485->flags & SER_RS485_ENABLED))
return 0;
old_lcr = readb(p + UART_LCR);
/* Set EFR[4]=1 to enable enhanced feature registers */
@ -1304,7 +1305,6 @@ static int sealevel_rs485_config(struct uart_port *port, struct ktermios *termio
writeb(dld, p + UART_EXAR_DLD);
writeb(old_lcr, p + UART_LCR);
}
return 0;
}