diff options
author | Stephane Grosjean <s.grosjean@peak-system.com> | 2015-03-02 11:54:38 +0100 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-03-09 10:22:24 +0100 |
commit | b0d4724b8e4ce2a60ee4e097ec50c3759ec2090a (patch) | |
tree | 99ee4e832a88b14e1f4b0caf065a631f85164c09 /drivers | |
parent | 969439016d2cf61fef53a973d7e6d2061c3793b1 (diff) | |
download | linux-stable-b0d4724b8e4ce2a60ee4e097ec50c3759ec2090a.tar.gz linux-stable-b0d4724b8e4ce2a60ee4e097ec50c3759ec2090a.tar.bz2 linux-stable-b0d4724b8e4ce2a60ee4e097ec50c3759ec2090a.zip |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/can/usb/peak_usb/pcan_usb_fd.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c index 962c3f027383..0bac0f14edc3 100644 --- a/drivers/net/can/usb/peak_usb/pcan_usb_fd.c +++ b/drivers/net/can/usb/peak_usb/pcan_usb_fd.c @@ -879,6 +879,10 @@ static int pcan_usb_fd_init(struct peak_usb_device *dev) pdev->usb_if = ppdev->usb_if; pdev->cmd_buffer_addr = ppdev->cmd_buffer_addr; + + /* do a copy of the ctrlmode[_supported] too */ + dev->can.ctrlmode = ppdev->dev.can.ctrlmode; + dev->can.ctrlmode_supported = ppdev->dev.can.ctrlmode_supported; } pdev->usb_if->dev[dev->ctrl_idx] = dev; |