diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2022-05-03 18:13:10 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2022-05-05 00:08:06 +0200 |
commit | f4f1739a09dc7bcac3c6471cf3f82443934c3608 (patch) | |
tree | 6a0f29e503dad13f7079ad5df11a9c92e2406486 /drivers/pinctrl/nomadik | |
parent | 3389b09878dddd58ef52bd0bf43cc42ea5a9ea2a (diff) |
pinctrl: nomadik: Setup parent device and get rid of unnecessary of_node assignment
Some of the drivers do not set parent device. This may lead to obstacles
during debugging or understanding the device relations from the Linux
point of view. Assign parent device for GPIO chips created by these
drivers.
While at it, let GPIO library to assign of_node from the parent device.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20220503151310.58762-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/nomadik')
-rw-r--r-- | drivers/pinctrl/nomadik/pinctrl-nomadik.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/pinctrl/nomadik/pinctrl-nomadik.c b/drivers/pinctrl/nomadik/pinctrl-nomadik.c index 4757bf964d3c..640e50d94f27 100644 --- a/drivers/pinctrl/nomadik/pinctrl-nomadik.c +++ b/drivers/pinctrl/nomadik/pinctrl-nomadik.c @@ -1113,6 +1113,7 @@ static int nmk_gpio_probe(struct platform_device *dev) spin_lock_init(&nmk_chip->lock); chip = &nmk_chip->chip; + chip->parent = &dev->dev; chip->request = gpiochip_generic_request; chip->free = gpiochip_generic_free; chip->get_direction = nmk_gpio_get_dir; @@ -1154,7 +1155,6 @@ static int nmk_gpio_probe(struct platform_device *dev) clk_enable(nmk_chip->clk); nmk_chip->lowemi = readl_relaxed(nmk_chip->addr + NMK_GPIO_LOWEMI); clk_disable(nmk_chip->clk); - chip->of_node = np; ret = gpiochip_add_data(chip, nmk_chip); if (ret) |