Thread (1 message) flat view 1 message, 1 author, 2020-08-17

Re: [PATCH v4 1/2] ASoC: mediatek: mt6359: add codec driver

From: Tzung-Bi Shih <hidden>
Date: 2020-08-17 05:22:07
Also in: alsa-devel, linux-mediatek, lkml

On Sun, Aug 16, 2020 at 1:20 AM Jiaxin Yu [off-list ref] wrote:
+static int mt6359_platform_driver_probe(struct platform_device *pdev)
[snip]
+
+       return devm_snd_soc_register_component(&pdev->dev,
+                                              &mt6359_soc_component_driver,
+                                              mt6359_dai_driver,
+                                              ARRAY_SIZE(mt6359_dai_driver));
+}
+
+static int mt6359_platform_driver_remove(struct platform_device *pdev)
+{
+       struct mt6359_priv *priv = dev_get_drvdata(&pdev->dev);
+       int ret;
+
+       dev_dbg(&pdev->dev, "%s(), dev name %s\n",
+               __func__, dev_name(&pdev->dev));
+
+       ret = regulator_disable(priv->avdd_reg);
+       if (ret) {
+               dev_err(&pdev->dev, "%s(), failed to disable regulator!\n",
+                       __func__);
+               return ret;
+       }
+
+       snd_soc_unregister_component(&pdev->dev);
You don't need to unregister the component which is already delegated to devm.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help