The Kconfig currently controlling compilation of this code is:

drivers/staging/android/ion/Kconfig:config ION_TEGRA
drivers/staging/android/ion/Kconfig:    tristate "Ion for Tegra"

...which led me to incorrectly conclude this file was built modular
earlier.  However the above CONFIG is just used to enter the dir and
once we do enter that dir, we see the build is unconditional:

drivers/staging/android/ion/Makefile:obj-$(CONFIG_ION_TEGRA) += tegra/
drivers/staging/android/ion/tegra/Makefile:obj-y += tegra_ion.o

...meaning that it currently is not being built as a module by anyone.

However, given that the Kconfig did explicitly choose tristate, and that
the dummy ion driver is (functionally) tristate, I chose to make the
Makefile do the right thing for it to build as a module.

After this change, on an ARM allmodconfig, we see:

  CC [M]  drivers/staging/android/ion/tegra/tegra_ion.o

so it does build OK as a module.  I can't vouch for the modular
functionality however, so consider this compile tested only.

Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org>
Cc: "Arve Hjønnevåg" <a...@android.com>
Cc: Riley Andrews <riandr...@android.com>
Cc: Stephen Warren <swar...@wwwdotorg.org>
Cc: Thierry Reding <thierry.red...@gmail.com>
Cc: Alexandre Courbot <gnu...@gmail.com>
Cc: Markus Elfring <elfr...@users.sourceforge.net>
Cc: de...@driverdev.osuosl.org
Cc: linux-tegra@vger.kernel.org
Signed-off-by: Paul Gortmaker <paul.gortma...@windriver.com>
---
 drivers/staging/android/ion/tegra/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/android/ion/tegra/Makefile 
b/drivers/staging/android/ion/tegra/Makefile
index 11cd003fb08f..808f1f53f11a 100644
--- a/drivers/staging/android/ion/tegra/Makefile
+++ b/drivers/staging/android/ion/tegra/Makefile
@@ -1 +1 @@
-obj-y += tegra_ion.o
+obj-$(CONFIG_ION_TEGRA) += tegra_ion.o
-- 
2.6.1

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

Reply via email to