diff options
author | Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com> | 2010-04-14 02:15:14 -0400 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2010-05-01 15:16:30 -0400 |
commit | 160e7f671344e40b86663a8913e175a3bb5d7f84 (patch) | |
tree | dac801c19cb372e29017e9a6333f55ce7207b36d /drivers/scsi/scsi_sysfs.c | |
parent | 8637ac3340eca9d01f056f81c10fd61d15d2f5ee (diff) |
[SCSI] fix sdev_rw_attr macro for scsi device sysfs entries
This patch fixes sdev_rw_attr() macro for scsi device sysfs entries.
It seems there is no such function snscanf in the current linux kernel,
so it fails to compile scsi driver when someone try to add a new rw entry.
This has been unfixed for a long time probably because current scsi device
has no rw entries.
# grep snscanf . -rn
./drivers/scsi/scsi_sysfs.c:489: snscanf (buf, 20, format_string, &sdev->field); \
Signed-off-by: Tomohiro Kusumi <kusumi.tomohiro@jp.fujitsu.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/scsi_sysfs.c')
-rw-r--r-- | drivers/scsi/scsi_sysfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_sysfs.c b/drivers/scsi/scsi_sysfs.c index 838a0db8ea1f..c23ab978c3ba 100644 --- a/drivers/scsi/scsi_sysfs.c +++ b/drivers/scsi/scsi_sysfs.c | |||
@@ -474,7 +474,7 @@ static DEVICE_ATTR(field, S_IRUGO, sdev_show_##field, NULL); | |||
474 | 474 | ||
475 | 475 | ||
476 | /* | 476 | /* |
477 | * sdev_rd_attr: create a function and attribute variable for a | 477 | * sdev_rw_attr: create a function and attribute variable for a |
478 | * read/write field. | 478 | * read/write field. |
479 | */ | 479 | */ |
480 | #define sdev_rw_attr(field, format_string) \ | 480 | #define sdev_rw_attr(field, format_string) \ |
@@ -486,7 +486,7 @@ sdev_store_##field (struct device *dev, struct device_attribute *attr, \ | |||
486 | { \ | 486 | { \ |
487 | struct scsi_device *sdev; \ | 487 | struct scsi_device *sdev; \ |
488 | sdev = to_scsi_device(dev); \ | 488 | sdev = to_scsi_device(dev); \ |
489 | snscanf (buf, 20, format_string, &sdev->field); \ | 489 | sscanf (buf, format_string, &sdev->field); \ |
490 | return count; \ | 490 | return count; \ |
491 | } \ | 491 | } \ |
492 | static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field); | 492 | static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field); |