aboutsummaryrefslogtreecommitdiffstats
path: root/scsi-osd-convert-class-code-to-use-dev_groups.patch
diff options
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-09 15:43:27 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-09 15:43:27 -0700
commit94ed31a17e12bd77b8a5982c6bf9623b9a623fe7 (patch)
tree3468dad21566837ef07c8d4d6fe434fcaadd876a /scsi-osd-convert-class-code-to-use-dev_groups.patch
parentaaf275f945460b5cb5ee6ea9ef95b06db5334461 (diff)
downloadpatches-94ed31a17e12bd77b8a5982c6bf9623b9a623fe7.tar.gz
renamed patches and broke them up
Diffstat (limited to 'scsi-osd-convert-class-code-to-use-dev_groups.patch')
-rw-r--r--scsi-osd-convert-class-code-to-use-dev_groups.patch54
1 files changed, 54 insertions, 0 deletions
diff --git a/scsi-osd-convert-class-code-to-use-dev_groups.patch b/scsi-osd-convert-class-code-to-use-dev_groups.patch
new file mode 100644
index 00000000000000..f569b9a7080e1b
--- /dev/null
+++ b/scsi-osd-convert-class-code-to-use-dev_groups.patch
@@ -0,0 +1,54 @@
+From foo@baz Tue Jul 9 15:35:52 PDT 2013
+Date: Tue, 09 Jul 2013 15:35:52 -0700
+To: Greg KH <gregkh@linuxfoundation.org>
+From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+Subject: SCSI: OSD: convert class code to use dev_groups
+
+The dev_attrs field of struct class is going away soon, dev_groups
+should be used instead. This converts the scsi osd class code to use
+the correct field.
+
+Cc: Boaz Harrosh <bharrosh@panasas.com>
+Cc: Benny Halevy <bhalevy@tonian.com>
+Cc: James E.J. Bottomley <JBottomley@parallels.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/scsi/osd/osd_uld.c | 13 ++++++++-----
+ 1 file changed, 8 insertions(+), 5 deletions(-)
+
+--- a/drivers/scsi/osd/osd_uld.c
++++ b/drivers/scsi/osd/osd_uld.c
+@@ -107,6 +107,7 @@ static ssize_t osdname_show(struct devic
+ class_dev);
+ return sprintf(buf, "%s\n", ould->odi.osdname);
+ }
++static DEVICE_ATTR_RO(osdname);
+
+ static ssize_t systemid_show(struct device *dev, struct device_attribute *attr,
+ char *buf)
+@@ -117,17 +118,19 @@ static ssize_t systemid_show(struct devi
+ memcpy(buf, ould->odi.systemid, ould->odi.systemid_len);
+ return ould->odi.systemid_len;
+ }
++static DEVICE_ATTR_RO(systemid);
+
+-static struct device_attribute osd_uld_attrs[] = {
+- __ATTR(osdname, S_IRUGO, osdname_show, NULL),
+- __ATTR(systemid, S_IRUGO, systemid_show, NULL),
+- __ATTR_NULL,
++static struct attribute *osd_uld_attrs[] = {
++ &dev_attr_osdname.attr,
++ &dev_attr_systemid.attr,
++ NULL,
+ };
++ATTRIBUTE_GROUPS(osd_uld);
+
+ static struct class osd_uld_class = {
+ .owner = THIS_MODULE,
+ .name = "scsi_osd",
+- .dev_attrs = osd_uld_attrs,
++ .dev_groups = osd_uld_groups,
+ };
+
+ /*