From: "Rosen Penev" <rosenp@gmail.com>
To: "Andreas Kemnade" <andreas@kemnade.info>,
"Rosen Penev" <rosenp@gmail.com>
Cc: <linux-omap@vger.kernel.org>,
"Aaro Koskinen" <aaro.koskinen@iki.fi>,
"Kevin Hilman" <khilman@baylibre.com>,
"Roger Quadros" <rogerq@kernel.org>,
"Tony Lindgren" <tony@atomide.com>, "Lee Jones" <lee@kernel.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mfd: twl6030-irq: Use of_device_get_match_data()
Date: Sun, 17 May 2026 23:24:42 -0700 [thread overview]
Message-ID: <DILL63IHZU3T.15YECJHURQZSC@gmail.com> (raw)
In-Reply-To: <20260518074631.532e25dd@kemnade.info>
On Sun May 17, 2026 at 10:46 PM PDT, Andreas Kemnade wrote:
> On Sun, 17 May 2026 21:15:58 -0700
> Rosen Penev <rosenp@gmail.com> wrote:
>
>> Use of_device_get_match_data() to fetch the IRQ mapping table directly instead of open-coding an of_match_device() lookup.
>>
>> This also lets the driver drop the of_device.h include.
>>
>> Assisted-by: Codex:GPT-5.5
>> Signed-off-by: Rosen Penev <rosenp@gmail.com>
>> ---
>> drivers/mfd/twl6030-irq.c | 10 ++++------
>> 1 file changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/mfd/twl6030-irq.c b/drivers/mfd/twl6030-irq.c
>> index 0ca00f618d4d..8831c81a1f90 100644
>> --- a/drivers/mfd/twl6030-irq.c
>> +++ b/drivers/mfd/twl6030-irq.c
>> @@ -27,7 +27,6 @@
>> #include <linux/suspend.h>
>> #include <linux/of.h>
>> #include <linux/irqdomain.h>
>> -#include <linux/of_device.h>
>>
>> #include "twl-core.h"
>>
>> @@ -293,10 +292,10 @@ int twl6030_init_irq(struct device *dev, int irq_num)
>> int nr_irqs;
>> int status;
>> u8 mask[3];
>> - const struct of_device_id *of_id;
>> + const int *irq_mapping_tbl;
>>
>> - of_id = of_match_device(twl6030_of_match, dev);
>
> twl6030_of_match is used only here.
>
>> - if (!of_id || !of_id->data) {
>> + irq_mapping_tbl = of_device_get_match_data(dev);
>
> so how should of_device_get_match_data() know about it?
Ah looks like this is wrong.
>
> Regards,
> Andreas
prev parent reply other threads:[~2026-05-18 6:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-18 4:15 [PATCH] mfd: twl6030-irq: Use of_device_get_match_data() Rosen Penev
2026-05-18 5:46 ` Andreas Kemnade
2026-05-18 6:24 ` Rosen Penev [this message]
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=DILL63IHZU3T.15YECJHURQZSC@gmail.com \
--to=rosenp@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=andreas@kemnade.info \
--cc=khilman@baylibre.com \
--cc=lee@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=rogerq@kernel.org \
--cc=tony@atomide.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox