* [PATCH v1 1/1] platform/chrome: chromeos_laptop - replace open coded variant of DEFINE_RES_IRQ()
@ 2025-06-30 10:17 Andy Shevchenko
2025-07-01 7:20 ` Tzung-Bi Shih
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2025-06-30 10:17 UTC (permalink / raw)
To: chrome-platform, linux-kernel
Cc: Benson Leung, Tzung-Bi Shih, Andy Shevchenko
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>
---
drivers/platform/chrome/chromeos_laptop.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/platform/chrome/chromeos_laptop.c b/drivers/platform/chrome/chromeos_laptop.c
index 3579c42b515e..0b92047265de 100644
--- a/drivers/platform/chrome/chromeos_laptop.c
+++ b/drivers/platform/chrome/chromeos_laptop.c
@@ -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;
}
--
2.47.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] platform/chrome: chromeos_laptop - replace open coded variant of DEFINE_RES_IRQ()
2025-06-30 10:17 [PATCH v1 1/1] platform/chrome: chromeos_laptop - replace open coded variant of DEFINE_RES_IRQ() Andy Shevchenko
@ 2025-07-01 7:20 ` Tzung-Bi Shih
0 siblings, 0 replies; 2+ messages in thread
From: Tzung-Bi Shih @ 2025-07-01 7:20 UTC (permalink / raw)
To: Andy Shevchenko; +Cc: chrome-platform, linux-kernel, Benson Leung
On Mon, Jun 30, 2025 at 01:17:45PM +0300, Andy Shevchenko wrote:
> 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.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux.git for-next
[1/1] platform/chrome: chromeos_laptop - replace open coded variant of DEFINE_RES_IRQ()
commit: 5af89b6309417bdc2ff6835509d33a172c4a3218
Thanks!
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-01 7:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-30 10:17 [PATCH v1 1/1] platform/chrome: chromeos_laptop - replace open coded variant of DEFINE_RES_IRQ() Andy Shevchenko
2025-07-01 7:20 ` Tzung-Bi Shih
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).