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

index 59dfeff..38665ef 100644 (file)
 #define AS3722_DEVICE_ID       0x0C
 
 static const struct resource as3722_rtc_resource[] = {
-       {
-               .name = "as3722-rtc-alarm",
-               .start = AS3722_IRQ_RTC_ALARM,
-               .end = AS3722_IRQ_RTC_ALARM,
-               .flags = IORESOURCE_IRQ,
-       },
+       DEFINE_RES_IRQ_NAMED(AS3722_IRQ_RTC_ALARM, "as3722-rtc-alarm"),
 };
 
 static const struct resource as3722_adc_resource[] = {
-       {
-               .name = "as3722-adc",
-               .start = AS3722_IRQ_ADC,
-               .end = AS3722_IRQ_ADC,
-               .flags = IORESOURCE_IRQ,
-       },
+       DEFINE_RES_IRQ_NAMED(AS3722_IRQ_ADC, "as3722-adc"),
 };
 
 static const struct mfd_cell as3722_devs[] = {