There is no need to add "ccflags-y += -I $(srctree)/drivers/staging" just for including <most/core.h>. Use the #include "..." directive with the correct relative path. Signed-off-by: Masahiro Yamada <masahiroy@xxxxxxxxxx> --- drivers/staging/most/Makefile | 1 - drivers/staging/most/cdev/Makefile | 1 - drivers/staging/most/cdev/cdev.c | 3 ++- drivers/staging/most/configfs.c | 3 ++- drivers/staging/most/core.c | 3 ++- drivers/staging/most/dim2/Makefile | 1 - drivers/staging/most/dim2/dim2.c | 2 +- drivers/staging/most/i2c/Makefile | 1 - drivers/staging/most/i2c/i2c.c | 2 +- drivers/staging/most/net/Makefile | 1 - drivers/staging/most/net/net.c | 3 ++- drivers/staging/most/sound/Makefile | 1 - drivers/staging/most/sound/sound.c | 3 ++- drivers/staging/most/usb/Makefile | 1 - drivers/staging/most/usb/usb.c | 3 ++- drivers/staging/most/video/Makefile | 1 - drivers/staging/most/video/video.c | 2 +- 17 files changed, 15 insertions(+), 17 deletions(-) diff --git a/drivers/staging/most/Makefile b/drivers/staging/most/Makefile index 85ea5a434ced..20a99ecb37c4 100644 --- a/drivers/staging/most/Makefile +++ b/drivers/staging/most/Makefile @@ -2,7 +2,6 @@ obj-$(CONFIG_MOST) += most_core.o most_core-y := core.o most_core-y += configfs.o -ccflags-y += -I $(srctree)/drivers/staging/ obj-$(CONFIG_MOST_CDEV) += cdev/ obj-$(CONFIG_MOST_NET) += net/ diff --git a/drivers/staging/most/cdev/Makefile b/drivers/staging/most/cdev/Makefile index 9f4a8b8c9c27..ef90cd71994a 100644 --- a/drivers/staging/most/cdev/Makefile +++ b/drivers/staging/most/cdev/Makefile @@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_CDEV) += most_cdev.o most_cdev-objs := cdev.o -ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/cdev/cdev.c b/drivers/staging/most/cdev/cdev.c index f880147c82fd..e2ade8eff2d9 100644 --- a/drivers/staging/most/cdev/cdev.c +++ b/drivers/staging/most/cdev/cdev.c @@ -16,7 +16,8 @@ #include <linux/kfifo.h> #include <linux/uaccess.h> #include <linux/idr.h> -#include "most/core.h" + +#include "../core.h" #define CHRDEV_REGION_SIZE 50 diff --git a/drivers/staging/most/configfs.c b/drivers/staging/most/configfs.c index 34a9fb53985c..76c9485cb470 100644 --- a/drivers/staging/most/configfs.c +++ b/drivers/staging/most/configfs.c @@ -10,7 +10,8 @@ #include <linux/slab.h> #include <linux/init.h> #include <linux/configfs.h> -#include <most/core.h> + +#include "core.h" struct mdev_link { struct config_item item; diff --git a/drivers/staging/most/core.c b/drivers/staging/most/core.c index 51a6b41d5b82..7da0db64ffec 100644 --- a/drivers/staging/most/core.c +++ b/drivers/staging/most/core.c @@ -21,7 +21,8 @@ #include <linux/kthread.h> #include <linux/dma-mapping.h> #include <linux/idr.h> -#include <most/core.h> + +#include "core.h" #define MAX_CHANNELS 64 #define STRING_SIZE 80 diff --git a/drivers/staging/most/dim2/Makefile b/drivers/staging/most/dim2/Makefile index 116f04d69244..861adacf6c72 100644 --- a/drivers/staging/most/dim2/Makefile +++ b/drivers/staging/most/dim2/Makefile @@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_DIM2) += most_dim2.o most_dim2-objs := dim2.o hal.o sysfs.o -ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/dim2/dim2.c b/drivers/staging/most/dim2/dim2.c index 64c979155a49..b96faab08b38 100644 --- a/drivers/staging/most/dim2/dim2.c +++ b/drivers/staging/most/dim2/dim2.c @@ -21,7 +21,7 @@ #include <linux/sched.h> #include <linux/kthread.h> -#include "most/core.h" +#include "../core.h" #include "hal.h" #include "errors.h" #include "sysfs.h" diff --git a/drivers/staging/most/i2c/Makefile b/drivers/staging/most/i2c/Makefile index 2b3769dc19e7..71099dd0f85b 100644 --- a/drivers/staging/most/i2c/Makefile +++ b/drivers/staging/most/i2c/Makefile @@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_I2C) += most_i2c.o most_i2c-objs := i2c.o -ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/i2c/i2c.c b/drivers/staging/most/i2c/i2c.c index 4a4fc1005932..0418f77d4007 100644 --- a/drivers/staging/most/i2c/i2c.c +++ b/drivers/staging/most/i2c/i2c.c @@ -14,7 +14,7 @@ #include <linux/interrupt.h> #include <linux/err.h> -#include "most/core.h" +#include "../core.h" enum { CH_RX, CH_TX, NUM_CHANNELS }; diff --git a/drivers/staging/most/net/Makefile b/drivers/staging/most/net/Makefile index f0ac64dee71b..1582c97eb204 100644 --- a/drivers/staging/most/net/Makefile +++ b/drivers/staging/most/net/Makefile @@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_NET) += most_net.o most_net-objs := net.o -ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/net/net.c b/drivers/staging/most/net/net.c index 6cab1bb8956e..f4c083c3d1f4 100644 --- a/drivers/staging/most/net/net.c +++ b/drivers/staging/most/net/net.c @@ -15,7 +15,8 @@ #include <linux/list.h> #include <linux/wait.h> #include <linux/kobject.h> -#include "most/core.h" + +#include "../core.h" #define MEP_HDR_LEN 8 #define MDP_HDR_LEN 16 diff --git a/drivers/staging/most/sound/Makefile b/drivers/staging/most/sound/Makefile index a3d086c6ca70..f0cd9d8d213e 100644 --- a/drivers/staging/most/sound/Makefile +++ b/drivers/staging/most/sound/Makefile @@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_SOUND) += most_sound.o most_sound-objs := sound.o -ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/sound/sound.c b/drivers/staging/most/sound/sound.c index 723d0bd1cc21..4f77ef6f459d 100644 --- a/drivers/staging/most/sound/sound.c +++ b/drivers/staging/most/sound/sound.c @@ -17,7 +17,8 @@ #include <sound/pcm_params.h> #include <linux/sched.h> #include <linux/kthread.h> -#include <most/core.h> + +#include "../core.h" #define DRIVER_NAME "sound" #define STRING_SIZE 80 diff --git a/drivers/staging/most/usb/Makefile b/drivers/staging/most/usb/Makefile index 83cf2ead7122..c2b207339aec 100644 --- a/drivers/staging/most/usb/Makefile +++ b/drivers/staging/most/usb/Makefile @@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_USB) += most_usb.o most_usb-objs := usb.o -ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/usb/usb.c b/drivers/staging/most/usb/usb.c index 360cb5b7a10b..d471c675f423 100644 --- a/drivers/staging/most/usb/usb.c +++ b/drivers/staging/most/usb/usb.c @@ -23,7 +23,8 @@ #include <linux/dma-mapping.h> #include <linux/etherdevice.h> #include <linux/uaccess.h> -#include "most/core.h" + +#include "../core.h" #define USB_MTU 512 #define NO_ISOCHRONOUS_URB 0 diff --git a/drivers/staging/most/video/Makefile b/drivers/staging/most/video/Makefile index 2d857d3cbcc8..856175fec8b6 100644 --- a/drivers/staging/most/video/Makefile +++ b/drivers/staging/most/video/Makefile @@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_VIDEO) += most_video.o most_video-objs := video.o -ccflags-y += -I $(srctree)/drivers/staging/ diff --git a/drivers/staging/most/video/video.c b/drivers/staging/most/video/video.c index 10c1ef7e3a3e..f3d23cc8e19b 100644 --- a/drivers/staging/most/video/video.c +++ b/drivers/staging/most/video/video.c @@ -21,7 +21,7 @@ #include <media/v4l2-ctrls.h> #include <media/v4l2-fh.h> -#include "most/core.h" +#include "../core.h" #define V4L2_CMP_MAX_INPUT 1 -- 2.17.1 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel