Commit e2cb6cac authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: kernel_ver.h: include <linux/kernel.h> to fix warning

And this is the warning I was getting on kernel version > 3.14

  CC [M]  greybus/connection.o
  In file included from
  include/asm-generic/gpio.h:4:0,
	from arch/arm/include/asm/gpio.h:9,
	from include/linux/gpio.h:48,
	from greybus/kernel_ver.h:59,
	from greybus/connection.c:12:
  include/linux/kernel.h:35:0: warning: "U16_MAX" redefined

kernel_ver.h is taking care of defining U16_MAX only if is not defined earlier,
but it is often included as the first .h file. <linux/kernel.h> might be
included later, which always defines it, unconditionally. And so this warning.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent ca3ec299
......@@ -14,6 +14,8 @@
#ifndef __GREYBUS_KERNEL_VER_H
#define __GREYBUS_KERNEL_VER_H
#include <linux/kernel.h>
#ifndef __ATTR_WO
#define __ATTR_WO(_name) { \
.attr = { .name = __stringify(_name), .mode = S_IWUSR }, \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment