mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 04:56:13 +02:00
can: kvaser_usb: Assign netdev.dev_port based on device channel index
Assign netdev.dev_port based on the device channel index, to indicate the
port number of the network device.
While this driver already uses netdev.dev_id for that purpose, dev_port is
more appropriate. However, retain dev_id to avoid potential regressions.
Fixes: 3e66d0138c ("can: populate netdev::dev_id for udev discrimination")
Reviewed-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Signed-off-by: Jimmy Assarsson <extja@kvaser.com>
Link: https://patch.msgid.link/20250725123452.41-4-extja@kvaser.com
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
This commit is contained in:
parent
3d7a3de9eb
commit
c151b06a08
|
|
@ -878,6 +878,7 @@ static int kvaser_usb_init_one(struct kvaser_usb *dev, int channel)
|
|||
netdev->ethtool_ops = &kvaser_usb_ethtool_ops;
|
||||
SET_NETDEV_DEV(netdev, &dev->intf->dev);
|
||||
netdev->dev_id = channel;
|
||||
netdev->dev_port = channel;
|
||||
|
||||
dev->nets[channel] = priv;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user