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

Commit bfa855ba authored by Fabio Estevam's avatar Fabio Estevam Committed by Bryan Wu
Browse files

leds: leds-gpio: Let device core handle pinctrl



Since commit ab78029e (drivers/pinctrl: grab default handles from device core)
we can rely on device core for handling pinctrl, so remove
devm_pinctrl_get_select_default() from the driver.

Reported-by: default avatarStephen Warren <warren@wwwdotorg.org>
Signed-off-by: default avatarFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: default avatarBryan Wu <cooloney@gmail.com>
parent 28720cff
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -20,7 +20,6 @@
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/err.h>

struct gpio_led_data {
@@ -236,13 +235,8 @@ static int gpio_led_probe(struct platform_device *pdev)
{
	struct gpio_led_platform_data *pdata = pdev->dev.platform_data;
	struct gpio_leds_priv *priv;
	struct pinctrl *pinctrl;
	int i, ret = 0;

	pinctrl = devm_pinctrl_get_select_default(&pdev->dev);
	if (IS_ERR(pinctrl))
		dev_warn(&pdev->dev,
			"pins are not configured from the driver\n");

	if (pdata && pdata->num_leds) {
		priv = devm_kzalloc(&pdev->dev,