[PATCH v2 2/3] phy: mapphone-mdm6600: Fix runtime PM for remove

Sebastian Reichel sebastian.reichel at collabora.com
Wed Sep 13 07:09:38 PDT 2023


Hi,

On Wed, Sep 13, 2023 at 09:04:28AM +0300, Tony Lindgren wrote:
> Otherwise we will get an underflow on remove.
> 
> Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75 at gmail.com>
> Cc: Merlijn Wajer <merlijn at wizzup.org>
> Cc: Pavel Machek <pavel at ucw.cz>
> Cc: Sebastian Reichel <sre at kernel.org>
> Fixes: f7f50b2a7b05 ("phy: mapphone-mdm6600: Add runtime PM support for n_gsm on USB suspend")
> Signed-off-by: Tony Lindgren <tony at atomide.com>
> ---

Reviewed-by: Sebastian Reichel <sebastian.reichel at collabora.com>

-- Sebastian

> 
> Changes since v1:
> 
> - Using pm_runtime_get_noresume() is enough on remove as suggested by
>   Sebastian
> 
> ---
>  drivers/phy/motorola/phy-mapphone-mdm6600.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/phy/motorola/phy-mapphone-mdm6600.c b/drivers/phy/motorola/phy-mapphone-mdm6600.c
> --- a/drivers/phy/motorola/phy-mapphone-mdm6600.c
> +++ b/drivers/phy/motorola/phy-mapphone-mdm6600.c
> @@ -641,6 +641,7 @@ static void phy_mdm6600_remove(struct platform_device *pdev)
>  	struct phy_mdm6600 *ddata = platform_get_drvdata(pdev);
>  	struct gpio_desc *reset_gpio = ddata->ctrl_gpios[PHY_MDM6600_RESET];
>  
> +	pm_runtime_get_noresume(ddata->dev);
>  	pm_runtime_dont_use_autosuspend(ddata->dev);
>  	pm_runtime_put_sync(ddata->dev);
>  	pm_runtime_disable(ddata->dev);
> -- 
> 2.42.0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-phy/attachments/20230913/b98d608b/attachment.sig>


More information about the linux-phy mailing list