Between 2.6.35 and 2.6.36-rc1 the owner element of struct brport_attribute
was removed.
Signed-off-by: Simon Horman <horms@verge.net.au>
Signed-off-by: Jesse Gross <jesse@nicira.com>
ssize_t (*store)(struct dp_port *, unsigned long);
};
ssize_t (*store)(struct dp_port *, unsigned long);
};
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,36)
+#define BRPORT_ATTR(_name,_mode,_show,_store) \
+struct brport_attribute brport_attr_##_name = { \
+ .attr = {.name = __stringify(_name), \
+ .mode = _mode }, \
+ .show = _show, \
+ .store = _store, \
+};
+#else
#define BRPORT_ATTR(_name,_mode,_show,_store) \
struct brport_attribute brport_attr_##_name = { \
.attr = {.name = __stringify(_name), \
#define BRPORT_ATTR(_name,_mode,_show,_store) \
struct brport_attribute brport_attr_##_name = { \
.attr = {.name = __stringify(_name), \
.show = _show, \
.store = _store, \
};
.show = _show, \
.store = _store, \
};
static ssize_t show_path_cost(struct dp_port *p, char *buf)
{
static ssize_t show_path_cost(struct dp_port *p, char *buf)
{