Skip to content

Commit c5e96e5

Browse files
rfvirgiltiwai
authored andcommitted
ALSA: hda/cirrus_scodec_test: Fix incorrect setup of gpiochip
Set gpiochip parent to the struct device of the dummy GPIO driver so that the software node will be associated with the GPIO chip. The recent commit e5d527b ("gpio: swnode: don't use the swnode's name as the key for GPIO lookup") broke cirrus_scodec_test, because the software node no longer gets associated with the GPIO driver by name. Instead, setting struct gpio_chip.parent to the owning struct device will find the node using a normal fwnode lookup. Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com> Fixes: 2144833 ("ALSA: hda: cirrus_scodec: Add KUnit test") Link: https://patch.msgid.link/20260113130954.574670-1-rf@opensource.cirrus.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
1 parent cbd46cb commit c5e96e5

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

sound/hda/codecs/side-codecs/cirrus_scodec_test.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ static int cirrus_scodec_test_gpio_probe(struct platform_device *pdev)
103103

104104
/* GPIO core modifies our struct gpio_chip so use a copy */
105105
gpio_priv->chip = cirrus_scodec_test_gpio_chip;
106+
gpio_priv->chip.parent = &pdev->dev;
106107
ret = devm_gpiochip_add_data(&pdev->dev, &gpio_priv->chip, gpio_priv);
107108
if (ret)
108109
return dev_err_probe(&pdev->dev, ret, "Failed to add gpiochip\n");

0 commit comments

Comments
 (0)