summaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-lpc32xx.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2021-12-06 15:18:51 +0200
committerBartosz Golaszewski <brgl@bgdev.pl>2021-12-17 17:44:19 +0100
commit45a541a610af8156ee623b5906515796405ae9f5 (patch)
treeb1feda7f4649c4421004b2e05a9bc9609c755101 /drivers/gpio/gpio-lpc32xx.c
parent448cf90513d954ba5a61ce392809d6936902a9e6 (diff)
downloadlinux-stable-45a541a610af8156ee623b5906515796405ae9f5.tar.gz
linux-stable-45a541a610af8156ee623b5906515796405ae9f5.tar.bz2
linux-stable-45a541a610af8156ee623b5906515796405ae9f5.zip
gpio: 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> Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'drivers/gpio/gpio-lpc32xx.c')
-rw-r--r--drivers/gpio/gpio-lpc32xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-lpc32xx.c b/drivers/gpio/gpio-lpc32xx.c
index 4e626c4235c2..d2b65cfb336e 100644
--- a/drivers/gpio/gpio-lpc32xx.c
+++ b/drivers/gpio/gpio-lpc32xx.c
@@ -512,10 +512,10 @@ static int lpc32xx_gpio_probe(struct platform_device *pdev)
return PTR_ERR(reg_base);
for (i = 0; i < ARRAY_SIZE(lpc32xx_gpiochip); i++) {
+ lpc32xx_gpiochip[i].chip.parent = &pdev->dev;
if (pdev->dev.of_node) {
lpc32xx_gpiochip[i].chip.of_xlate = lpc32xx_of_xlate;
lpc32xx_gpiochip[i].chip.of_gpio_n_cells = 3;
- lpc32xx_gpiochip[i].chip.of_node = pdev->dev.of_node;
lpc32xx_gpiochip[i].reg_base = reg_base;
}
devm_gpiochip_add_data(&pdev->dev, &lpc32xx_gpiochip[i].chip,