From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: chrome-platform@lists.linux.dev, linux-kernel@vger.kernel.org
Cc: Benson Leung <bleung@chromium.org>,
Tzung-Bi Shih <tzungbi@kernel.org>,
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 1/1] platform/chrome: chromeos_laptop - replace open coded variant of DEFINE_RES_IRQ()
Date: Mon, 30 Jun 2025 13:17:45 +0300 [thread overview]
Message-ID: <20250630101745.1855918-1-andriy.shevchenko@linux.intel.com> (raw)
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
next reply other threads:[~2025-06-30 10:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 10:17 Andy Shevchenko [this message]
2025-07-01 7:20 ` [PATCH v1 1/1] platform/chrome: chromeos_laptop - replace open coded variant of DEFINE_RES_IRQ() Tzung-Bi Shih
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250630101745.1855918-1-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=tzungbi@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.