Skip to content

Commit 5a118a3

Browse files
Zhen Leijarkkojs
authored andcommitted
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 <[email protected]> Reviewed-by: Jarkko Sakkinen <[email protected]> Signed-off-by: Jarkko Sakkinen <[email protected]>
1 parent 6e0fe58 commit 5a118a3

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

drivers/char/tpm/tpm_tis.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -363,11 +363,7 @@ static int tpm_tis_force_device(void)
363363
{
364364
struct platform_device *pdev;
365365
static const struct resource x86_resources[] = {
366-
{
367-
.start = 0xFED40000,
368-
.end = 0xFED40000 + TIS_MEM_LEN - 1,
369-
.flags = IORESOURCE_MEM,
370-
},
366+
DEFINE_RES_MEM(0xFED40000, TIS_MEM_LEN)
371367
};
372368

373369
if (!force)

0 commit comments

Comments
 (0)