Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 351689
b: refs/heads/master
c: 5090f80
h: refs/heads/master
i:
  351687: dc85079
v: v3
  • Loading branch information
Fabio Baltieri authored and Marc Kleine-Budde committed Jan 26, 2013
1 parent a5d9adc commit f8963c0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d7ff5aae6ce3670afc1e000c08ea238712d70fae
refs/heads/master: 5090f805600ff7dccca358f9986a92dd34185326
10 changes: 10 additions & 0 deletions trunk/drivers/net/can/c_can/c_can.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <linux/can.h>
#include <linux/can/dev.h>
#include <linux/can/error.h>
#include <linux/can/led.h>

#include "c_can.h"

Expand Down Expand Up @@ -477,6 +478,8 @@ static int c_can_read_msg_object(struct net_device *dev, int iface, int ctrl)
stats->rx_packets++;
stats->rx_bytes += frame->can_dlc;

can_led_event(dev, CAN_LED_EVENT_RX);

return 0;
}

Expand Down Expand Up @@ -751,6 +754,7 @@ static void c_can_do_tx(struct net_device *dev)
C_CAN_IFACE(MSGCTRL_REG, 0))
& IF_MCONT_DLC_MASK;
stats->tx_packets++;
can_led_event(dev, CAN_LED_EVENT_TX);
c_can_inval_msg_object(dev, 0, msg_obj_no);
} else {
break;
Expand Down Expand Up @@ -1115,6 +1119,8 @@ static int c_can_open(struct net_device *dev)

napi_enable(&priv->napi);

can_led_event(dev, CAN_LED_EVENT_OPEN);

/* start the c_can controller */
c_can_start(dev);

Expand Down Expand Up @@ -1143,6 +1149,8 @@ static int c_can_close(struct net_device *dev)
c_can_reset_ram(priv, false);
c_can_pm_runtime_put_sync(priv);

can_led_event(dev, CAN_LED_EVENT_STOP);

return 0;
}

Expand Down Expand Up @@ -1268,6 +1276,8 @@ int register_c_can_dev(struct net_device *dev)
err = register_candev(dev);
if (err)
c_can_pm_runtime_disable(priv);
else
devm_can_led_init(dev);

return err;
}
Expand Down

0 comments on commit f8963c0

Please sign in to comment.