Commit f348964c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: kernel_ver.h: add ATTRIBUTE_GROUPS() macro for older kernels

This was added in 3.11, and we need it for 3.10
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent eec5883f
...@@ -48,4 +48,19 @@ static inline void gb_gpiochip_remove(struct gpio_chip *chip) ...@@ -48,4 +48,19 @@ static inline void gb_gpiochip_remove(struct gpio_chip *chip)
} }
#endif #endif
/*
* ATTRIBUTE_GROUPS showed up in 3.11-rc2, but we need to build on 3.10, so add
* it here.
*/
#if LINUX_VERSION_CODE < KERNEL_VERSION(3,11,0)
#define ATTRIBUTE_GROUPS(name) \
static const struct attribute_group name##_group = { \
.attrs = name##_attrs, \
}; \
static const struct attribute_group *name##_groups[] = { \
&name##_group, \
NULL, \
}
#endif
#endif /* __GREYBUS_KERNEL_VER_H */ #endif /* __GREYBUS_KERNEL_VER_H */
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