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
fa5fd368
Commit
fa5fd368
authored
Mar 31, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
imm: switch to ->show_info()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
3e0552ee
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
29 deletions
+11
-29
drivers/scsi/imm.c
drivers/scsi/imm.c
+11
-29
No files found.
drivers/scsi/imm.c
View file @
fa5fd368
...
...
@@ -121,45 +121,26 @@ static inline void imm_pb_release(imm_struct *dev)
* testing...
* Also gives a method to use a script to obtain optimum timings (TODO)
*/
static
in
line
int
imm_proc_write
(
imm_struct
*
dev
,
char
*
buffer
,
int
length
)
static
in
t
imm_write_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
int
length
)
{
unsigned
long
x
;
imm_struct
*
dev
=
imm_dev
(
host
)
;
if
((
length
>
5
)
&&
(
strncmp
(
buffer
,
"mode="
,
5
)
==
0
))
{
x
=
simple_strtoul
(
buffer
+
5
,
NULL
,
0
);
dev
->
mode
=
x
;
dev
->
mode
=
simple_strtoul
(
buffer
+
5
,
NULL
,
0
);
return
length
;
}
printk
(
"imm /proc: invalid variable
\n
"
);
return
(
-
EINVAL
)
;
return
-
EINVAL
;
}
static
int
imm_proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inout
)
static
int
imm_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
host
)
{
imm_struct
*
dev
=
imm_dev
(
host
);
int
len
=
0
;
if
(
inout
)
return
imm_proc_write
(
dev
,
buffer
,
length
);
len
+=
sprintf
(
buffer
+
len
,
"Version : %s
\n
"
,
IMM_VERSION
);
len
+=
sprintf
(
buffer
+
len
,
"Parport : %s
\n
"
,
dev
->
dev
->
port
->
name
);
len
+=
sprintf
(
buffer
+
len
,
"Mode : %s
\n
"
,
IMM_MODE_STRING
[
dev
->
mode
]);
/* Request for beyond end of buffer */
if
(
offset
>
len
)
return
0
;
*
start
=
buffer
+
offset
;
len
-=
offset
;
if
(
len
>
length
)
len
=
length
;
return
len
;
seq_printf
(
m
,
"Version : %s
\n
"
,
IMM_VERSION
);
seq_printf
(
m
,
"Parport : %s
\n
"
,
dev
->
dev
->
port
->
name
);
seq_printf
(
m
,
"Mode : %s
\n
"
,
IMM_MODE_STRING
[
dev
->
mode
]);
return
0
;
}
#if IMM_DEBUG > 0
...
...
@@ -1118,7 +1099,8 @@ static int imm_adjust_queue(struct scsi_device *device)
static
struct
scsi_host_template
imm_template
=
{
.
module
=
THIS_MODULE
,
.
proc_name
=
"imm"
,
.
proc_info
=
imm_proc_info
,
.
show_info
=
imm_show_info
,
.
write_info
=
imm_write_info
,
.
name
=
"Iomega VPI2 (imm) interface"
,
.
queuecommand
=
imm_queuecommand
,
.
eh_abort_handler
=
imm_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