summaryrefslogtreecommitdiff
path: root/drivers/net/can/usb/peak_usb/pcan_usb_core.c
diff options
context:
space:
mode:
authorStephane Grosjean <s.grosjean@peak-system.com>2015-01-23 13:31:20 +0300
committerMarc Kleine-Budde <mkl@pengutronix.de>2015-01-28 16:47:05 +0300
commite3629f5657e653c413b2970a91e5f9ea123b36dc (patch)
tree11240bb5878a4722773b10cc12baac38fd2e7fa3 /drivers/net/can/usb/peak_usb/pcan_usb_core.c
parente3c5ea60b474f9ba7e99542325416ca6d833cba9 (diff)
downloadlinux-e3629f5657e653c413b2970a91e5f9ea123b36dc.tar.xz
can: peak_usb: add adapter BEC callback definition
Add the definition of a new callback that enable any PEAK-System CAN USB adapter to grant read access to its Bus Error Counters value. This ability is not supported by all the PEAK-System adapters, thus, for those, the callback pointer will be initiaized to NULL, which is correct regarding the linux-can device driver specs. Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Diffstat (limited to 'drivers/net/can/usb/peak_usb/pcan_usb_core.c')
-rw-r--r--drivers/net/can/usb/peak_usb/pcan_usb_core.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/can/usb/peak_usb/pcan_usb_core.c b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
index 2768399a52fa..38634323ec51 100644
--- a/drivers/net/can/usb/peak_usb/pcan_usb_core.c
+++ b/drivers/net/can/usb/peak_usb/pcan_usb_core.c
@@ -750,6 +750,7 @@ static int peak_usb_create_dev(const struct peak_usb_adapter *peak_usb_adapter,
dev->can.bittiming_const = &peak_usb_adapter->bittiming_const;
dev->can.do_set_bittiming = peak_usb_set_bittiming;
dev->can.do_set_mode = peak_usb_set_mode;
+ dev->can.do_get_berr_counter = peak_usb_adapter->do_get_berr_counter;
dev->can.ctrlmode_supported = peak_usb_adapter->ctrlmode_supported;
netdev->netdev_ops = &peak_usb_netdev_ops;