From f616ab59c294b6ea6efa94f6139ea3eda2f52be0 Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Wed, 9 May 2018 06:53:49 +0200
Subject: dma-mapping: move the NEED_DMA_MAP_STATE config symbol to lib/Kconfig

This way we have one central definition of it, and user can select it as
needed.  Note that we now also always select it when CONFIG_DMA_API_DEBUG
is select, which fixes some incorrect checks in a few network drivers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Anshuman Khandual <khandual@linux.vnet.ibm.com>
---
 lib/Kconfig       | 3 +++
 lib/Kconfig.debug | 1 +
 2 files changed, 4 insertions(+)

(limited to 'lib')

diff --git a/lib/Kconfig b/lib/Kconfig
index aeb7fae16bc2..ce9fa962d59b 100644
--- a/lib/Kconfig
+++ b/lib/Kconfig
@@ -432,6 +432,9 @@ config SGL_ALLOC
 config NEED_SG_DMA_LENGTH
 	bool
 
+config NEED_DMA_MAP_STATE
+	bool
+
 config IOMMU_HELPER
 	bool
 
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
index 45100eda1dab..d5175eb7b917 100644
--- a/lib/Kconfig.debug
+++ b/lib/Kconfig.debug
@@ -1634,6 +1634,7 @@ config PROVIDE_OHCI1394_DMA_INIT
 
 config DMA_API_DEBUG
 	bool "Enable debugging of DMA-API usage"
+	select NEED_DMA_MAP_STATE
 	help
 	  Enable this option to debug the use of the DMA API by device drivers.
 	  With this option you will be able to detect common bugs in device
-- 
cgit v1.2.1