aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-24 18:05:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-07-25 19:34:39 -0400
commit92a3e661bf55457091817c5c346c4313be2508af (patch)
treed78167d0b4b4df34b94854c047173b0859d36189 /drivers
parentaf01da0e02def46c7f32f86811d6befb6ca16170 (diff)
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. Acked-by: 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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/scsi/osd/osd_uld.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/scsi/osd/osd_uld.c b/drivers/scsi/osd/osd_uld.c
index 9d86947d67fe..e1d9a4c4c4b3 100644
--- a/drivers/scsi/osd/osd_uld.c
+++ b/drivers/scsi/osd/osd_uld.c
@@ -107,6 +107,7 @@ static ssize_t osdname_show(struct device *dev, struct device_attribute *attr,
107 class_dev); 107 class_dev);
108 return sprintf(buf, "%s\n", ould->odi.osdname); 108 return sprintf(buf, "%s\n", ould->odi.osdname);
109} 109}
110static DEVICE_ATTR_RO(osdname);
110 111
111static ssize_t systemid_show(struct device *dev, struct device_attribute *attr, 112static ssize_t systemid_show(struct device *dev, struct device_attribute *attr,
112 char *buf) 113 char *buf)
@@ -117,17 +118,19 @@ static ssize_t systemid_show(struct device *dev, struct device_attribute *attr,
117 memcpy(buf, ould->odi.systemid, ould->odi.systemid_len); 118 memcpy(buf, ould->odi.systemid, ould->odi.systemid_len);
118 return ould->odi.systemid_len; 119 return ould->odi.systemid_len;
119} 120}
121static DEVICE_ATTR_RO(systemid);
120 122
121static struct device_attribute osd_uld_attrs[] = { 123static struct attribute *osd_uld_attrs[] = {
122 __ATTR(osdname, S_IRUGO, osdname_show, NULL), 124 &dev_attr_osdname.attr,
123 __ATTR(systemid, S_IRUGO, systemid_show, NULL), 125 &dev_attr_systemid.attr,
124 __ATTR_NULL, 126 NULL,
125}; 127};
128ATTRIBUTE_GROUPS(osd_uld);
126 129
127static struct class osd_uld_class = { 130static struct class osd_uld_class = {
128 .owner = THIS_MODULE, 131 .owner = THIS_MODULE,
129 .name = "scsi_osd", 132 .name = "scsi_osd",
130 .dev_attrs = osd_uld_attrs, 133 .dev_groups = osd_uld_groups,
131}; 134};
132 135
133/* 136/*