From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752703AbbADPTE (ORCPT ); Sun, 4 Jan 2015 10:19:04 -0500 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]:5328 "EHLO mx0b-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752647AbbADPTB (ORCPT ); Sun, 4 Jan 2015 10:19:01 -0500 From: Jisheng Zhang To: , CC: , , , , Jisheng Zhang Subject: [PATCH next 2/2] mmc: sdhci-pxav3: fix pm unbalanced issue in -> remove() Date: Sun, 4 Jan 2015 23:15:48 +0800 Message-ID: <1420384548-7816-3-git-send-email-jszhang@marvell.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1420384548-7816-1-git-send-email-jszhang@marvell.com> References: <1420384548-7816-1-git-send-email-jszhang@marvell.com> MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.13.68,1.0.33,0.0.0000 definitions=2015-01-04_03:2015-01-02,2015-01-04,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1501040160 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch calls pm_runtime_put_noidle() to restore the device's usage counter in the ->remove() implementation. Signed-off-by: Jisheng Zhang --- drivers/mmc/host/sdhci-pxav3.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index 1255dd2..4de39fb 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -412,8 +412,10 @@ static int sdhci_pxav3_remove(struct platform_device *pdev) struct sdhci_pxa *pxa = pltfm_host->priv; pm_runtime_get_sync(&pdev->dev); - sdhci_remove_host(host, 1); pm_runtime_disable(&pdev->dev); + pm_runtime_put_noidle(&pdev->dev); + + sdhci_remove_host(host, 1); clk_disable_unprepare(pxa->clk_io); if (!IS_ERR(pxa->clk_core)) -- 2.1.4