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

Commit 7eb6ce2f authored by Rob Herring's avatar Rob Herring Committed by Linus Walleij
Browse files

gpio: Convert to using %pOF instead of full_name



Now that we have a custom printf format specifier, convert users of
full_name to use %pOF instead. This is preparation to remove storing
of the full path string for each node.

Signed-off-by: default avatarRob Herring <robh@kernel.org>
Cc: Tien Hock Loh <thloh@altera.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Alexandre Courbot <gnurou@gmail.com>
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: bcm-kernel-feedback-list@broadcom.com
Cc: Michal Simek <michal.simek@xilinx.com>
Cc: "Sören Brinkmann" <soren.brinkmann@xilinx.com>
Cc: linux-gpio@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org
Acked-by: default avatarGregory Fong <gregory.0xf0@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent 1a9ef909
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -324,8 +324,8 @@ static int altera_gpio_probe(struct platform_device *pdev)
	return 0;
	return 0;
teardown:
teardown:
	of_mm_gpiochip_remove(&altera_gc->mmchip);
	of_mm_gpiochip_remove(&altera_gc->mmchip);
	pr_err("%s: registration failed with status %d\n",
	pr_err("%pOF: registration failed with status %d\n",
		node->full_name, ret);
		node, ret);


	return ret;
	return ret;
}
}
+1 −1
Original line number Original line Diff line number Diff line
@@ -483,7 +483,7 @@ static int brcmstb_gpio_probe(struct platform_device *pdev)


		gc->of_node = np;
		gc->of_node = np;
		gc->owner = THIS_MODULE;
		gc->owner = THIS_MODULE;
		gc->label = np->full_name;
		gc->label = devm_kasprintf(dev, GFP_KERNEL, "%pOF", dev->of_node);
		gc->base = gpio_base;
		gc->base = gpio_base;
		gc->of_gpio_n_cells = 2;
		gc->of_gpio_n_cells = 2;
		gc->of_xlate = brcmstb_gpio_of_xlate;
		gc->of_xlate = brcmstb_gpio_of_xlate;
+2 −4
Original line number Original line Diff line number Diff line
@@ -76,8 +76,7 @@ static int __init gef_gpio_probe(struct platform_device *pdev)
	}
	}


	/* Setup pointers to chip functions */
	/* Setup pointers to chip functions */
	gc->label = devm_kstrdup(&pdev->dev, pdev->dev.of_node->full_name,
	gc->label = devm_kasprintf(&pdev->dev, GFP_KERNEL, "%pOF", pdev->dev.of_node);
				     GFP_KERNEL);
	if (!gc->label) {
	if (!gc->label) {
		ret = -ENOMEM;
		ret = -ENOMEM;
		goto err0;
		goto err0;
@@ -96,8 +95,7 @@ static int __init gef_gpio_probe(struct platform_device *pdev)
	return 0;
	return 0;
err0:
err0:
	iounmap(regs);
	iounmap(regs);
	pr_err("%s: GPIO chip registration failed\n",
	pr_err("%pOF: GPIO chip registration failed\n", pdev->dev.of_node);
			pdev->dev.of_node->full_name);
	return ret;
	return ret;
};
};


+1 −1
Original line number Original line Diff line number Diff line
@@ -367,7 +367,7 @@ static int grgpio_probe(struct platform_device *ofdev)
	gc->of_node = np;
	gc->of_node = np;
	gc->owner = THIS_MODULE;
	gc->owner = THIS_MODULE;
	gc->to_irq = grgpio_to_irq;
	gc->to_irq = grgpio_to_irq;
	gc->label = np->full_name;
	gc->label = devm_kasprintf(&ofdev->dev, GFP_KERNEL, "%pOF", np);
	gc->base = -1;
	gc->base = -1;


	err = of_property_read_u32(np, "nbits", &prop);
	err = of_property_read_u32(np, "nbits", &prop);
+2 −2
Original line number Original line Diff line number Diff line
@@ -348,8 +348,8 @@ static int mpc8xxx_probe(struct platform_device *pdev)


	ret = gpiochip_add_data(gc, mpc8xxx_gc);
	ret = gpiochip_add_data(gc, mpc8xxx_gc);
	if (ret) {
	if (ret) {
		pr_err("%s: GPIO chip registration failed with status %d\n",
		pr_err("%pOF: GPIO chip registration failed with status %d\n",
		       np->full_name, ret);
		       np, ret);
		goto err;
		goto err;
	}
	}


Loading