summaryrefslogtreecommitdiff
path: root/include/linux/can/dev.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/can/dev.h')
-rw-r--r--include/linux/can/dev.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h
index 2413253e54c7..6dacbbb41e68 100644
--- a/include/linux/can/dev.h
+++ b/include/linux/can/dev.h
@@ -96,6 +96,10 @@ struct can_priv {
#endif
};
+static inline bool can_tdc_is_enabled(const struct can_priv *priv)
+{
+ return !!(priv->ctrlmode & CAN_CTRLMODE_TDC_MASK);
+}
/* helper to define static CAN controller features at device creation time */
static inline void can_set_static_ctrlmode(struct net_device *dev,