diff mbox series

mmc: mtk-sd: call device_init_wakeup(&pdev->dev, false) on the error path of .probe()

Message ID 20241128075137.2958211-1-joe@pf.is.s.u-tokyo.ac.jp
State New
Headers show
Series mmc: mtk-sd: call device_init_wakeup(&pdev->dev, false) on the error path of .probe() | expand

Commit Message

Joe Hattori Nov. 28, 2024, 7:51 a.m. UTC
Current implementation leaves pdev->dev as a wakeup source. Add a
device_init_wakeup(&pdev->dev, false) call in the error path of the
.probe() function.

Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Fixes: 527f36f5efa4 ("mmc: mediatek: add support for SDIO eint wakup IRQ")
---
 drivers/mmc/host/mtk-sd.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ulf Hansson Dec. 2, 2024, 2:57 p.m. UTC | #1
On Thu, 28 Nov 2024 at 08:51, Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp> wrote:
>
> Current implementation leaves pdev->dev as a wakeup source. Add a
> device_init_wakeup(&pdev->dev, false) call in the error path of the
> .probe() function.
>
> Signed-off-by: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
> Fixes: 527f36f5efa4 ("mmc: mediatek: add support for SDIO eint wakup IRQ")
> ---
>  drivers/mmc/host/mtk-sd.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index efb0d2d5716b..9c3cef4cf47e 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -3070,6 +3070,7 @@ static int msdc_drv_probe(struct platform_device *pdev)
>         msdc_gate_clock(host);
>         platform_set_drvdata(pdev, NULL);
>  release_mem:
> +       device_init_wakeup(&pdev->dev, false);

This seems to be needed in the ->remove() function too. Right?

>         if (host->dma.gpd)
>                 dma_free_coherent(&pdev->dev,
>                         2 * sizeof(struct mt_gpdma_desc),
> --
> 2.34.1
>

Kind regards
Uffe
diff mbox series

Patch

diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index efb0d2d5716b..9c3cef4cf47e 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -3070,6 +3070,7 @@  static int msdc_drv_probe(struct platform_device *pdev)
 	msdc_gate_clock(host);
 	platform_set_drvdata(pdev, NULL);
 release_mem:
+	device_init_wakeup(&pdev->dev, false);
 	if (host->dma.gpd)
 		dma_free_coherent(&pdev->dev,
 			2 * sizeof(struct mt_gpdma_desc),