]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
platform/chrome: chromeos_laptop: Replace open coded variant of DEFINE_RES_IRQ()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 30 Jun 2025 10:17:45 +0000 (13:17 +0300)
committerTzung-Bi Shih <tzungbi@kernel.org>
Tue, 1 Jul 2025 07:15:14 +0000 (07:15 +0000)
DEFINE_RES_*() are compound literals, and hence no need to do that explicitly.
Besides that, we have no IRQ name provided, no need to use _NAMED() variant.
Replace open coded variant of DEFINE_RES_IRQ().
No functional changes intended.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20250630101745.1855918-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
drivers/platform/chrome/chromeos_laptop.c

index 3579c42b515ef19e0b4119205d8f73fdb39a750d..0b92047265dea66f5283bd40db49910d00476977 100644 (file)
@@ -726,9 +726,9 @@ static int __init chromeos_laptop_setup_irq(struct i2c_peripheral *i2c_dev)
                if (irq < 0)
                        return irq;
 
-               i2c_dev->irq_resource  = (struct resource)
-                       DEFINE_RES_NAMED(irq, 1, NULL,
-                                        IORESOURCE_IRQ | i2c_dev->irqflags);
+               i2c_dev->irq_resource = DEFINE_RES_IRQ(irq);
+               i2c_dev->irq_resource.flags |= i2c_dev->irqflags;
+
                i2c_dev->board_info.resources = &i2c_dev->irq_resource;
                i2c_dev->board_info.num_resources = 1;
        }