can: peak_usb: correction of an initially misnamed field name
authorStephane Grosjean <s.grosjean@peak-system.com>
Tue, 19 Jul 2022 12:06:31 +0000 (14:06 +0200)
committerMarc Kleine-Budde <mkl@pengutronix.de>
Tue, 19 Jul 2022 19:22:05 +0000 (21:22 +0200)
The data structure returned from the USB device contains a number
flashed by the user and not the serial number of the device.

Link: https://lore.kernel.org/all/20220719120632.26774-2-s.grosjean@peak-system.com
Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
drivers/net/can/usb/peak_usb/pcan_usb_pro.c
drivers/net/can/usb/peak_usb/pcan_usb_pro.h

index ebe087f258e30bec2ebf0963e6e172e1c80e13e4..457887113e7551fc155bcc088430424ac3c91462 100644 (file)
@@ -439,7 +439,7 @@ static int pcan_usb_pro_get_device_id(struct peak_usb_device *dev,
                return err;
 
        pdn = (struct pcan_usb_pro_devid *)pc;
-       *device_id = le32_to_cpu(pdn->serial_num);
+       *device_id = le32_to_cpu(pdn->dev_num);
 
        return err;
 }
index 5d4cf14eb9d9e3190a79e200f9c412ca4cfa21d8..a34e0fc021c96354aeeb0d31fe6acec94a576deb 100644 (file)
@@ -112,7 +112,7 @@ struct __packed pcan_usb_pro_devid {
        u8 data_type;
        u8 channel;
        __le16 dummy;
-       __le32 serial_num;
+       __le32 dev_num;
 };
 
 #define PCAN_USBPRO_LED_DEVICE         0x00