]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
cxgb3: simplify need_skb_unmap
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Wed, 7 Jul 2010 23:52:38 +0000 (23:52 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 9 Jul 2010 06:12:27 +0000 (23:12 -0700)
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>
drivers/net/cxgb3/sge.c

index 5962b911b5bd34e9d1433bc6ab99976c066838f5..8ff96c6f6de53304789a16de04a98ac86d1f7d15 100644 (file)
@@ -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
 }
 
 /**