[PATCH 2/3] phy: mapphone-mdm6600: Fix runtime PM for remove
Sebastian Reichel
sebastian.reichel at collabora.com
Tue Sep 12 08:00:22 PDT 2023
Hi,
On Mon, Sep 11, 2023 at 06:54:56AM +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>
> ---
> drivers/phy/motorola/phy-mapphone-mdm6600.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> 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
> @@ -640,6 +640,11 @@ 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];
> + int error;
> +
> + error = pm_runtime_resume_and_get(ddata->dev);
> + if (error)
> + return;
Isn't this just about the use counters, i.e.
pm_runtime_get_noresume(); should be enough?
-- Sebastian
> pm_runtime_dont_use_autosuspend(ddata->dev);
> pm_runtime_put_sync(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/20230912/49734fa0/attachment.sig>
More information about the linux-phy
mailing list