From: Zhen Lei Date: Thu, 3 Jun 2021 07:49:55 +0000 (+0800) Subject: tpm_tis: Use DEFINE_RES_MEM() to simplify code X-Git-Tag: baikal/aarch64/sdk6.1~6344^2~1 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=0e0bf33a5502a889c262d7ae7ba808ce7bfc78f7;p=kernel.git 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 Reviewed-by: Jarkko Sakkinen Signed-off-by: Jarkko Sakkinen --- diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 4ed6e660273a4..d3f2e5364c275 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)