diff options
| author | Oliver Hartkopp <socketcan@hartkopp.net> | 2013-01-28 03:33:33 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2013-01-28 18:17:25 -0500 |
| commit | 2bf3440d7b8755f2627232e6a4c37efbbe053685 (patch) | |
| tree | 07e31649ec6a5d58649f6b3c9f8cd1a76e76b24f /include/linux/can | |
| parent | cef401de7be8c4e155c6746bfccf721a4fa5fab9 (diff) | |
can: rework skb reserved data handling
Added accessor and skb_reserve helpers for struct can_skb_priv.
Removed pointless skb_headroom() check.
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
CC: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/can')
| -rw-r--r-- | include/linux/can/skb.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/can/skb.h b/include/linux/can/skb.h index 4b0f24d3a878..2f0543f7510c 100644 --- a/include/linux/can/skb.h +++ b/include/linux/can/skb.h | |||
| @@ -32,4 +32,14 @@ struct can_skb_priv { | |||
| 32 | struct can_frame cf[0]; | 32 | struct can_frame cf[0]; |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | static inline struct can_skb_priv *can_skb_prv(struct sk_buff *skb) | ||
| 36 | { | ||
| 37 | return (struct can_skb_priv *)(skb->head); | ||
| 38 | } | ||
| 39 | |||
| 40 | static inline void can_skb_reserve(struct sk_buff *skb) | ||
| 41 | { | ||
| 42 | skb_reserve(skb, sizeof(struct can_skb_priv)); | ||
| 43 | } | ||
| 44 | |||
| 35 | #endif /* CAN_SKB_H */ | 45 | #endif /* CAN_SKB_H */ |
