Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
deabb19b
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
deabb19b
编写于
2月 11, 2011
作者:
J
James Morris
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-james' of
git://tpmdd.git.sourceforge.net/gitroot/tpmdd/tpmdd
into for-linus
上级
d2478521
9b29050f
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
3 deletion
+21
-3
drivers/char/tpm/tpm.c
drivers/char/tpm/tpm.c
+16
-2
drivers/char/tpm/tpm.h
drivers/char/tpm/tpm.h
+2
-0
drivers/char/tpm/tpm_tis.c
drivers/char/tpm/tpm_tis.c
+3
-1
未找到文件。
drivers/char/tpm/tpm.c
浏览文件 @
deabb19b
...
...
@@ -577,9 +577,11 @@ void tpm_get_timeouts(struct tpm_chip *chip)
if
(
rc
)
return
;
if
(
be32_to_cpu
(
tpm_cmd
.
header
.
out
.
return_code
)
!=
3
*
sizeof
(
u32
))
if
(
be32_to_cpu
(
tpm_cmd
.
header
.
out
.
return_code
)
!=
0
||
be32_to_cpu
(
tpm_cmd
.
header
.
out
.
length
)
!=
sizeof
(
tpm_cmd
.
header
.
out
)
+
sizeof
(
u32
)
+
3
*
sizeof
(
u32
))
return
;
duration_cap
=
&
tpm_cmd
.
params
.
getcap_out
.
cap
.
duration
;
chip
->
vendor
.
duration
[
TPM_SHORT
]
=
usecs_to_jiffies
(
be32_to_cpu
(
duration_cap
->
tpm_short
));
...
...
@@ -939,6 +941,18 @@ ssize_t tpm_show_caps_1_2(struct device * dev,
}
EXPORT_SYMBOL_GPL
(
tpm_show_caps_1_2
);
ssize_t
tpm_show_timeouts
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
char
*
buf
)
{
struct
tpm_chip
*
chip
=
dev_get_drvdata
(
dev
);
return
sprintf
(
buf
,
"%d %d %d
\n
"
,
jiffies_to_usecs
(
chip
->
vendor
.
duration
[
TPM_SHORT
]),
jiffies_to_usecs
(
chip
->
vendor
.
duration
[
TPM_MEDIUM
]),
jiffies_to_usecs
(
chip
->
vendor
.
duration
[
TPM_LONG
]));
}
EXPORT_SYMBOL_GPL
(
tpm_show_timeouts
);
ssize_t
tpm_store_cancel
(
struct
device
*
dev
,
struct
device_attribute
*
attr
,
const
char
*
buf
,
size_t
count
)
{
...
...
drivers/char/tpm/tpm.h
浏览文件 @
deabb19b
...
...
@@ -56,6 +56,8 @@ extern ssize_t tpm_show_owned(struct device *, struct device_attribute *attr,
char
*
);
extern
ssize_t
tpm_show_temp_deactivated
(
struct
device
*
,
struct
device_attribute
*
attr
,
char
*
);
extern
ssize_t
tpm_show_timeouts
(
struct
device
*
,
struct
device_attribute
*
attr
,
char
*
);
struct
tpm_chip
;
...
...
drivers/char/tpm/tpm_tis.c
浏览文件 @
deabb19b
...
...
@@ -376,6 +376,7 @@ static DEVICE_ATTR(temp_deactivated, S_IRUGO, tpm_show_temp_deactivated,
NULL
);
static
DEVICE_ATTR
(
caps
,
S_IRUGO
,
tpm_show_caps_1_2
,
NULL
);
static
DEVICE_ATTR
(
cancel
,
S_IWUSR
|
S_IWGRP
,
NULL
,
tpm_store_cancel
);
static
DEVICE_ATTR
(
timeouts
,
S_IRUGO
,
tpm_show_timeouts
,
NULL
);
static
struct
attribute
*
tis_attrs
[]
=
{
&
dev_attr_pubek
.
attr
,
...
...
@@ -385,7 +386,8 @@ static struct attribute *tis_attrs[] = {
&
dev_attr_owned
.
attr
,
&
dev_attr_temp_deactivated
.
attr
,
&
dev_attr_caps
.
attr
,
&
dev_attr_cancel
.
attr
,
NULL
,
&
dev_attr_cancel
.
attr
,
&
dev_attr_timeouts
.
attr
,
NULL
,
};
static
struct
attribute_group
tis_attr_grp
=
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录