diff options
author | Stephane Grosjean <s.grosjean@peak-system.com> | 2015-01-23 13:31:20 +0300 |
---|---|---|
committer | Marc Kleine-Budde <mkl@pengutronix.de> | 2015-01-28 16:47:05 +0300 |
commit | e3629f5657e653c413b2970a91e5f9ea123b36dc (patch) | |
tree | 11240bb5878a4722773b10cc12baac38fd2e7fa3 /drivers/net/can/usb/peak_usb/pcan_usb_core.c | |
parent | e3c5ea60b474f9ba7e99542325416ca6d833cba9 (diff) | |
download | linux-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.c | 1 |
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; |