diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-19 14:50:06 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-08-07 14:04:02 -0400 |
commit | e14a3967723ed4a1dacd180cfc560ffc510ea2a6 (patch) | |
tree | 2917b385d4b933fe61bd9e67b188f1f8b8dc265b /drivers/scsi/aic94xx | |
parent | 22fe5670ce100bc31813cffc93ed923bcd94f4cd (diff) |
scsi: remove DRIVER_ATTR() usage
It's better to use the DRIVER_ATTR_RW() and DRIVER_ATTR_RO() macros to
explicitly show that this is a read/write or read/only sysfs file. So
convert the remaining SCSI drivers that use the old style to use the
newer macros.
Bonus is that this removes some checkpatch.pl warnings :)
This is part of a series to drop DRIVER_ATTR() from the tree entirely.
Cc: "James E.J. Bottomley" <jejb@linux.vnet.ibm.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>
Cc: Kashyap Desai <kashyap.desai@broadcom.com>
Cc: Sumit Saxena <sumit.saxena@broadcom.com>
Cc: Shivasharan S <shivasharan.srikanteshwara@broadcom.com>
Cc: Willem Riede <osst@riede.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: Bart Van Assche <bart.vanassche@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/aic94xx')
-rw-r--r-- | drivers/scsi/aic94xx/aic94xx_init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/aic94xx/aic94xx_init.c b/drivers/scsi/aic94xx/aic94xx_init.c index a14ba7a6b81e..a240feee16e5 100644 --- a/drivers/scsi/aic94xx/aic94xx_init.c +++ b/drivers/scsi/aic94xx/aic94xx_init.c @@ -956,11 +956,11 @@ static int asd_scan_finished(struct Scsi_Host *shost, unsigned long time) return 1; } -static ssize_t asd_version_show(struct device_driver *driver, char *buf) +static ssize_t version_show(struct device_driver *driver, char *buf) { return snprintf(buf, PAGE_SIZE, "%s\n", ASD_DRIVER_VERSION); } -static DRIVER_ATTR(version, S_IRUGO, asd_version_show, NULL); +static DRIVER_ATTR_RO(version); static int asd_create_driver_attrs(struct device_driver *driver) { |