From 2bf3440d7b8755f2627232e6a4c37efbbe053685 Mon Sep 17 00:00:00 2001 From: Oliver Hartkopp Date: Mon, 28 Jan 2013 08:33:33 +0000 Subject: 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 CC: Marc Kleine-Budde Signed-off-by: David S. Miller --- include/linux/can/skb.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'include/linux/can/skb.h') 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 { struct can_frame cf[0]; }; +static inline struct can_skb_priv *can_skb_prv(struct sk_buff *skb) +{ + return (struct can_skb_priv *)(skb->head); +} + +static inline void can_skb_reserve(struct sk_buff *skb) +{ + skb_reserve(skb, sizeof(struct can_skb_priv)); +} + #endif /* CAN_SKB_H */ -- cgit v1.2.3