[PATCH 2/3] phy: mapphone-mdm6600: Fix runtime PM for remove
Tony Lindgren
tony at atomide.com
Sun Sep 10 20:54:56 PDT 2023
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;
pm_runtime_dont_use_autosuspend(ddata->dev);
pm_runtime_put_sync(ddata->dev);
--
2.42.0
More information about the linux-phy
mailing list