| From 49d759919c99a3cb5391a446f5541f606c65e3c1 Mon Sep 17 00:00:00 2001 |
| From: Alexey Dobriyan <adobriyan@gmail.com> |
| Date: Thu, 16 Jun 2011 11:01:34 +0000 |
| Subject: net: remove mm.h inclusion from netdevice.h |
| |
| Remove linux/mm.h inclusion from netdevice.h -- it's unused (I've checked manually). |
| |
| To prevent mm.h inclusion via other channels also extract "enum dma_data_direction" |
| definition into separate header. This tiny piece is what gluing netdevice.h with mm.h |
| via "netdevice.h => dmaengine.h => dma-mapping.h => scatterlist.h => mm.h". |
| Removal of mm.h from scatterlist.h was tried and was found not feasible |
| on most archs, so the link was cutoff earlier. |
| |
| Hope people are OK with tiny include file. |
| |
| Note, that mm_types.h is still dragged in, but it is a separate story. |
| |
| Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> |
| Signed-off-by: David S. Miller <davem@davemloft.net> |
| (cherry picked from commit b7f080cfe223b3b7424872639d153695615a9255) |
| |
| Conflicts: |
| |
| arch/arm/mach-davinci/board-mityomapl138.c |
| arch/arm/mach-davinci/dm646x.c |
| arch/arm/mach-davinci/pm.c |
| arch/arm/mach-imx/dma-v1.c |
| arch/arm/mach-imx/mach-mx31_3ds.c |
| arch/arm/mach-iop13xx/setup.c |
| arch/arm/mach-mxs/devices/platform-auart.c |
| arch/arm/mach-mxs/devices/platform-dma.c |
| arch/arm/mach-mxs/devices/platform-fec.c |
| arch/arm/plat-mxc/devices/platform-fec.c |
| arch/arm/plat-mxc/devices/platform-fsl-usb2-udc.c |
| arch/arm/plat-mxc/devices/platform-imx-fb.c |
| arch/arm/plat-mxc/devices/platform-ipu-core.c |
| arch/arm/plat-mxc/devices/platform-mxc-ehci.c |
| arch/arm/plat-mxc/devices/platform-mxc-mmc.c |
| arch/arm/plat-nomadik/include/plat/ste_dma40.h |
| arch/x86/kernel/tboot.c |
| crypto/async_tx/raid6test.c |
| drivers/dma/coh901318.c |
| drivers/dma/dmatest.c |
| drivers/dma/ipu/ipu_idmac.c |
| drivers/dma/ste_dma40.c |
| drivers/media/dvb/mantis/mantis_ca.c |
| drivers/media/dvb/mantis/mantis_evm.c |
| drivers/media/dvb/mantis/mantis_hif.c |
| drivers/media/dvb/mantis/mantis_ioc.c |
| drivers/media/dvb/mantis/mantis_pcmcia.c |
| drivers/media/dvb/mantis/mantis_uart.c |
| drivers/media/dvb/mantis/mantis_vp1034.c |
| drivers/mmc/host/tmio_mmc_dma.c |
| drivers/mtd/nand/atmel_nand.c |
| drivers/net/arm/ks8695net.c |
| drivers/net/bnx2x/bnx2x.h |
| drivers/net/can/janz-ican3.c |
| drivers/net/can/softing/softing_fw.c |
| drivers/net/can/softing/softing_main.c |
| drivers/net/ethoc.c |
| drivers/net/fec_mpc52xx.c |
| drivers/net/greth.c |
| drivers/net/irda/pxaficp_ir.c |
| drivers/net/ks8851_mll.c |
| drivers/net/sgiseeq.c |
| drivers/net/stmmac/dwmac1000_core.c |
| drivers/net/stmmac/dwmac1000_dma.c |
| drivers/net/stmmac/dwmac100_core.c |
| drivers/net/stmmac/dwmac100_dma.c |
| drivers/net/stmmac/stmmac_ethtool.c |
| drivers/net/stmmac/stmmac_mdio.c |
| drivers/net/usb/cdc-phonet.c |
| drivers/net/vxge/vxge-config.h |
| drivers/net/wireless/ath/ath5k/base.c |
| drivers/net/wireless/ath/ath9k/beacon.c |
| drivers/net/wireless/ath/ath9k/init.c |
| drivers/net/wireless/ath/ath9k/recv.c |
| drivers/net/wireless/ath/ath9k/xmit.c |
| drivers/staging/pohmelfs/crypto.c |
| drivers/tty/serial/ifx6x60.c |
| drivers/usb/gadget/f_phonet.c |
| include/crypto/if_alg.h |
| include/linux/netdevice.h |
| net/sched/sch_netem.c |
| security/apparmor/lib.c |
| |
| Signed-off-by: Simon Horman <horms@verge.net.au> |
| --- |
| drivers/dma/dmaengine.c | 1 + |
| include/linux/dma-direction.h | 13 +++++++++++++ |
| include/linux/dma-mapping.h | 10 +--------- |
| include/linux/dmaengine.h | 4 +++- |
| 4 files changed, 18 insertions(+), 10 deletions(-) |
| create mode 100644 include/linux/dma-direction.h |
| |
| diff --git a/drivers/dma/dmaengine.c b/drivers/dma/dmaengine.c |
| index 8bcb15f..48694c3 100644 |
| --- a/drivers/dma/dmaengine.c |
| +++ b/drivers/dma/dmaengine.c |
| @@ -45,6 +45,7 @@ |
| * See Documentation/dmaengine.txt for more details |
| */ |
| |
| +#include <linux/dma-mapping.h> |
| #include <linux/init.h> |
| #include <linux/module.h> |
| #include <linux/mm.h> |
| diff --git a/include/linux/dma-direction.h b/include/linux/dma-direction.h |
| new file mode 100644 |
| index 0000000..95b6a82 |
| --- /dev/null |
| +++ b/include/linux/dma-direction.h |
| @@ -0,0 +1,13 @@ |
| +#ifndef _LINUX_DMA_DIRECTION_H |
| +#define _LINUX_DMA_DIRECTION_H |
| +/* |
| + * These definitions mirror those in pci.h, so they can be used |
| + * interchangeably with their PCI_ counterparts. |
| + */ |
| +enum dma_data_direction { |
| + DMA_BIDIRECTIONAL = 0, |
| + DMA_TO_DEVICE = 1, |
| + DMA_FROM_DEVICE = 2, |
| + DMA_NONE = 3, |
| +}; |
| +#endif |
| diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h |
| index ba8319a..1a167c4 100644 |
| --- a/include/linux/dma-mapping.h |
| +++ b/include/linux/dma-mapping.h |
| @@ -4,17 +4,9 @@ |
| #include <linux/device.h> |
| #include <linux/err.h> |
| #include <linux/dma-attrs.h> |
| +#include <linux/dma-direction.h> |
| #include <linux/scatterlist.h> |
| |
| -/* These definitions mirror those in pci.h, so they can be used |
| - * interchangeably with their PCI_ counterparts */ |
| -enum dma_data_direction { |
| - DMA_BIDIRECTIONAL = 0, |
| - DMA_TO_DEVICE = 1, |
| - DMA_FROM_DEVICE = 2, |
| - DMA_NONE = 3, |
| -}; |
| - |
| struct dma_map_ops { |
| void* (*alloc_coherent)(struct device *dev, size_t size, |
| dma_addr_t *dma_handle, gfp_t gfp); |
| diff --git a/include/linux/dmaengine.h b/include/linux/dmaengine.h |
| index eee7add..8fbf40e 100644 |
| --- a/include/linux/dmaengine.h |
| +++ b/include/linux/dmaengine.h |
| @@ -23,7 +23,9 @@ |
| |
| #include <linux/device.h> |
| #include <linux/uio.h> |
| -#include <linux/dma-mapping.h> |
| +#include <linux/dma-direction.h> |
| + |
| +struct scatterlist; |
| |
| /** |
| * typedef dma_cookie_t - an opaque DMA cookie |
| -- |
| 1.7.10.2.565.gbd578b5 |
| |