--- zzzz-none-000/linux-3.10.107/drivers/scsi/osd/osd_uld.c 2017-06-27 09:49:32.000000000 +0000 +++ scorpion-7490-727/linux-3.10.107/drivers/scsi/osd/osd_uld.c 2021-02-04 17:41:59.000000000 +0000 @@ -10,7 +10,7 @@ * Copyright (C) 2008 Panasas Inc. All rights reserved. * * Authors: - * Boaz Harrosh + * Boaz Harrosh * Benny Halevy * * This program is free software; you can redistribute it and/or modify @@ -74,7 +74,7 @@ static const char osd_name[] = "osd"; static const char *osd_version_string = "open-osd 0.2.1"; -MODULE_AUTHOR("Boaz Harrosh "); +MODULE_AUTHOR("Boaz Harrosh "); MODULE_DESCRIPTION("open-osd Upper-Layer-Driver osd.ko"); MODULE_LICENSE("GPL"); MODULE_ALIAS_CHARDEV_MAJOR(SCSI_OSD_MAJOR); @@ -107,6 +107,7 @@ 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 @@ 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, }; /* @@ -537,9 +540,9 @@ */ static struct scsi_driver osd_driver = { - .owner = THIS_MODULE, .gendrv = { .name = osd_name, + .owner = THIS_MODULE, .probe = osd_probe, .remove = osd_remove, }