* [PATCH] ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable
@ 2024-10-25 8:00 Tang Bin
2024-11-10 12:10 ` Markus Elfring
2024-12-02 17:58 ` Mark Brown
0 siblings, 2 replies; 4+ messages in thread
From: Tang Bin @ 2024-10-25 8:00 UTC (permalink / raw)
To: lgirdwood, broonie, perex, tiwai, matthias.bgg,
angelogioacchino.delregno
Cc: linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek, Tang Bin
Simplify the function mt8192_afe_pcm_dev_probe() by
using local 'dev' instead of '&pdev->dev'.
Signed-off-by: Tang Bin <tangbin@cmss.chinamobile.com>
---
sound/soc/mediatek/mt8192/mt8192-afe-pcm.c | 19 +++++++++----------
1 file changed, 9 insertions(+), 10 deletions(-)
diff --git a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
index 9b502f4cd..80cda7bf5 100644
--- a/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
+++ b/sound/soc/mediatek/mt8192/mt8192-afe-pcm.c
@@ -2158,27 +2158,26 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
{
struct mtk_base_afe *afe;
struct mt8192_afe_private *afe_priv;
- struct device *dev;
+ struct device *dev = &pdev->dev;
struct reset_control *rstc;
int i, ret, irq_id;
- ret = dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(34));
+ ret = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(34));
if (ret)
return ret;
- afe = devm_kzalloc(&pdev->dev, sizeof(*afe), GFP_KERNEL);
+ afe = devm_kzalloc(dev, sizeof(*afe), GFP_KERNEL);
if (!afe)
return -ENOMEM;
platform_set_drvdata(pdev, afe);
- afe->platform_priv = devm_kzalloc(&pdev->dev, sizeof(*afe_priv),
+ afe->platform_priv = devm_kzalloc(dev, sizeof(*afe_priv),
GFP_KERNEL);
if (!afe->platform_priv)
return -ENOMEM;
afe_priv = afe->platform_priv;
- afe->dev = &pdev->dev;
- dev = afe->dev;
+ afe->dev = dev;
/* init audio related clock */
ret = mt8192_init_clock(afe);
@@ -2196,7 +2195,7 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
if (ret)
return dev_err_probe(dev, ret, "failed to trigger audio reset\n");
- ret = devm_pm_runtime_enable(&pdev->dev);
+ ret = devm_pm_runtime_enable(dev);
if (ret)
return ret;
@@ -2212,13 +2211,13 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
/* enable clock for regcache get default value from hw */
afe_priv->pm_runtime_bypass_reg_ctl = true;
- pm_runtime_get_sync(&pdev->dev);
+ pm_runtime_get_sync(dev);
ret = regmap_reinit_cache(afe->regmap, &mt8192_afe_regmap_config);
if (ret)
return dev_err_probe(dev, ret, "regmap_reinit_cache fail\n");
- pm_runtime_put_sync(&pdev->dev);
+ pm_runtime_put_sync(dev);
afe_priv->pm_runtime_bypass_reg_ctl = false;
regcache_cache_only(afe->regmap, true);
@@ -2285,7 +2284,7 @@ static int mt8192_afe_pcm_dev_probe(struct platform_device *pdev)
afe->runtime_suspend = mt8192_afe_runtime_suspend;
/* register platform */
- ret = devm_snd_soc_register_component(&pdev->dev,
+ ret = devm_snd_soc_register_component(dev,
&mtk_afe_pcm_platform,
afe->dai_drivers,
afe->num_dai_drivers);
--
2.33.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable
2024-10-25 8:00 [PATCH] ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable Tang Bin
@ 2024-11-10 12:10 ` Markus Elfring
2024-11-11 12:59 ` Mark Brown
2024-12-02 17:58 ` Mark Brown
1 sibling, 1 reply; 4+ messages in thread
From: Markus Elfring @ 2024-11-10 12:10 UTC (permalink / raw)
To: Tang Bin, linux-mediatek, linux-arm-kernel, linux-sound,
Angelo Gioacchino Del Regno, Jaroslav Kysela, Liam Girdwood,
Mark Brown, Matthias Brugger, Takashi Iwai
Cc: LKML
> Simplify the function mt8192_afe_pcm_dev_probe() by
> using local 'dev' instead of '&pdev->dev'.
You may occasionally put more than 51 characters into text lines
for an improved change description.
Regards,
Markus
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable
2024-11-10 12:10 ` Markus Elfring
@ 2024-11-11 12:59 ` Mark Brown
0 siblings, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-11-11 12:59 UTC (permalink / raw)
To: Markus Elfring
Cc: Tang Bin, linux-mediatek, linux-arm-kernel, linux-sound,
Angelo Gioacchino Del Regno, Jaroslav Kysela, Liam Girdwood,
Matthias Brugger, Takashi Iwai, LKML
[-- Attachment #1: Type: text/plain, Size: 424 bytes --]
On Sun, Nov 10, 2024 at 01:10:21PM +0100, Markus Elfring wrote:
> > Simplify the function mt8192_afe_pcm_dev_probe() by
> > using local 'dev' instead of '&pdev->dev'.
>
> You may occasionally put more than 51 characters into text lines
> for an improved change description.
Feel free to ignore Markus, he has a long history of sending
unhelpful review comments and continues to ignore repeated requests
to stop.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable
2024-10-25 8:00 [PATCH] ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable Tang Bin
2024-11-10 12:10 ` Markus Elfring
@ 2024-12-02 17:58 ` Mark Brown
1 sibling, 0 replies; 4+ messages in thread
From: Mark Brown @ 2024-12-02 17:58 UTC (permalink / raw)
To: lgirdwood, perex, tiwai, matthias.bgg, angelogioacchino.delregno,
Tang Bin
Cc: linux-sound, linux-kernel, linux-arm-kernel, linux-mediatek
On Fri, 25 Oct 2024 16:00:26 +0800, Tang Bin wrote:
> Simplify the function mt8192_afe_pcm_dev_probe() by
> using local 'dev' instead of '&pdev->dev'.
>
>
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable
commit: 01981565c764c554cc96e2d30a71c42975171416
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-12-02 17:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-25 8:00 [PATCH] ASoC: mediatek: mt8192-afe-pcm: Simplify probe() with local dev variable Tang Bin
2024-11-10 12:10 ` Markus Elfring
2024-11-11 12:59 ` Mark Brown
2024-12-02 17:58 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®