mfd: asic3: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code
authorZhen Lei <thunder.leizhen@huawei.com>
Tue, 1 Jun 2021 06:36:48 +0000 (14:36 +0800)
committerLee Jones <lee.jones@linaro.org>
Wed, 2 Jun 2021 09:51:19 +0000 (10:51 +0100)
No functional change.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
drivers/mfd/asic3.c

index a6bd213..8d58c8d 100644 (file)
@@ -723,16 +723,8 @@ static struct tmio_mmc_data asic3_mmc_data = {
 };
 
 static struct resource asic3_mmc_resources[] = {
-       {
-               .start = ASIC3_SD_CTRL_BASE,
-               .end   = ASIC3_SD_CTRL_BASE + 0x3ff,
-               .flags = IORESOURCE_MEM,
-       },
-       {
-               .start = 0,
-               .end   = 0,
-               .flags = IORESOURCE_IRQ,
-       },
+       DEFINE_RES_MEM(ASIC3_SD_CTRL_BASE, 0x400),
+       DEFINE_RES_IRQ(0)
 };
 
 static int asic3_mmc_enable(struct platform_device *pdev)