From: Simon Horman Date: Mon, 23 Aug 2010 06:30:12 +0000 (+0900) Subject: datapath: struct brport_attribute no longer has an owner element X-Git-Tag: v1.1.0pre1~63 X-Git-Url: http://git.onelab.eu/?p=sliver-openvswitch.git;a=commitdiff_plain;h=e97f8ca76dfcc88d3ea20efe55969391252f83f3 datapath: struct brport_attribute no longer has an owner element Between 2.6.35 and 2.6.36-rc1 the owner element of struct brport_attribute was removed. Signed-off-by: Simon Horman Signed-off-by: Jesse Gross --- diff --git a/datapath/dp_sysfs_if.c b/datapath/dp_sysfs_if.c index 8aa03a767..3c842172b 100644 --- a/datapath/dp_sysfs_if.c +++ b/datapath/dp_sysfs_if.c @@ -30,6 +30,15 @@ struct brport_attribute { 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), \ @@ -38,6 +47,7 @@ struct brport_attribute brport_attr_##_name = { \ .show = _show, \ .store = _store, \ }; +#endif static ssize_t show_path_cost(struct dp_port *p, char *buf) {