diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-12-06 15:18:51 +0200 |
---|---|---|
committer | Bartosz Golaszewski <brgl@bgdev.pl> | 2021-12-17 17:44:19 +0100 |
commit | 45a541a610af8156ee623b5906515796405ae9f5 (patch) | |
tree | b1feda7f4649c4421004b2e05a9bc9609c755101 /drivers/gpio/gpio-creg-snps.c | |
parent | 448cf90513d954ba5a61ce392809d6936902a9e6 (diff) | |
download | lwn-45a541a610af8156ee623b5906515796405ae9f5.tar.gz lwn-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-creg-snps.c')
-rw-r--r-- | drivers/gpio/gpio-creg-snps.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpio-creg-snps.c b/drivers/gpio/gpio-creg-snps.c index 1d0827e79703..789384c6e178 100644 --- a/drivers/gpio/gpio-creg-snps.c +++ b/drivers/gpio/gpio-creg-snps.c @@ -163,12 +163,12 @@ static int creg_gpio_probe(struct platform_device *pdev) spin_lock_init(&hcg->lock); + hcg->gc.parent = dev; hcg->gc.label = dev_name(dev); hcg->gc.base = -1; hcg->gc.ngpio = ngpios; hcg->gc.set = creg_gpio_set; hcg->gc.direction_output = creg_gpio_dir_out; - hcg->gc.of_node = dev->of_node; ret = devm_gpiochip_add_data(dev, &hcg->gc, hcg); if (ret) |