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
b7654914
Commit
b7654914
authored
Mar 31, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ppa: switch to ->show_info()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
fa5fd368
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
26 deletions
+10
-26
drivers/scsi/ppa.c
drivers/scsi/ppa.c
+10
-26
No files found.
drivers/scsi/ppa.c
View file @
b7654914
...
...
@@ -118,8 +118,9 @@ static inline void ppa_pb_release(ppa_struct *dev)
* Also gives a method to use a script to obtain optimum timings (TODO)
*/
static
inline
int
ppa_
proc_write
(
ppa_struct
*
dev
,
char
*
buffer
,
int
length
)
static
inline
int
ppa_
write_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
int
length
)
{
ppa_struct
*
dev
=
ppa_dev
(
host
);
unsigned
long
x
;
if
((
length
>
5
)
&&
(
strncmp
(
buffer
,
"mode="
,
5
)
==
0
))
{
...
...
@@ -137,35 +138,17 @@ static inline int ppa_proc_write(ppa_struct *dev, char *buffer, int length)
return
-
EINVAL
;
}
static
int
ppa_
proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inou
t
)
static
int
ppa_
show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
hos
t
)
{
int
len
=
0
;
ppa_struct
*
dev
=
ppa_dev
(
host
);
if
(
inout
)
return
ppa_proc_write
(
dev
,
buffer
,
length
);
len
+=
sprintf
(
buffer
+
len
,
"Version : %s
\n
"
,
PPA_VERSION
);
len
+=
sprintf
(
buffer
+
len
,
"Parport : %s
\n
"
,
dev
->
dev
->
port
->
name
);
len
+=
sprintf
(
buffer
+
len
,
"Mode : %s
\n
"
,
PPA_MODE_STRING
[
dev
->
mode
]);
seq_printf
(
m
,
"Version : %s
\n
"
,
PPA_VERSION
);
seq_printf
(
m
,
"Parport : %s
\n
"
,
dev
->
dev
->
port
->
name
);
seq_printf
(
m
,
"Mode : %s
\n
"
,
PPA_MODE_STRING
[
dev
->
mode
]);
#if PPA_DEBUG > 0
len
+=
sprintf
(
buffer
+
len
,
"recon_tmo : %lu
\n
"
,
dev
->
recon_tmo
);
seq_printf
(
m
,
"recon_tmo : %lu
\n
"
,
dev
->
recon_tmo
);
#endif
/* Request for beyond end of buffer */
if
(
offset
>
length
)
return
0
;
*
start
=
buffer
+
offset
;
len
-=
offset
;
if
(
len
>
length
)
len
=
length
;
return
len
;
return
0
;
}
static
int
device_check
(
ppa_struct
*
dev
);
...
...
@@ -981,7 +964,8 @@ static int ppa_adjust_queue(struct scsi_device *device)
static
struct
scsi_host_template
ppa_template
=
{
.
module
=
THIS_MODULE
,
.
proc_name
=
"ppa"
,
.
proc_info
=
ppa_proc_info
,
.
show_info
=
ppa_show_info
,
.
write_info
=
ppa_write_info
,
.
name
=
"Iomega VPI0 (ppa) interface"
,
.
queuecommand
=
ppa_queuecommand
,
.
eh_abort_handler
=
ppa_abort
,
...
...
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