Skip to content

Commit

Permalink
can: peak_usb: correction of an initially misnamed field name
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Stephane Grosjean authored and Marc Kleine-Budde committed Jul 19, 2022
1 parent 92505df commit a0cf2fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/net/can/usb/peak_usb/pcan_usb_pro.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion drivers/net/can/usb/peak_usb/pcan_usb_pro.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a0cf2fe

Please sign in to comment.