From 8a8d6bbe1d3bc7137c777ba06246d7e9c08dde4d Mon Sep 17 00:00:00 2001 From: Andy Shevchenko Date: Tue, 14 Dec 2021 14:58:54 +0200 Subject: pinctrl: Get rid of duplicate of_node assignment in the drivers GPIO library does copy the of_node from the parent device of the GPIO chip, there is no need to repeat this in the individual drivers. Remove these assignment all at once. For the details one may look into the of_gpio_dev_init() implementation. Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20211214125855.33207-1-andriy.shevchenko@linux.intel.com Signed-off-by: Linus Walleij --- drivers/pinctrl/pinctrl-digicolor.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/pinctrl/pinctrl-digicolor.c') diff --git a/drivers/pinctrl/pinctrl-digicolor.c b/drivers/pinctrl/pinctrl-digicolor.c index ff702cfbaa28..cc3546fc4610 100644 --- a/drivers/pinctrl/pinctrl-digicolor.c +++ b/drivers/pinctrl/pinctrl-digicolor.c @@ -233,7 +233,7 @@ static void dc_gpio_set(struct gpio_chip *chip, unsigned gpio, int value) spin_unlock_irqrestore(&pmap->lock, flags); } -static int dc_gpiochip_add(struct dc_pinmap *pmap, struct device_node *np) +static int dc_gpiochip_add(struct dc_pinmap *pmap) { struct gpio_chip *chip = &pmap->chip; int ret; @@ -248,7 +248,6 @@ static int dc_gpiochip_add(struct dc_pinmap *pmap, struct device_node *np) chip->set = dc_gpio_set; chip->base = -1; chip->ngpio = PINS_COUNT; - chip->of_node = np; chip->of_gpio_n_cells = 2; spin_lock_init(&pmap->lock); @@ -326,7 +325,7 @@ static int dc_pinctrl_probe(struct platform_device *pdev) return PTR_ERR(pmap->pctl); } - return dc_gpiochip_add(pmap, pdev->dev.of_node); + return dc_gpiochip_add(pmap); } static const struct of_device_id dc_pinctrl_ids[] = { -- cgit v1.2.3