From: FUJITA Tomonori Date: Wed, 7 Jul 2010 23:52:37 +0000 (+0000) Subject: cxgb4vf: remove obsolete DECLARE_PCI_UNMAP_ADDR usage X-Git-Tag: MMI-PSA29.97-13-9~23092^2~310 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=57b2eaf7ddeae307fac202d82a6fabf5976e575b;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git cxgb4vf: remove obsolete DECLARE_PCI_UNMAP_ADDR usage We could use DEFINE_DMA_UNMAP_ADDR instead but using CONFIG_NEED_DMA_MAP_STATE is a simpler way 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/cxgb4vf/sge.c b/drivers/net/cxgb4vf/sge.c index 3a7c02f98a4d..4bc1858dc303 100644 --- a/drivers/net/cxgb4vf/sge.c +++ b/drivers/net/cxgb4vf/sge.c @@ -228,15 +228,11 @@ static inline bool is_buf_mapped(const struct rx_sw_desc *sdesc) */ static inline int need_skb_unmap(void) { - /* - * This structure is used to tell if the platfrom needs buffer - * unmapping by checking if DECLARE_PCI_UNMAP_ADDR defines anything. - */ - struct dummy { - DECLARE_PCI_UNMAP_ADDR(addr); - }; - - return sizeof(struct dummy) != 0; +#ifdef CONFIG_NEED_DMA_MAP_STATE + return 1; +#else + return 0; +#endif } /**