From: "irqchip-bot for ye xingchen" <tip-bot2@linutronix.de>
To: linux-kernel@vger.kernel.org
Cc: ye xingchen <ye.xingchen@zte.com.cn>,
Marc Zyngier <maz@kernel.org>,
tglx@linutronix.de
Subject: [irqchip: irq/irqchip-next] irqchip/st: Use device_get_match_data() to simplify the code
Date: Sat, 26 Nov 2022 13:34:30 -0000 [thread overview]
Message-ID: <166946967037.4906.1264875949138742444.tip-bot2@tip-bot2> (raw)
In-Reply-To: <202211171916504943604@zte.com.cn>
The following commit has been merged into the irq/irqchip-next branch of irqchip:
Commit-ID: 4e08a286b1f7a0a32828d6411255296e4ef51fa6
Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/4e08a286b1f7a0a32828d6411255296e4ef51fa6
Author: ye xingchen <ye.xingchen@zte.com.cn>
AuthorDate: Thu, 17 Nov 2022 19:16:50 +08:00
Committer: Marc Zyngier <maz@kernel.org>
CommitterDate: Sat, 26 Nov 2022 13:29:42
irqchip/st: Use device_get_match_data() to simplify the code
Directly get the match data with device_get_match_data().
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/202211171916504943604@zte.com.cn
---
drivers/irqchip/irq-st.c | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/irqchip/irq-st.c b/drivers/irqchip/irq-st.c
index 801551e..1b83512 100644
--- a/drivers/irqchip/irq-st.c
+++ b/drivers/irqchip/irq-st.c
@@ -153,18 +153,13 @@ static int st_irq_syscfg_enable(struct platform_device *pdev)
static int st_irq_syscfg_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
- const struct of_device_id *match;
struct st_irq_syscfg *ddata;
ddata = devm_kzalloc(&pdev->dev, sizeof(*ddata), GFP_KERNEL);
if (!ddata)
return -ENOMEM;
- match = of_match_device(st_irq_syscfg_match, &pdev->dev);
- if (!match)
- return -ENODEV;
-
- ddata->syscfg = (unsigned int)match->data;
+ ddata->syscfg = (unsigned int) device_get_match_data(&pdev->dev);
ddata->regmap = syscon_regmap_lookup_by_phandle(np, "st,syscfg");
if (IS_ERR(ddata->regmap)) {
prev parent reply other threads:[~2022-11-26 13:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-17 11:16 [PATCH linux-next] irqchip: st: " ye.xingchen
2022-11-26 13:34 ` irqchip-bot for ye xingchen [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=166946967037.4906.1264875949138742444.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
--cc=ye.xingchen@zte.com.cn \
/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
all inboxes | Powered by JetHome®