提交 5a118a39 编写于 作者: Z Zhen Lei 提交者: Jarkko Sakkinen

tpm_tis: Use DEFINE_RES_MEM() to simplify code

Use DEFINE_RES_MEM() to save a couple of lines of code, which is simpler
and more readable. The start address does not need to appear twice.
Signed-off-by: NZhen Lei <thunder.leizhen@huawei.com>
Reviewed-by: NJarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: NJarkko Sakkinen <jarkko@kernel.org>
上级 6e0fe58b
...@@ -363,11 +363,7 @@ static int tpm_tis_force_device(void) ...@@ -363,11 +363,7 @@ static int tpm_tis_force_device(void)
{ {
struct platform_device *pdev; struct platform_device *pdev;
static const struct resource x86_resources[] = { static const struct resource x86_resources[] = {
{ DEFINE_RES_MEM(0xFED40000, TIS_MEM_LEN)
.start = 0xFED40000,
.end = 0xFED40000 + TIS_MEM_LEN - 1,
.flags = IORESOURCE_MEM,
},
}; };
if (!force) if (!force)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册