Skip to content

Commit b0d4724

Browse files
Stephane Grosjeanmarckleinebudde
authored andcommitted
can: peak_usb: fix missing ctrlmode_ init for every dev
Fixes a missing initialization of ctrlmode and ctrlmode_supported fields, for all other CAN devices than the first one. This fix only concerns the PCAN-USB Pro FD dual-channels CAN-FD device made by PEAK-System. Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
1 parent 9694390 commit b0d4724

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎drivers/net/can/usb/peak_usb/pcan_usb_fd.c‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -879,6 +879,10 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev)
879879

880880
pdev->usb_if = ppdev->usb_if;
881881
pdev->cmd_buffer_addr = ppdev->cmd_buffer_addr;
882+
883+
/* do a copy of the ctrlmode[_supported] too */
884+
dev->can.ctrlmode = ppdev->dev.can.ctrlmode;
885+
dev->can.ctrlmode_supported = ppdev->dev.can.ctrlmode_supported;
882886
}
883887

884888
pdev->usb_if->dev[dev->ctrl_idx] = dev;

0 commit comments

Comments
 (0)