diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-12-28 03:23:13 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-12-28 03:23:13 -0500 |
| commit | 605c1a187f3ce82fbc243e2163c5ca8d1926df8e (patch) | |
| tree | c8065a8c5606a66f81dc494ce22a5baa5e0dfe7e /include/linux/can/dev.h | |
| parent | 17a2a9b57a9a7d2fd8f97df951b5e63e0bd56ef5 (diff) | |
| parent | ce9277fb08e6e721482f7011ca28dcd0449b197c (diff) | |
Merge branch 'iommu/fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/linux-2.6-iommu into x86/urgent
Diffstat (limited to 'include/linux/can/dev.h')
| -rw-r--r-- | include/linux/can/dev.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/can/dev.h b/include/linux/can/dev.h index 1ed2a5cc03f5..3db7767d2a17 100644 --- a/include/linux/can/dev.h +++ b/include/linux/can/dev.h | |||
| @@ -51,6 +51,15 @@ struct can_priv { | |||
| 51 | struct sk_buff **echo_skb; | 51 | struct sk_buff **echo_skb; |
| 52 | }; | 52 | }; |
| 53 | 53 | ||
| 54 | /* | ||
| 55 | * get_can_dlc(value) - helper macro to cast a given data length code (dlc) | ||
| 56 | * to __u8 and ensure the dlc value to be max. 8 bytes. | ||
| 57 | * | ||
| 58 | * To be used in the CAN netdriver receive path to ensure conformance with | ||
| 59 | * ISO 11898-1 Chapter 8.4.2.3 (DLC field) | ||
| 60 | */ | ||
| 61 | #define get_can_dlc(i) (min_t(__u8, (i), 8)) | ||
| 62 | |||
| 54 | struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); | 63 | struct net_device *alloc_candev(int sizeof_priv, unsigned int echo_skb_max); |
| 55 | void free_candev(struct net_device *dev); | 64 | void free_candev(struct net_device *dev); |
| 56 | 65 | ||
