Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 42a5968c authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Marc Zyngier
Browse files

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: default avatarSimon Horman <horms+renesas@verge.net.au>
Acked-by: default avatarRob Herring <robh@kernel.org>
Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
parent bea173e5
Loading
Loading
Loading
Loading
+3 −6
Original line number Original line Diff line number Diff line
@@ -389,9 +389,8 @@ MODULE_DEVICE_TABLE(of, intc_irqpin_dt_ids);


static int intc_irqpin_probe(struct platform_device *pdev)
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;
	struct device *dev = &pdev->dev;
	const struct of_device_id *of_id;
	struct intc_irqpin_priv *p;
	struct intc_irqpin_priv *p;
	struct intc_irqpin_iomem *i;
	struct intc_irqpin_iomem *i;
	struct resource *io[INTC_IRQPIN_REG_NR];
	struct resource *io[INTC_IRQPIN_REG_NR];
@@ -422,11 +421,9 @@ static int intc_irqpin_probe(struct platform_device *pdev)
	p->pdev = pdev;
	p->pdev = pdev;
	platform_set_drvdata(pdev, p);
	platform_set_drvdata(pdev, p);


	of_id = of_match_device(intc_irqpin_dt_ids, dev);
	config = of_device_get_match_data(dev);
	if (of_id && of_id->data) {
	if (config)
		config = of_id->data;
		p->needs_clk = config->needs_clk;
		p->needs_clk = config->needs_clk;
	}


	p->clk = devm_clk_get(dev, NULL);
	p->clk = devm_clk_get(dev, NULL);
	if (IS_ERR(p->clk)) {
	if (IS_ERR(p->clk)) {