Re: [PATCH] serial: core: Fix serial core port id to not use port->line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux