package/kernel: only include i2c-of if CONFIG_OF enabled
[15.05/openwrt.git] / package / kernel / modules / i2c.mk
index 5cf929d..0855708 100644 (file)
@@ -22,9 +22,12 @@ endef
 
 I2C_CORE_MODULES:= \
   CONFIG_I2C:drivers/i2c/i2c-core \
-  CONFIG_OF_I2C:drivers/of/of_i2c \
   CONFIG_I2C_CHARDEV:drivers/i2c/i2c-dev
 
+ifeq (CONFIG_OF,y)
+  I2C_CORE_MODULES+=CONFIG_OF_I2C:drivers/of/of_i2c
+endif
+
 define KernelPackage/i2c-core
   $(call i2c_defaults,$(I2C_CORE_MODULES),51)
   TITLE:=I2C support