summaryrefslogtreecommitdiff
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-11-17 14:16:50 +0300
committerMarc Zyngier <maz@kernel.org>2022-11-26 16:29:42 +0300
commit4e08a286b1f7a0a32828d6411255296e4ef51fa6 (patch)
tree4e29ce1dda7e54073d44a5fed55ec453848eefd2 /drivers/irqchip
parent9869f37aa4ee2a2e08536529dab4ccda9e23ce0c (diff)
downloadlinux-4e08a286b1f7a0a32828d6411255296e4ef51fa6.tar.xz
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
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-st.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/irqchip/irq-st.c b/drivers/irqchip/irq-st.c
index 801551e46a7b..1b83512b29c6 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)) {