Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
96776f3b
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
96776f3b
编写于
7月 24, 2008
作者:
B
Bartlomiej Zolnierkiewicz
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sc1200: convert to use ->host_priv
Signed-off-by:
N
Bartlomiej Zolnierkiewicz
<
bzolnier@gmail.com
>
上级
1d76d9dc
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
19 addition
and
20 deletion
+19
-20
drivers/ide/pci/sc1200.c
drivers/ide/pci/sc1200.c
+19
-20
未找到文件。
drivers/ide/pci/sc1200.c
浏览文件 @
96776f3b
...
...
@@ -234,20 +234,10 @@ static int sc1200_suspend (struct pci_dev *dev, pm_message_t state)
* we only save state when going from full power to less
*/
if
(
state
.
event
==
PM_EVENT_ON
)
{
struct
sc1200_saved_state
*
ss
;
struct
ide_host
*
host
=
pci_get_drvdata
(
dev
);
struct
sc1200_saved_state
*
ss
=
host
->
host_priv
;
unsigned
int
r
;
/*
* allocate a permanent save area, if not already allocated
*/
ss
=
(
struct
sc1200_saved_state
*
)
pci_get_drvdata
(
dev
);
if
(
ss
==
NULL
)
{
ss
=
kmalloc
(
sizeof
(
*
ss
),
GFP_KERNEL
);
if
(
ss
==
NULL
)
return
-
ENOMEM
;
pci_set_drvdata
(
dev
,
ss
);
}
/*
* save timing registers
* (this may be unnecessary if BIOS also does it)
...
...
@@ -263,7 +253,8 @@ static int sc1200_suspend (struct pci_dev *dev, pm_message_t state)
static
int
sc1200_resume
(
struct
pci_dev
*
dev
)
{
struct
sc1200_saved_state
*
ss
;
struct
ide_host
*
host
=
pci_get_drvdata
(
dev
);
struct
sc1200_saved_state
*
ss
=
host
->
host_priv
;
unsigned
int
r
;
int
i
;
...
...
@@ -271,16 +262,12 @@ static int sc1200_resume (struct pci_dev *dev)
if
(
i
)
return
i
;
ss
=
(
struct
sc1200_saved_state
*
)
pci_get_drvdata
(
dev
);
/*
* restore timing registers
* (this may be unnecessary if BIOS also does it)
*/
if
(
ss
)
{
for
(
r
=
0
;
r
<
8
;
r
++
)
pci_write_config_dword
(
dev
,
0x40
+
r
*
4
,
ss
->
regs
[
r
]);
}
return
0
;
}
...
...
@@ -317,7 +304,19 @@ static const struct ide_port_info sc1200_chipset __devinitdata = {
static
int
__devinit
sc1200_init_one
(
struct
pci_dev
*
dev
,
const
struct
pci_device_id
*
id
)
{
return
ide_pci_init_one
(
dev
,
&
sc1200_chipset
,
NULL
);
struct
sc1200_saved_state
*
ss
=
NULL
;
int
rc
;
#ifdef CONFIG_PM
ss
=
kmalloc
(
sizeof
(
*
ss
),
GFP_KERNEL
);
if
(
ss
==
NULL
)
return
-
ENOMEM
;
#endif
rc
=
ide_pci_init_one
(
dev
,
&
sc1200_chipset
,
ss
);
if
(
rc
)
kfree
(
ss
);
return
rc
;
}
static
const
struct
pci_device_id
sc1200_pci_tbl
[]
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录