Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+8 -5
+8 -5
drivers/scsi/osd/osd_uld.c
··· 107 107 class_dev); 108 108 return sprintf(buf, "%s\n", ould->odi.osdname); 109 109 } 110 + static DEVICE_ATTR_RO(osdname); 110 111 111 112 static ssize_t systemid_show(struct device *dev, struct device_attribute *attr, 112 113 char *buf) ··· 118 117 memcpy(buf, ould->odi.systemid, ould->odi.systemid_len); 119 118 return ould->odi.systemid_len; 120 119 } 120 + static DEVICE_ATTR_RO(systemid); 121 121 122 - static struct device_attribute osd_uld_attrs[] = { 123 - __ATTR(osdname, S_IRUGO, osdname_show, NULL), 124 - __ATTR(systemid, S_IRUGO, systemid_show, NULL), 125 - __ATTR_NULL, 122 + static struct attribute *osd_uld_attrs[] = { 123 + &dev_attr_osdname.attr, 124 + &dev_attr_systemid.attr, 125 + NULL, 126 126 }; 127 + ATTRIBUTE_GROUPS(osd_uld); 127 128 128 129 static struct class osd_uld_class = { 129 130 .owner = THIS_MODULE, 130 131 .name = "scsi_osd", 131 - .dev_attrs = osd_uld_attrs, 132 + .dev_groups = osd_uld_groups, 132 133 }; 133 134 134 135 /*