diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2024-08-12 17:47:09 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-08-14 08:22:50 +0200 |
commit | 77748913d5d157f1315202e54e24359505a09f65 (patch) | |
tree | 7f65430af093e03f5f382400b46e2104ab4e0d21 /drivers/tty | |
parent | serial: 8250_platform: Refactor serial8250_probe() (diff) | |
download | linux-77748913d5d157f1315202e54e24359505a09f65.tar.xz linux-77748913d5d157f1315202e54e24359505a09f65.zip |
serial: 8250_platform: Unify comment style
Unify comment style and fix indentation in some cases.
While at it, add that it supports ACPI enumerated non-PNP devices.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20240812154901.1068407-8-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/8250/8250_platform.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/tty/serial/8250/8250_platform.c b/drivers/tty/serial/8250/8250_platform.c index 2e7503718f79..be7ff07cbdd0 100644 --- a/drivers/tty/serial/8250/8250_platform.c +++ b/drivers/tty/serial/8250/8250_platform.c @@ -2,7 +2,9 @@ /* * Universal/legacy platform driver for 8250/16550-type serial ports * - * Supports: ISA-compatible 8250/16550 ports + * Supports: + * ISA-compatible 8250/16550 ports + * ACPI 8250/16550 ports * PNP 8250/16550 ports * "serial8250" platform devices */ @@ -24,9 +26,9 @@ /* * Configuration: - * share_irqs Whether we pass IRQF_SHARED to request_irq(). + * share_irqs: Whether we pass IRQF_SHARED to request_irq(). * This option is unsafe when used on edge-triggered interrupts. - * skip_txen_test Force skip of txen test at init time. + * skip_txen_test: Force skip of txen test at init time. */ unsigned int share_irqs = SERIAL8250_SHARE_IRQS; unsigned int skip_txen_test; @@ -63,9 +65,9 @@ static void __init __serial8250_isa_init_ports(void) nr_uarts = UART_NR; /* - * Set up initial isa ports based on nr_uart module param, or else + * Set up initial ISA ports based on nr_uart module param, or else * default to CONFIG_SERIAL_8250_RUNTIME_UARTS. Note that we do not - * need to increase nr_uarts when setting up the initial isa ports. + * need to increase nr_uarts when setting up the initial ISA ports. */ for (i = 0; i < nr_uarts; i++) serial8250_setup_port(i); @@ -132,11 +134,12 @@ static int serial8250_probe_acpi(struct platform_device *pdev) return -EINVAL; } - /* Default clock frequency*/ + /* default clock frequency */ uart.port.uartclk = 1843200; uart.port.type = PORT_16550A; uart.port.dev = &pdev->dev; uart.port.flags |= UPF_SKIP_TEST | UPF_BOOT_AUTOCONF; + ret = uart_read_and_validate_port_properties(&uart.port); /* no interrupt -> fall back to polling */ if (ret == -ENXIO) @@ -207,8 +210,8 @@ static int serial8250_probe_platform(struct platform_device *dev, struct plat_se } /* - * Register a set of serial devices attached to a platform device. The - * list is terminated with a zero flags entry, which means we expect + * Register a set of serial devices attached to a platform device. + * The list is terminated with a zero flags entry, which means we expect * all entries to have at least UPF_BOOT_AUTOCONF set. */ static int serial8250_probe(struct platform_device *pdev) @@ -293,7 +296,7 @@ static struct platform_driver serial8250_isa_driver = { /* * This "device" covers _all_ ISA 8250-compatible serial devices listed - * in the table in include/asm/serial.h + * in the table in include/asm/serial.h. */ struct platform_device *serial8250_isa_devs; @@ -322,8 +325,7 @@ static int __init serial8250_init(void) if (ret) goto unreg_uart_drv; - serial8250_isa_devs = platform_device_alloc("serial8250", - PLAT8250_DEV_LEGACY); + serial8250_isa_devs = platform_device_alloc("serial8250", PLAT8250_DEV_LEGACY); if (!serial8250_isa_devs) { ret = -ENOMEM; goto unreg_pnp; @@ -362,7 +364,7 @@ static void __exit serial8250_exit(void) /* * This tells serial8250_unregister_port() not to re-register * the ports (thereby making serial8250_isa_driver permanently - * in use.) + * in use). */ serial8250_isa_devs = NULL; @@ -395,12 +397,13 @@ MODULE_ALIAS_CHARDEV_MAJOR(TTY_MAJOR); #ifdef CONFIG_SERIAL_8250_DEPRECATED_OPTIONS #ifndef MODULE -/* This module was renamed to 8250_core in 3.7. Keep the old "8250" name - * working as well for the module options so we don't break people. We +/* + * This module was renamed to 8250_core in 3.7. Keep the old "8250" name + * working as well for the module options so we don't break people. We * need to keep the names identical and the convenient macros will happily * refuse to let us do that by failing the build with redefinition errors - * of global variables. So we stick them inside a dummy function to avoid - * those conflicts. The options still get parsed, and the redefined + * of global variables. So we stick them inside a dummy function to avoid + * those conflicts. The options still get parsed, and the redefined * MODULE_PARAM_PREFIX lets us keep the "8250." syntax alive. * * This is hacky. I'm sorry. |