Commit 38dbd951 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

serial: 8250_ni: Remove unneeded conditionals



It doesn't matter if the properties are supplied or not in
the struct ni16550_device_info as default in any case is 0.
Hence there is no need to check for them being set.

Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarChaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Reviewed-by: default avatarChaitanya Vadrevu <chaitanya.vadrevu@emerson.com>
Link: https://lore.kernel.org/r/20250321182119.454507-5-andriy.shevchenko@linux.intel.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b4694a76
Loading
Loading
Loading
Loading
+4 −7
Original line number Diff line number Diff line
@@ -275,7 +275,7 @@ static int ni16550_probe(struct platform_device *pdev)
	struct device *dev = &pdev->dev;
	struct uart_8250_port uart = {};
	unsigned int txfifosz, rxfifosz;
	unsigned int prescaler = 0;
	unsigned int prescaler;
	struct ni16550_data *data;
	const char *portmode;
	bool rs232_property;
@@ -321,7 +321,6 @@ static int ni16550_probe(struct platform_device *pdev)
	 * - static declaration in this driver (for older ACPI IDs)
	 * - a "clock-frequency" ACPI
	 */
	if (info->uartclk)
	uart.port.uartclk = info->uartclk;

	ret = uart_read_port_properties(&uart.port);
@@ -340,11 +339,9 @@ static int ni16550_probe(struct platform_device *pdev)
		goto err;
	}

	if (info->prescaler)
	prescaler = info->prescaler;
	device_property_read_u32(dev, "clock-prescaler", &prescaler);

	if (prescaler != 0) {
	if (prescaler) {
		uart.port.set_mctrl = ni16550_set_mctrl;
		ni16550_config_prescaler(&uart, (u8)prescaler);
	}