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
63fd57cb
Commit
63fd57cb
authored
Mar 31, 2013
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nsp_cs: switch to ->show_info()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
35c6e0e5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
38 deletions
+7
-38
drivers/scsi/pcmcia/nsp_cs.c
drivers/scsi/pcmcia/nsp_cs.c
+5
-31
drivers/scsi/pcmcia/nsp_cs.h
drivers/scsi/pcmcia/nsp_cs.h
+2
-7
No files found.
drivers/scsi/pcmcia/nsp_cs.c
View file @
63fd57cb
...
...
@@ -76,7 +76,7 @@ MODULE_PARM_DESC(free_ports, "Release IO ports after configuration? (default: 0
static
struct
scsi_host_template
nsp_driver_template
=
{
.
proc_name
=
"nsp_cs"
,
.
proc_info
=
nsp_proc
_info
,
.
show_info
=
nsp_show
_info
,
.
name
=
"WorkBit NinjaSCSI-3/32Bi(16bit)"
,
.
info
=
nsp_info
,
.
queuecommand
=
nsp_queuecommand
,
...
...
@@ -1365,33 +1365,19 @@ static const char *nsp_info(struct Scsi_Host *shpnt)
}
#undef SPRINTF
#define SPRINTF(args...) \
do { \
if(length > (pos - buffer)) { \
pos += snprintf(pos, length - (pos - buffer) + 1, ## args); \
nsp_dbg(NSP_DEBUG_PROC, "buffer=0x%p pos=0x%p length=%d %d\n", buffer, pos, length, length - (pos - buffer));\
} \
} while(0)
static
int
nsp_proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inout
)
#define SPRINTF(args...) seq_printf(m, ##args)
static
int
nsp_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
host
)
{
int
id
;
char
*
pos
=
buffer
;
int
thislength
;
int
speed
;
unsigned
long
flags
;
nsp_hw_data
*
data
;
int
hostno
;
if
(
inout
)
{
return
-
EINVAL
;
}
hostno
=
host
->
host_no
;
data
=
(
nsp_hw_data
*
)
host
->
hostdata
;
SPRINTF
(
"NinjaSCSI status
\n\n
"
);
SPRINTF
(
"Driver version: $Revision: 1.23 $
\n
"
);
SPRINTF
(
"SCSI host No.: %d
\n
"
,
hostno
);
...
...
@@ -1458,19 +1444,7 @@ static int nsp_proc_info(struct Scsi_Host *host, char *buffer, char **start,
}
SPRINTF
(
"
\n
"
);
}
thislength
=
pos
-
(
buffer
+
offset
);
if
(
thislength
<
0
)
{
*
start
=
NULL
;
return
0
;
}
thislength
=
min
(
thislength
,
length
);
*
start
=
buffer
+
offset
;
return
thislength
;
}
#undef SPRINTF
...
...
drivers/scsi/pcmcia/nsp_cs.h
View file @
63fd57cb
...
...
@@ -292,13 +292,8 @@ static int nsp_cs_config (struct pcmcia_device *link);
/* Linux SCSI subsystem specific functions */
static
struct
Scsi_Host
*
nsp_detect
(
struct
scsi_host_template
*
sht
);
static
const
char
*
nsp_info
(
struct
Scsi_Host
*
shpnt
);
static
int
nsp_proc_info
(
struct
Scsi_Host
*
host
,
char
*
buffer
,
char
**
start
,
off_t
offset
,
int
length
,
int
inout
);
static
int
nsp_show_info
(
struct
seq_file
*
m
,
struct
Scsi_Host
*
host
);
static
int
nsp_queuecommand
(
struct
Scsi_Host
*
h
,
struct
scsi_cmnd
*
SCpnt
);
/* Error handler */
...
...
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