Skip to content

Commit 766cc7f

Browse files
andy-shevbroonie
authored andcommitted
ASoC: zl38060: 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/20211202204838.75287-1-andriy.shevchenko@linux.intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
1 parent c686316 commit 766cc7f

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

sound/soc/codecs/zl38060.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -589,9 +589,7 @@ static int zl38_spi_probe(struct spi_device *spi)
589589
sizeof(template_chip), GFP_KERNEL);
590590
if (!priv->gpio_chip)
591591
return -ENOMEM;
592-
#ifdef CONFIG_OF_GPIO
593-
priv->gpio_chip->of_node = dev->of_node;
594-
#endif
592+
priv->gpio_chip->parent = dev;
595593
err = devm_gpiochip_add_data(dev, priv->gpio_chip, priv->regmap);
596594
if (err)
597595
return err;

0 commit comments

Comments
 (0)