diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2017-10-04 14:17:58 +0200 |
---|---|---|
committer | Marc Zyngier <marc.zyngier@arm.com> | 2017-10-19 10:55:16 +0100 |
commit | 42a5968c0ae8f19906e16fa34ea9bdb6f5095166 (patch) | |
tree | 88084247464f21805a17aca04dd2764624b20543 | |
parent | bea173e5acd73d536dd234b34328cd52c1cadaab (diff) | |
download | linux-stable-42a5968c0ae8f19906e16fa34ea9bdb6f5095166.tar.gz linux-stable-42a5968c0ae8f19906e16fa34ea9bdb6f5095166.tar.bz2 linux-stable-42a5968c0ae8f19906e16fa34ea9bdb6f5095166.zip |
irqchip/renesas-intc-irqpin: Use of_device_get_match_data() helper
Use the of_device_get_match_data() helper instead of open coding.
Acked-by: Simon Horman <horms+renesas@verge.net.au>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
-rw-r--r-- | drivers/irqchip/irq-renesas-intc-irqpin.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/irqchip/irq-renesas-intc-irqpin.c b/drivers/irqchip/irq-renesas-intc-irqpin.c index 713177d97c7a..06f29cf5018a 100644 --- a/drivers/irqchip/irq-renesas-intc-irqpin.c +++ b/drivers/irqchip/irq-renesas-intc-irqpin.c @@ -389,9 +389,8 @@ MODULE_DEVICE_TABLE(of, intc_irqpin_dt_ids); static int intc_irqpin_probe(struct platform_device *pdev) { - const struct intc_irqpin_config *config = NULL; + const struct intc_irqpin_config *config; struct device *dev = &pdev->dev; - const struct of_device_id *of_id; struct intc_irqpin_priv *p; struct intc_irqpin_iomem *i; struct resource *io[INTC_IRQPIN_REG_NR]; @@ -422,11 +421,9 @@ static int intc_irqpin_probe(struct platform_device *pdev) p->pdev = pdev; platform_set_drvdata(pdev, p); - of_id = of_match_device(intc_irqpin_dt_ids, dev); - if (of_id && of_id->data) { - config = of_id->data; + config = of_device_get_match_data(dev); + if (config) p->needs_clk = config->needs_clk; - } p->clk = devm_clk_get(dev, NULL); if (IS_ERR(p->clk)) { |