mfd: 88pm800: Use DEFINE_RES_IRQ_NAMED() to simplify code
authorZhen Lei <thunder.leizhen@huawei.com>
Tue, 1 Jun 2021 07:06:30 +0000 (15:06 +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/88pm800.c

index c7f9649..eaf9845 100644 (file)
@@ -122,12 +122,7 @@ static const struct i2c_device_id pm80x_id_table[] = {
 MODULE_DEVICE_TABLE(i2c, pm80x_id_table);
 
 static const struct resource rtc_resources[] = {
-       {
-        .name = "88pm80x-rtc",
-        .start = PM800_IRQ_RTC,
-        .end = PM800_IRQ_RTC,
-        .flags = IORESOURCE_IRQ,
-        },
+       DEFINE_RES_IRQ_NAMED(PM800_IRQ_RTC, "88pm80x-rtc"),
 };
 
 static struct mfd_cell rtc_devs[] = {
@@ -140,12 +135,7 @@ static struct mfd_cell rtc_devs[] = {
 };
 
 static struct resource onkey_resources[] = {
-       {
-        .name = "88pm80x-onkey",
-        .start = PM800_IRQ_ONKEY,
-        .end = PM800_IRQ_ONKEY,
-        .flags = IORESOURCE_IRQ,
-        },
+       DEFINE_RES_IRQ_NAMED(PM800_IRQ_ONKEY, "88pm80x-onkey"),
 };
 
 static const struct mfd_cell onkey_devs[] = {