[PATCH 08/12] i2c: Only descend into i2c directory when CONFIG_I2C is set

Andrew F. Davis
2016-06-13T20:02:07Z

When CONFIG_I2C is not set make will still descend into the i2c
directory but nothing will be built. This produces unneeded build
artifacts and messages in addition to slowing the build. Fix this here.

Signed-off-by: Andrew F. Davis <afd@ti.com>
---
drivers/Makefile | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/Makefile b/drivers/Makefile
index b4202d0..2d99d4e 100644
--- a/drivers/Makefile
+++ b/drivers/Makefile
@@ -107,7 +107,8 @@ obj-$(CONFIG_SERIO) += input/serio/
obj-$(CONFIG_GAMEPORT) += input/gameport/
obj-$(CONFIG_INPUT) += input/
obj-$(CONFIG_RTC_LIB) += rtc/
-obj-y += i2c/ media/
+obj-$(CONFIG_I2C) += i2c/
+obj-y += media/
obj-$(CONFIG_PPS) += pps/
obj-$(CONFIG_PTP_1588_CLOCK) += ptp/
obj-$(CONFIG_W1) += w1/