Skip to content

Commit a0cf2fe

Browse files
Stephane Grosjeanmarckleinebudde
authored andcommitted
can: peak_usb: correction of an initially misnamed field name
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/[email protected] Signed-off-by: Stephane Grosjean <[email protected]> Signed-off-by: Marc Kleine-Budde <[email protected]>
1 parent 92505df commit a0cf2fe

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/net/can/usb/peak_usb/pcan_usb_pro.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ static int pcan_usb_pro_get_device_id(struct peak_usb_device *dev,
439439
return err;
440440

441441
pdn = (struct pcan_usb_pro_devid *)pc;
442-
*device_id = le32_to_cpu(pdn->serial_num);
442+
*device_id = le32_to_cpu(pdn->dev_num);
443443

444444
return err;
445445
}

drivers/net/can/usb/peak_usb/pcan_usb_pro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct __packed pcan_usb_pro_devid {
112112
u8 data_type;
113113
u8 channel;
114114
__le16 dummy;
115-
__le32 serial_num;
115+
__le32 dev_num;
116116
};
117117

118118
#define PCAN_USBPRO_LED_DEVICE 0x00

0 commit comments

Comments
 (0)