summaryrefslogtreecommitdiff
path: root/sound/soc/sunxi/sun50i-dmic.c
AgeCommit message (Collapse)AuthorFilesLines
2023-03-20ASoC: sunxi: sun50i-dmic: Convert to platform remove callback returning voidUwe Kleine-König1-4/+2
The .remove() callback for a platform driver returns an int which makes many driver authors wrongly assume it's possible to do error handling by returning an error code. However the value returned is (mostly) ignored and this typically results in resource leaks. To improve here there is a quest to make the remove callback return void. In the first step of this quest all drivers are converted to .remove_new() which already returns void. Trivially convert this driver from always returning zero in the remove callback to the void returning variant. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Ban Tao <fengzheng923@gmail.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Acked-by: Takashi Iwai <tiwai@suse.de> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com> Link: https://lore.kernel.org/r/20230315150745.67084-144-u.kleine-koenig@pengutronix.de Signed-off-by: Mark Brown <broonie@kernel.org>
2022-11-14ASoC: sunxi: use devm_platform_get_and_ioremap_resource()Minghao Chi1-2/+1
Convert platform_get_resource(), devm_ioremap_resource() to a single call to devm_platform_get_and_ioremap_resource(), as this is exactly what this function does. Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Acked-by: Samuel Holland <samuel@sholland.org> Link: https://lore.kernel.org/r/202211111641514826535@zte.com.cn Signed-off-by: Mark Brown <broonie@kernel.org>
2022-10-24ASoC: sun50i-dmic: avoid unused variable warning for sun50i_dmic_of_matchBan Tao1-1/+1
In configurations with CONFIG_OF=n, we get a harmless build warning: sound/soc/sunxi/sun50i-dmic.c:268:34: warning: unused variable 'sun50i_dmic_of_match' [-Wunused-const-variable] Signed-off-by: Ban Tao <fengzheng923@gmail.com> Reported-by: kernel test robot <lkp@intel.com> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Link: https://lore.kernel.org/r/1666511085-2748-1-git-send-email-fengzheng923@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-21ASoC: sunxi: fix declaration compile errorZeng Heng1-1/+1
Just fix compile error without any logic changes. sound/soc/sunxi/sun50i-dmic.c:62:1: error: ‘static’ is not at beginning of declaration [-Werror=old-style-declaration] 62 | const static struct dmic_rate dmic_rate_s[] = { | ^~~~~ Signed-off-by: Zeng Heng <zengheng4@huawei.com> Link: https://lore.kernel.org/r/20220921033819.2188233-1-zengheng4@huawei.com Signed-off-by: Mark Brown <broonie@kernel.org>
2022-09-19ASoC: sunxi: Add Allwinner H6 Digital MIC driverBan Tao1-0/+406
The Allwinner H6 and later SoCs have an DMIC block which is capable of capture. Signed-off-by: Ban Tao <fengzheng923@gmail.com> Tested-by: Samuel Holland <samuel@sholland.org> Link: https://lore.kernel.org/r/1662965133-9232-1-git-send-email-fengzheng923@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>