diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-12-06 15:18:52 +0200 |
---|---|---|
committer | Bartosz Golaszewski <brgl@bgdev.pl> | 2021-12-17 17:50:46 +0100 |
commit | 6dbe6c07f94f349098b512d88a1e1c5e2312b13d (patch) | |
tree | f9b6be6937c13c8494ba5263cb0f5b1ab8fc503e /drivers/gpio/gpio-arizona.c | |
parent | 45a541a610af8156ee623b5906515796405ae9f5 (diff) | |
download | linux-6dbe6c07f94f349098b512d88a1e1c5e2312b13d.tar.bz2 |
gpio: Propagate firmware node from a parent device
When creating MFD platform devices the firmware node is left unset.
This, in particular, prevents GPIO library to use it for different
purposes. Propagate firmware node from the parent device and let
GPIO library do the right thing.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
Diffstat (limited to 'drivers/gpio/gpio-arizona.c')
-rw-r--r-- | drivers/gpio/gpio-arizona.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-arizona.c b/drivers/gpio/gpio-arizona.c index 2bc173c352ce..02f9ae19cd44 100644 --- a/drivers/gpio/gpio-arizona.c +++ b/drivers/gpio/gpio-arizona.c @@ -151,6 +151,8 @@ static int arizona_gpio_probe(struct platform_device *pdev) struct arizona_gpio *arizona_gpio; int ret; + device_set_node(&pdev->dev, dev_fwnode(pdev->dev.parent)); + arizona_gpio = devm_kzalloc(&pdev->dev, sizeof(*arizona_gpio), GFP_KERNEL); if (!arizona_gpio) @@ -159,9 +161,6 @@ static int arizona_gpio_probe(struct platform_device *pdev) arizona_gpio->arizona = arizona; arizona_gpio->gpio_chip = template_chip; arizona_gpio->gpio_chip.parent = &pdev->dev; -#ifdef CONFIG_OF_GPIO - arizona_gpio->gpio_chip.of_node = arizona->dev->of_node; -#endif switch (arizona->type) { case WM5102: |