diff options
-rw-r--r-- | include/linux/dmaengine.h | 12 | ||||
-rw-r--r-- | net/core/dev.c | 4 |
2 files changed, 14 insertions, 2 deletions
diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h index 3e0f64c335c8..3e68469c1885 100644 --- a/include/linux/dmaengine.h +++ b/include/linux/dmaengine.h | |||
@@ -282,6 +282,18 @@ static inline void dmaengine_put(void) | |||
282 | } | 282 | } |
283 | #endif | 283 | #endif |
284 | 284 | ||
285 | #ifdef CONFIG_NET_DMA | ||
286 | #define net_dmaengine_get() dmaengine_get() | ||
287 | #define net_dmaengine_put() dmaengine_put() | ||
288 | #else | ||
289 | static inline void net_dmaengine_get(void) | ||
290 | { | ||
291 | } | ||
292 | static inline void net_dmaengine_put(void) | ||
293 | { | ||
294 | } | ||
295 | #endif | ||
296 | |||
285 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, | 297 | dma_cookie_t dma_async_memcpy_buf_to_buf(struct dma_chan *chan, |
286 | void *dest, void *src, size_t len); | 298 | void *dest, void *src, size_t len); |
287 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, | 299 | dma_cookie_t dma_async_memcpy_buf_to_pg(struct dma_chan *chan, |
diff --git a/net/core/dev.c b/net/core/dev.c index 5379b0c1190a..a17e00662363 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1090,7 +1090,7 @@ int dev_open(struct net_device *dev) | |||
1090 | /* | 1090 | /* |
1091 | * Enable NET_DMA | 1091 | * Enable NET_DMA |
1092 | */ | 1092 | */ |
1093 | dmaengine_get(); | 1093 | net_dmaengine_get(); |
1094 | 1094 | ||
1095 | /* | 1095 | /* |
1096 | * Initialize multicasting status | 1096 | * Initialize multicasting status |
@@ -1172,7 +1172,7 @@ int dev_close(struct net_device *dev) | |||
1172 | /* | 1172 | /* |
1173 | * Shutdown NET_DMA | 1173 | * Shutdown NET_DMA |
1174 | */ | 1174 | */ |
1175 | dmaengine_put(); | 1175 | net_dmaengine_put(); |
1176 | 1176 | ||
1177 | return 0; | 1177 | return 0; |
1178 | } | 1178 | } |