aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2010-07-07 19:52:38 -0400
committerDavid S. Miller <davem@davemloft.net>2010-07-09 02:12:27 -0400
commit122e28ebac2cc2378101d1d37a5886c3ac1f8b18 (patch)
treea3033c47ebc31e5e5e106de2cb71a6b026bea8e0
parent57b2eaf7ddeae307fac202d82a6fabf5976e575b (diff)
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 <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/cxgb3/sge.c14
1 files changed, 5 insertions, 9 deletions
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,
203 */ 203 */
204static inline int need_skb_unmap(void) 204static inline int need_skb_unmap(void)
205{ 205{
206 /* 206#ifdef CONFIG_NEED_DMA_MAP_STATE
207 * This structure is used to tell if the platform needs buffer 207 return 1;
208 * unmapping by checking if DECLARE_PCI_UNMAP_ADDR defines anything. 208#else
209 */ 209 return 0;
210 struct dummy { 210#endif
211 DEFINE_DMA_UNMAP_ADDR(addr);
212 };
213
214 return sizeof(struct dummy) != 0;
215} 211}
216 212
217/** 213/**