Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: samsung: speyside: Free gpiod table

We create a gpio descriptor table but it needs to be free:ed
when the module is removed. Add a devm_ action to do the job.

Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Fixes: da9146c19b17 ("ASoC: samsung: speyside: Convert to GPIO descriptor")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://patch.msgid.link/20250312-cleanup-table-v1-1-1d9a14464482@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Linus Walleij and committed by
Mark Brown
87fa872a 02e1cf7a

+10
+10
sound/soc/samsung/speyside.c
··· 347 347 }, 348 348 }; 349 349 350 + static void speyside_gpiod_table_action(void *data) 351 + { 352 + gpiod_remove_lookup_table(&wm8996_gpiod_table); 353 + } 354 + 350 355 static int speyside_probe(struct platform_device *pdev) 351 356 { 352 357 struct snd_soc_card *card = &speyside; ··· 360 355 card->dev = &pdev->dev; 361 356 362 357 gpiod_add_lookup_table(&wm8996_gpiod_table); 358 + ret = devm_add_action_or_reset(&pdev->dev, speyside_gpiod_table_action, 359 + NULL); 360 + if (ret) 361 + return ret; 362 + 363 363 ret = devm_snd_soc_register_card(&pdev->dev, card); 364 364 if (ret) 365 365 dev_err_probe(&pdev->dev, ret, "snd_soc_register_card() failed\n");