Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
cab29b99
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
161
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
cab29b99
编写于
3月 31, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
wd7000: switch to ->show_info()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
ee127fec
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
8 addition
and
23 deletion
+8
-23
drivers/scsi/wd7000.c
drivers/scsi/wd7000.c
+8
-23
未找到文件。
drivers/scsi/wd7000.c
浏览文件 @
cab29b99
...
...
@@ -1296,9 +1296,9 @@ static void wd7000_revision(Adapter * host)
#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
);
...
...
@@ -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
;
unsigned
long
flags
;
char
*
pos
=
buffer
;
#ifdef WD7000_DEBUG
Mailbox
*
ogmbs
,
*
icmbs
;
short
count
;
#endif
/*
* Has data been written to the file ?
*/
if
(
inout
)
return
(
wd7000_set_info
(
buffer
,
length
,
host
));
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
(
" IO base: 0x%x
\n
"
,
adapter
->
iobase
);
...
...
@@ -1368,17 +1361,7 @@ static int wd7000_proc_info(struct Scsi_Host *host, char *buffer, char **start,
spin_unlock_irqrestore
(
host
->
host_lock
,
flags
);
/*
* 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
);
return
0
;
}
...
...
@@ -1413,7 +1396,8 @@ static __init int wd7000_detect(struct scsi_host_template *tpnt)
for
(
i
=
0
;
i
<
NUM_CONFIGS
;
biosptr
[
i
++
]
=
-
1
);
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
...
...
@@ -1658,7 +1642,8 @@ MODULE_LICENSE("GPL");
static
struct
scsi_host_template
driver_template
=
{
.
proc_name
=
"wd7000"
,
.
proc_info
=
wd7000_proc_info
,
.
show_info
=
wd7000_show_info
,
.
write_info
=
wd7000_set_info
,
.
name
=
"Western Digital WD-7000"
,
.
detect
=
wd7000_detect
,
.
release
=
wd7000_release
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录