Commit 5823eb40 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Driver Model: And even more cleanup of silly scsi use of the *ATTR macros...

Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 002a2ae0
...@@ -99,7 +99,7 @@ show_##name (struct class_device *class_dev, char *buf) \ ...@@ -99,7 +99,7 @@ show_##name (struct class_device *class_dev, char *buf) \
*/ */
#define shost_rd_attr2(name, field, format_string) \ #define shost_rd_attr2(name, field, format_string) \
shost_show_function(name, field, format_string) \ shost_show_function(name, field, format_string) \
static CLASS_DEVICE_ATTR(name, S_IRUGO, show_##name, NULL) static CLASS_DEVICE_ATTR(name, S_IRUGO, show_##name, NULL);
#define shost_rd_attr(field, format_string) \ #define shost_rd_attr(field, format_string) \
shost_rd_attr2(field, field, format_string) shost_rd_attr2(field, field, format_string)
...@@ -228,8 +228,8 @@ sdev_show_##field (struct device *dev, char *buf) \ ...@@ -228,8 +228,8 @@ sdev_show_##field (struct device *dev, char *buf) \
* read only field. * read only field.
*/ */
#define sdev_rd_attr(field, format_string) \ #define sdev_rd_attr(field, format_string) \
sdev_show_function(field, format_string) \ sdev_show_function(field, format_string) \
static DEVICE_ATTR(field, S_IRUGO, sdev_show_##field, NULL) static DEVICE_ATTR(field, S_IRUGO, sdev_show_##field, NULL);
/* /*
...@@ -247,7 +247,7 @@ sdev_store_##field (struct device *dev, const char *buf, size_t count) \ ...@@ -247,7 +247,7 @@ sdev_store_##field (struct device *dev, const char *buf, size_t count) \
snscanf (buf, 20, format_string, &sdev->field); \ snscanf (buf, 20, format_string, &sdev->field); \
return count; \ return count; \
} \ } \
static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field) static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field);
/* Currently we don't export bit fields, but we might in future, /* Currently we don't export bit fields, but we might in future,
* so leave this code in */ * so leave this code in */
...@@ -272,7 +272,7 @@ sdev_store_##field (struct device *dev, const char *buf, size_t count) \ ...@@ -272,7 +272,7 @@ sdev_store_##field (struct device *dev, const char *buf, size_t count) \
} \ } \
return ret; \ return ret; \
} \ } \
static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field) static DEVICE_ATTR(field, S_IRUGO | S_IWUSR, sdev_show_##field, sdev_store_##field);
/* /*
* scsi_sdev_check_buf_bit: return 0 if buf is "0", return 1 if buf is "1", * scsi_sdev_check_buf_bit: return 0 if buf is "0", return 1 if buf is "1",
......
...@@ -152,7 +152,7 @@ store_spi_transport_##field(struct class_device *cdev, const char *buf, \ ...@@ -152,7 +152,7 @@ store_spi_transport_##field(struct class_device *cdev, const char *buf, \
spi_transport_store_function(field, format_string) \ spi_transport_store_function(field, format_string) \
static CLASS_DEVICE_ATTR(field, S_IRUGO | S_IWUSR, \ static CLASS_DEVICE_ATTR(field, S_IRUGO | S_IWUSR, \
show_spi_transport_##field, \ show_spi_transport_##field, \
store_spi_transport_##field) store_spi_transport_##field);
/* The Parallel SCSI Tranport Attributes: */ /* The Parallel SCSI Tranport Attributes: */
spi_transport_rd_attr(offset, "%d\n"); spi_transport_rd_attr(offset, "%d\n");
...@@ -173,7 +173,7 @@ store_spi_revalidate(struct class_device *cdev, const char *buf, size_t count) ...@@ -173,7 +173,7 @@ store_spi_revalidate(struct class_device *cdev, const char *buf, size_t count)
spi_dv_device(sdev); spi_dv_device(sdev);
return count; return count;
} }
static CLASS_DEVICE_ATTR(revalidate, S_IWUSR, NULL, store_spi_revalidate) static CLASS_DEVICE_ATTR(revalidate, S_IWUSR, NULL, store_spi_revalidate);
/* Translate the period into ns according to the current spec /* Translate the period into ns according to the current spec
* for SDTR/PPR messages */ * for SDTR/PPR messages */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment