Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
5823eb40
Commit
5823eb40
authored
Jun 03, 2004
by
Greg Kroah-Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Driver Model: And even more cleanup of silly scsi use of the *ATTR macros...
Signed-off-by:
Greg Kroah-Hartman
<
greg@kroah.com
>
parent
002a2ae0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
7 deletions
+7
-7
drivers/scsi/scsi_sysfs.c
drivers/scsi/scsi_sysfs.c
+5
-5
drivers/scsi/scsi_transport_spi.c
drivers/scsi/scsi_transport_spi.c
+2
-2
No files found.
drivers/scsi/scsi_sysfs.c
View file @
5823eb40
...
...
@@ -99,7 +99,7 @@ show_##name (struct class_device *class_dev, char *buf) \
*/
#define shost_rd_attr2(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) \
shost_rd_attr2(field, field, format_string)
...
...
@@ -228,8 +228,8 @@ sdev_show_##field (struct device *dev, char *buf) \
* read only field.
*/
#define sdev_rd_attr(field, format_string) \
sdev_show_function(field, format_string)
\
static DEVICE_ATTR(field, S_IRUGO, sdev_show_##field, NULL)
sdev_show_function(field, format_string) \
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) \
snscanf (buf, 20, format_string, &sdev->field); \
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,
* so leave this code in */
...
...
@@ -272,7 +272,7 @@ sdev_store_##field (struct device *dev, const char *buf, size_t count) \
} \
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",
...
...
drivers/scsi/scsi_transport_spi.c
View file @
5823eb40
...
...
@@ -152,7 +152,7 @@ store_spi_transport_##field(struct class_device *cdev, const char *buf, \
spi_transport_store_function(field, format_string) \
static CLASS_DEVICE_ATTR(field, S_IRUGO | S_IWUSR, \
show_spi_transport_##field, \
store_spi_transport_##field)
store_spi_transport_##field)
;
/* The Parallel SCSI Tranport Attributes: */
spi_transport_rd_attr
(
offset
,
"%d
\n
"
);
...
...
@@ -173,7 +173,7 @@ store_spi_revalidate(struct class_device *cdev, const char *buf, size_t count)
spi_dv_device
(
sdev
);
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
* for SDTR/PPR messages */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment