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
Kirill Smelkov
linux
Commits
cab29b99
Commit
cab29b99
authored
Mar 31, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wd7000: switch to ->show_info()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
ee127fec
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
23 deletions
+8
-23
drivers/scsi/wd7000.c
drivers/scsi/wd7000.c
+8
-23
No files found.
drivers/scsi/wd7000.c
View file @
cab29b99
...
@@ -1296,9 +1296,9 @@ static void wd7000_revision(Adapter * host)
...
@@ -1296,9 +1296,9 @@ static void wd7000_revision(Adapter * host)
#undef SPRINTF
#undef SPRINTF
#define SPRINTF(args...) {
if (pos < (buffer + length)) pos += sprintf (pos
, ## args); }
#define SPRINTF(args...) {
seq_printf(m
, ## args); }
static
int
wd7000_set_info
(
char
*
buffer
,
int
length
,
struct
Scsi_Host
*
host
)
static
int
wd7000_set_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
int
length
)
{
{
dprintk
(
"Buffer = <%.*s>, length = %d
\n
"
,
length
,
buffer
,
length
);
dprintk
(
"Buffer = <%.*s>, length = %d
\n
"
,
length
,
buffer
,
length
);
...
@@ -1310,22 +1310,15 @@ static int wd7000_set_info(char *buffer, int length, struct Scsi_Host *host)
...
@@ -1310,22 +1310,15 @@ static int wd7000_set_info(char *buffer, int length, struct Scsi_Host *host)
}
}
static
int
wd7000_
proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inou
t
)
static
int
wd7000_
show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
hos
t
)
{
{
Adapter
*
adapter
=
(
Adapter
*
)
host
->
hostdata
;
Adapter
*
adapter
=
(
Adapter
*
)
host
->
hostdata
;
unsigned
long
flags
;
unsigned
long
flags
;
char
*
pos
=
buffer
;
#ifdef WD7000_DEBUG
#ifdef WD7000_DEBUG
Mailbox
*
ogmbs
,
*
icmbs
;
Mailbox
*
ogmbs
,
*
icmbs
;
short
count
;
short
count
;
#endif
#endif
/*
* Has data been written to the file ?
*/
if
(
inout
)
return
(
wd7000_set_info
(
buffer
,
length
,
host
));
spin_lock_irqsave
(
host
->
host_lock
,
flags
);
spin_lock_irqsave
(
host
->
host_lock
,
flags
);
SPRINTF
(
"Host scsi%d: Western Digital WD-7000 (rev %d.%d)
\n
"
,
host
->
host_no
,
adapter
->
rev1
,
adapter
->
rev2
);
SPRINTF
(
"Host scsi%d: Western Digital WD-7000 (rev %d.%d)
\n
"
,
host
->
host_no
,
adapter
->
rev1
,
adapter
->
rev2
);
SPRINTF
(
" IO base: 0x%x
\n
"
,
adapter
->
iobase
);
SPRINTF
(
" IO base: 0x%x
\n
"
,
adapter
->
iobase
);
...
@@ -1368,17 +1361,7 @@ static int wd7000_proc_info(struct Scsi_Host *host, char *buffer, char **start,
...
@@ -1368,17 +1361,7 @@ static int wd7000_proc_info(struct Scsi_Host *host, char *buffer, char **start,
spin_unlock_irqrestore
(
host
->
host_lock
,
flags
);
spin_unlock_irqrestore
(
host
->
host_lock
,
flags
);
/*
return
0
;
* Calculate start of next buffer, and return value.
*/
*
start
=
buffer
+
offset
;
if
((
pos
-
buffer
)
<
offset
)
return
(
0
);
else
if
((
pos
-
buffer
-
offset
)
<
length
)
return
(
pos
-
buffer
-
offset
);
else
return
(
length
);
}
}
...
@@ -1413,7 +1396,8 @@ static __init int wd7000_detect(struct scsi_host_template *tpnt)
...
@@ -1413,7 +1396,8 @@ static __init int wd7000_detect(struct scsi_host_template *tpnt)
for
(
i
=
0
;
i
<
NUM_CONFIGS
;
biosptr
[
i
++
]
=
-
1
);
for
(
i
=
0
;
i
<
NUM_CONFIGS
;
biosptr
[
i
++
]
=
-
1
);
tpnt
->
proc_name
=
"wd7000"
;
tpnt
->
proc_name
=
"wd7000"
;
tpnt
->
proc_info
=
&
wd7000_proc_info
;
tpnt
->
show_info
=
&
wd7000_show_info
;
tpnt
->
write_info
=
wd7000_set_info
;
/*
/*
* Set up SCB free list, which is shared by all adapters
* Set up SCB free list, which is shared by all adapters
...
@@ -1658,7 +1642,8 @@ MODULE_LICENSE("GPL");
...
@@ -1658,7 +1642,8 @@ MODULE_LICENSE("GPL");
static
struct
scsi_host_template
driver_template
=
{
static
struct
scsi_host_template
driver_template
=
{
.
proc_name
=
"wd7000"
,
.
proc_name
=
"wd7000"
,
.
proc_info
=
wd7000_proc_info
,
.
show_info
=
wd7000_show_info
,
.
write_info
=
wd7000_set_info
,
.
name
=
"Western Digital WD-7000"
,
.
name
=
"Western Digital WD-7000"
,
.
detect
=
wd7000_detect
,
.
detect
=
wd7000_detect
,
.
release
=
wd7000_release
,
.
release
=
wd7000_release
,
...
...
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