lkml.org 
[lkml]   [2021]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/3] tty: serial: Add UART driver for Cortina-Access platform
On Thu, Feb 18, 2021 at 06:42:09PM -0800, Alex Nemirovsky wrote:
> +static struct cortina_uart_port *cortina_uart_ports;

Why is this not a per-device pointer?

> +static void __exit cortina_uart_exit(void)
> +{
> + platform_driver_unregister(&serial_cortina_driver);
> + uart_unregister_driver(&cortina_uart_driver);
> + kfree(cortina_uart_ports);

Should not need to free this here, it should be tied to the device, not
the driver.


> +}
> +
> +module_init(cortina_uart_init);
> +module_exit(cortina_uart_exit);
> +
> +MODULE_AUTHOR("Cortina-Access Inc.");
> +MODULE_DESCRIPTION(" Cortina-Access UART driver");
> +MODULE_LICENSE("GPL");
> diff --git a/include/uapi/linux/serial_core.h b/include/uapi/linux/serial_core.h
> index 62c2204..1931892 100644
> --- a/include/uapi/linux/serial_core.h
> +++ b/include/uapi/linux/serial_core.h
> @@ -277,4 +277,7 @@
> /* Freescale LINFlexD UART */
> #define PORT_LINFLEXUART 122
>
> +/* Cortina-Access UART */
> +#define PORT_CORTINA_ACCESS 123

Also, no need for this, right? I would prefer to not add new ids if at
all possible.

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-03-23 10:25    [W:0.100 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site