diff mbox

[v2] mmc: mmci_qcom_dml: include mmci_qcom_dml.h and fix #ifdef

Message ID CAK8P3a1K7hCejjFQhnS8tbLP0+dZH15W1bzUCZpP-SHtyJaaAQ@mail.gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Arnd Bergmann Aug. 6, 2017, 8:41 p.m. UTC
On Sun, Aug 6, 2017 at 12:26 PM, Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
>
>
> On 04/08/17 23:10, Arnd Bergmann wrote:
>>
>> How about linking the DML code into the mmci module and making that
>> Kconfig option a 'bool'?
>
>
>
> Yes, I think making this bool and exporting the two symbols should fix this.
> It does not make sense to make dml helpers a module anyway.
>
> If it sounds okay, I can send a proper patch to fix this.

I would say making dml a 'bool' option is not ok unless you also change
the Makefile to link it into the same module as the base mmci driver.

The alternative is to export the symbols and then always build the
dml code as a module when the mmci driver is a module, as below.

Or even just move all the code into the base driver, and call it only
using an if(IS_ENABLED()) check for the bool symbol.

       Arnd

--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/mmc/host/Makefile b/drivers/mmc/host/Makefile
index 8c46766c000c..5c996cba9f25 100644
--- a/drivers/mmc/host/Makefile
+++ b/drivers/mmc/host/Makefile
@@ -3,7 +3,9 @@ 
 #

 obj-$(CONFIG_MMC_ARMMMCI) += mmci.o
-obj-$(CONFIG_MMC_QCOM_DML) += mmci_qcom_dml.o
+ifdef CONFIG_MMC_QCOM_DML
+obj-$(CONFIG_MMC_ARMMMCI) += mmci_qcom_dml.o
+endif
 obj-$(CONFIG_MMC_PXA) += pxamci.o
 obj-$(CONFIG_MMC_MXC) += mxcmmc.o
 obj-$(CONFIG_MMC_MXS) += mxs-mmc.o