summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm_tis.c
diff options
context:
space:
mode:
authorZhen Lei <thunder.leizhen@huawei.com>2021-06-03 09:49:55 +0200
committerJarkko Sakkinen <jarkko@kernel.org>2021-06-23 15:51:03 +0200
commit5a118a39ec9207f9b8cddb013ad270c80bc84a1c (patch)
tree9da6a2856133df4415e65e4ee7234ad6e4322bac /drivers/char/tpm/tpm_tis.c
parenttpm: fix some doc warnings in tpm1-cmd.c (diff)
downloadlinux-5a118a39ec9207f9b8cddb013ad270c80bc84a1c.tar.xz
linux-5a118a39ec9207f9b8cddb013ad270c80bc84a1c.zip
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: Zhen Lei <thunder.leizhen@huawei.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Diffstat (limited to 'drivers/char/tpm/tpm_tis.c')
-rw-r--r--drivers/char/tpm/tpm_tis.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index 4ed6e660273a..d3f2e5364c27 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -363,11 +363,7 @@ static int tpm_tis_force_device(void)
{
struct platform_device *pdev;
static const struct resource x86_resources[] = {
- {
- .start = 0xFED40000,
- .end = 0xFED40000 + TIS_MEM_LEN - 1,
- .flags = IORESOURCE_MEM,
- },
+ DEFINE_RES_MEM(0xFED40000, TIS_MEM_LEN)
};
if (!force)