mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-13 14:24:11 +08:00
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>
This commit is contained in:
parent
6e0fe58b08
commit
5a118a39ec
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user