lkml.org 
[lkml]   [2023]   [Jul]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] serial: core: Fix serial core port id to not use port->line
From
On 19. 07. 23, 7:12, Tony Lindgren wrote:
> The serial core port id should be serial core controller specific port
> instance, which is not always the port->line index.
>
> For example, 8250 driver maps a number of legacy ports, and when a
> hardware specific device driver takes over, we typically have one
> driver instance for each port. Let's instead add port->port_id to
> keep track serial ports mapped to each serial core controller instance.
>
> Currently this is only a cosmetic issue for the serial core port device
> names. The issue can be noticed looking at /sys/bus/serial-base/devices
> for example though. Let's fix the issue to avoid port addressing issues
> later on.

...
> --- a/include/linux/serial_core.h
> +++ b/include/linux/serial_core.h
> @@ -460,6 +460,7 @@ struct uart_port {
> int (*iso7816_config)(struct uart_port *,
> struct serial_iso7816 *iso7816);
> int ctrl_id; /* optional serial core controller id */
> + int port_id; /* optional serial core port id */

Can the id be negative? If not, please use uint.

thanks,
--
js
suse labs

\
 
 \ /
  Last update: 2023-07-19 07:27    [W:0.034 / U:1.096 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site