Commit 0cb846ca authored by Tony Lindgren's avatar Tony Lindgren Committed by sanglipeng
Browse files

phy: mapphone-mdm6600: Fix runtime PM for remove

stable inclusion
from stable-v5.10.199
commit e9c20d3078ccf2399fe80291fcf1e39d0b665538
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I9AWJ5

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=e9c20d3078ccf2399fe80291fcf1e39d0b665538



--------------------------------

[ Upstream commit b99e0ba9 ]

Otherwise we will get an underflow on remove.

Cc: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
Cc: Merlijn Wajer <merlijn@wizzup.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Sebastian Reichel <sre@kernel.org>
Fixes: f7f50b2a ("phy: mapphone-mdm6600: Add runtime PM support for n_gsm on USB suspend")
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Link: https://lore.kernel.org/r/20230913060433.48373-2-tony@atomide.com


Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent bcf1531d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -641,6 +641,7 @@ static int 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);