staging: most: remove header include path to drivers/staging
Subsystems (2)
PATCH 1/1 staging: most: remove header include path to drivers/staging
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.
---
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(-)
drivers/staging/most/Makefile +0 -1
@@ -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/
drivers/staging/most/cdev/Makefile +0 -1
@@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_CDEV) += most_cdev.o most_cdev-objs := cdev.o -ccflags-y += -I $(srctree)/drivers/staging/
drivers/staging/most/cdev/cdev.c +2 -1
@@ -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
drivers/staging/most/configfs.c +2 -1
@@ -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;
drivers/staging/most/core.c +2 -1
@@ -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
drivers/staging/most/dim2/Makefile +0 -1
@@ -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/
drivers/staging/most/dim2/dim2.c +1 -1
@@ -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"
drivers/staging/most/i2c/Makefile +0 -1
@@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_I2C) += most_i2c.o most_i2c-objs := i2c.o -ccflags-y += -I $(srctree)/drivers/staging/
drivers/staging/most/i2c/i2c.c +1 -1
@@ -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 };
drivers/staging/most/net/Makefile +0 -1
@@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_NET) += most_net.o most_net-objs := net.o -ccflags-y += -I $(srctree)/drivers/staging/
drivers/staging/most/net/net.c +2 -1
@@ -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
drivers/staging/most/sound/Makefile +0 -1
@@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_SOUND) += most_sound.o most_sound-objs := sound.o -ccflags-y += -I $(srctree)/drivers/staging/
drivers/staging/most/sound/sound.c +2 -1
@@ -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
drivers/staging/most/usb/Makefile +0 -1
@@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_USB) += most_usb.o most_usb-objs := usb.o -ccflags-y += -I $(srctree)/drivers/staging/
drivers/staging/most/usb/usb.c +2 -1
@@ -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
drivers/staging/most/video/Makefile +0 -1
@@ -2,4 +2,3 @@ obj-$(CONFIG_MOST_VIDEO) += most_video.o most_video-objs := video.o -ccflags-y += -I $(srctree)/drivers/staging/
drivers/staging/most/video/video.c +1 -1
@@ -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
Signature · 1 line
2.17.1
Greg Kroah-Hartman
maintainerQuoted 32 lines · Masahiro Yamada
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 <[email protected]>---
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(-)drivers/staging/most/Makefile +0
-0
drivers/staging/most/Makefile line 7
Quoted 7 lines
drivers/staging/most/Makefile +0
-1@@ -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/
This all was done on purpose to make a follow-on patch much simpler that I didn't end up taking as it still needed more work.
But I do agree with it, we shouldn't be abusing ccflags here, I'll go queue this up in a day or so, thanks for this.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 6 lines · Masahiro Yamada
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 <[email protected]>
This patch doesn't apply to my staging-next branch at all, what did you make it against? Perhaps if you rebase it against linux-next it can work?
thanks,
greg k-h