From dcc04c5efe2058a5796f45b7a99f1c53082dd2ca Mon Sep 17 00:00:00 2001 From: Christian Gromm Date: Thu, 7 Jun 2018 15:17:21 +0200 Subject: src: most: add compile condition to Makefile This patch adds a condition to the Makefile to compile the DIM2 module only if OF support is enabled in the kernel. It is needed to avoid build errors for x86 systems that don't make use of a device tree. Change-Id: I3246feea47160228591dee41b2f0f17cc9d492ae Signed-off-by: Christian Gromm --- driver/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/driver/Makefile b/driver/Makefile index e77a4b6..6aca827 100644 --- a/driver/Makefile +++ b/driver/Makefile @@ -26,9 +26,11 @@ obj-m += hdm_i2c.o hdm_i2c-y := hdm-i2c/hdm_i2c.o CFLAGS_hdm_i2c.o := -I$(src)/include/ +ifdef CONFIG_OF obj-m += hdm_dim2.o hdm_dim2-y := hdm-dim2/dim2_hdm.o hdm-dim2/dim2_hal.o hdm-dim2/dim2_sysfs.o CFLAGS_dim2_hdm.o := -I$(src)/include/ +endif obj-m += hdm_usb.o hdm_usb-y := hdm-usb/hdm_usb.o -- cgit 1.2.3-korg