attr); \
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,11,0)
+#ifndef __ATTRIBUTE_GROUPS
+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
+#define __ATTRIBUTE_GROUPS(_name) \
+static const struct attribute_group *_name##_groups[] = { \
+ &_name##_group, \
+ NULL, \
+}
+#else
+#define __ATTRIBUTE_GROUPS(_name) \
+static struct attribute_group *_name##_groups[] = { \
+ &_name##_group, \
+ NULL, \
+}
+#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31)) */
+#endif /* __ATTRIBUTE_GROUPS */
+
#undef ATTRIBUTE_GROUPS
#define ATTRIBUTE_GROUPS(_name) \
static const struct attribute_group _name##_group = { \
}; \
static inline void init_##_name##_attrs(void) {} \
__ATTRIBUTE_GROUPS(_name)
-#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
#define dev_get_platdata LINUX_BACKPORT(dev_get_platdata)
+++ /dev/null
---- a/net/bluetooth/hci_sysfs.c
-+++ b/net/bluetooth/hci_sysfs.c
-@@ -53,7 +53,11 @@ static struct attribute_group bt_link_gr
- .attrs = bt_link_attrs,
- };
-
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
- static const struct attribute_group *bt_link_groups[] = {
-+#else
-+static struct attribute_group *bt_link_groups[] = {
-+#endif
- &bt_link_group,
- NULL
- };
-@@ -186,7 +190,11 @@ static struct attribute_group bt_host_gr
- .attrs = bt_host_attrs,
- };
-
-+#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,31))
- static const struct attribute_group *bt_host_groups[] = {
-+#else
-+static struct attribute_group *bt_host_groups[] = {
-+#endif
- &bt_host_group,
- NULL
- };