From: FUJITA Tomonori Date: Wed, 7 Jul 2010 23:52:38 +0000 (+0000) Subject: cxgb3: simplify need_skb_unmap X-Git-Tag: MMI-PSA29.97-13-9~23092^2~309 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=122e28ebac2cc2378101d1d37a5886c3ac1f8b18;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git cxgb3: simplify need_skb_unmap We can use CONFIG_NEED_DMA_MAP_STATE to see if a platform does real DMA unmapping. Signed-off-by: FUJITA Tomonori Signed-off-by: David S. Miller --- diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c index 5962b911b5bd..8ff96c6f6de5 100644 --- a/drivers/net/cxgb3/sge.c +++ b/drivers/net/cxgb3/sge.c @@ -203,15 +203,11 @@ static inline void refill_rspq(struct adapter *adapter, */ static inline int need_skb_unmap(void) { - /* - * This structure is used to tell if the platform needs buffer - * unmapping by checking if DECLARE_PCI_UNMAP_ADDR defines anything. - */ - struct dummy { - DEFINE_DMA_UNMAP_ADDR(addr); - }; - - return sizeof(struct dummy) != 0; +#ifdef CONFIG_NEED_DMA_MAP_STATE + return 1; +#else + return 0; +#endif } /**