aboutsummaryrefslogtreecommitdiffstats
path: root/xenbus-convert-bus-code-to-use-dev_groups.patch
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-06 23:58:52 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-06 23:58:52 -0700
commitf6e6720a59d48941664b57b5365cda8a8d4a3dc0 (patch)
tree4cb4ea8ed495f917455a2c84419c04161ffc799b /xenbus-convert-bus-code-to-use-dev_groups.patch
parente58cf96361457406a7de379e6c991adae9ea169b (diff)
downloadpatches-f6e6720a59d48941664b57b5365cda8a8d4a3dc0.tar.gz
rename patches that have been sent off.
Diffstat (limited to 'xenbus-convert-bus-code-to-use-dev_groups.patch')
-rw-r--r--xenbus-convert-bus-code-to-use-dev_groups.patch104
1 files changed, 104 insertions, 0 deletions
diff --git a/xenbus-convert-bus-code-to-use-dev_groups.patch b/xenbus-convert-bus-code-to-use-dev_groups.patch
new file mode 100644
index 00000000000000..1b3c9626aafe60
--- /dev/null
+++ b/xenbus-convert-bus-code-to-use-dev_groups.patch
@@ -0,0 +1,104 @@
+From foo@baz Sun Oct 6 23:40:53 PDT 2013
+Date: Sun, 06 Oct 2013 23:40:53 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: xenbus: convert bus code to use dev_groups
+
+The dev_attrs field of struct bus_type is going away soon, dev_groups
+should be used instead. This converts the xenbus code to use the
+correct field.
+
+Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
+Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
+Cc: David Vrabel <david.vrabel@citrix.com>
+Cc: <xen-devel@lists.xenproject.org>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/xen/xenbus/xenbus_probe.c | 24 ++++++++++++++++++------
+ drivers/xen/xenbus/xenbus_probe.h | 2 +-
+ drivers/xen/xenbus/xenbus_probe_backend.c | 2 +-
+ drivers/xen/xenbus/xenbus_probe_frontend.c | 2 +-
+ 4 files changed, 21 insertions(+), 9 deletions(-)
+
+--- a/drivers/xen/xenbus/xenbus_probe.c
++++ b/drivers/xen/xenbus/xenbus_probe.c
+@@ -384,12 +384,14 @@ static ssize_t nodename_show(struct devi
+ {
+ return sprintf(buf, "%s\n", to_xenbus_device(dev)->nodename);
+ }
++static DEVICE_ATTR_RO(nodename);
+
+ static ssize_t devtype_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+ {
+ return sprintf(buf, "%s\n", to_xenbus_device(dev)->devicetype);
+ }
++static DEVICE_ATTR_RO(devtype);
+
+ static ssize_t modalias_show(struct device *dev,
+ struct device_attribute *attr, char *buf)
+@@ -397,14 +399,24 @@ static ssize_t modalias_show(struct devi
+ return sprintf(buf, "%s:%s\n", dev->bus->name,
+ to_xenbus_device(dev)->devicetype);
+ }
++static DEVICE_ATTR_RO(modalias);
+
+-struct device_attribute xenbus_dev_attrs[] = {
+- __ATTR_RO(nodename),
+- __ATTR_RO(devtype),
+- __ATTR_RO(modalias),
+- __ATTR_NULL
++static struct attribute *xenbus_dev_attrs[] = {
++ &dev_attr_nodename.attr,
++ &dev_attr_devtype.attr,
++ &dev_attr_modalias.attr,
++ NULL,
+ };
+-EXPORT_SYMBOL_GPL(xenbus_dev_attrs);
++
++static const struct attribute_group xenbus_dev_group = {
++ .attrs = xenbus_dev_attrs,
++};
++
++const struct attribute_group *xenbus_dev_groups[] = {
++ &xenbus_dev_group,
++ NULL,
++};
++EXPORT_SYMBOL_GPL(xenbus_dev_groups);
+
+ int xenbus_probe_node(struct xen_bus_type *bus,
+ const char *type,
+--- a/drivers/xen/xenbus/xenbus_probe.h
++++ b/drivers/xen/xenbus/xenbus_probe.h
+@@ -54,7 +54,7 @@ enum xenstore_init {
+ XS_LOCAL,
+ };
+
+-extern struct device_attribute xenbus_dev_attrs[];
++extern const struct attribute_group *xenbus_dev_groups[];
+
+ extern int xenbus_match(struct device *_dev, struct device_driver *_drv);
+ extern int xenbus_dev_probe(struct device *_dev);
+--- a/drivers/xen/xenbus/xenbus_probe_backend.c
++++ b/drivers/xen/xenbus/xenbus_probe_backend.c
+@@ -200,7 +200,7 @@ static struct xen_bus_type xenbus_backen
+ .probe = xenbus_dev_probe,
+ .remove = xenbus_dev_remove,
+ .shutdown = xenbus_dev_shutdown,
+- .dev_attrs = xenbus_dev_attrs,
++ .dev_groups = xenbus_dev_groups,
+ },
+ };
+
+--- a/drivers/xen/xenbus/xenbus_probe_frontend.c
++++ b/drivers/xen/xenbus/xenbus_probe_frontend.c
+@@ -154,7 +154,7 @@ static struct xen_bus_type xenbus_fronte
+ .probe = xenbus_frontend_dev_probe,
+ .remove = xenbus_dev_remove,
+ .shutdown = xenbus_dev_shutdown,
+- .dev_attrs = xenbus_dev_attrs,
++ .dev_groups = xenbus_dev_groups,
+
+ .pm = &xenbus_pm_ops,
+ },