Skip to contentSkip to conversation

mfd: 88pm800: Use DEFINE_RES_IRQ_NAMED() to simplify code

PATCH New Zhen Lei 1 participant 1 message Jun 1, 2021 Multifunction devices (MFD)

lore
Share & tools
lore

Zhen Lei

author
#0 lore raw

PATCH 1/1 mfd: 88pm800: Use DEFINE_RES_IRQ_NAMED() to simplify code

No functional change.

---
 drivers/mfd/88pm800.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)
drivers/mfd/88pm800.c +2 -12
index c7f964996a91717..eaf9845633b4d60 100644
@@ -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[] = {
Signature · 1 line
2.26.0.106.g9fadedd