From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758451AbbFBKjJ (ORCPT ); Tue, 2 Jun 2015 06:39:09 -0400 Received: from mx0a-0016f401.pphosted.com ([67.231.148.174]:44591 "EHLO mx0a-0016f401.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751772AbbFBKjD (ORCPT ); Tue, 2 Jun 2015 06:39:03 -0400 From: Jisheng Zhang To: CC: , , , Jisheng Zhang Subject: [PATCH] mmc: sdhci-pxav3: fix device wakeup initialization Date: Tue, 2 Jun 2015 18:38:35 +0800 Message-ID: <1433241515-2093-1-git-send-email-jszhang@marvell.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.14.151,1.0.33,0.0.0000 definitions=2015-06-02_11:2015-06-02,2015-06-02,1970-01-01 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1506020146 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org MMC_PM_KEEP_POWER doesn't imply MMC_PM_WAKE_SDIO_IRQ, we should only enable device wake up when MMC_PM_WAKE_SDIO_IRQ is set. And "pm_flags" is the requested pm features, we should not set it in the host driver. At the same time, device wakeup is disabled by default, so there's no need to disable device wakeup explicitly. This patch fixes the warning as following: [ 64.616651] ------------[ cut here ]------------ [ 64.616665] WARNING: CPU: 0 PID: 79 at linux/kernel/irq/manage.c:603 irq_set_irq_wake+0xf0/0x11c() [ 64.616667] Unbalanced IRQ 87 wake disable Signed-off-by: Jisheng Zhang --- drivers/mmc/host/sdhci-pxav3.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/mmc/host/sdhci-pxav3.c b/drivers/mmc/host/sdhci-pxav3.c index 01cb2d3..9cd5fc6 100644 --- a/drivers/mmc/host/sdhci-pxav3.c +++ b/drivers/mmc/host/sdhci-pxav3.c @@ -457,12 +457,8 @@ static int sdhci_pxav3_probe(struct platform_device *pdev) platform_set_drvdata(pdev, host); - if (host->mmc->pm_caps & MMC_PM_KEEP_POWER) { + if (host->mmc->pm_caps & MMC_PM_WAKE_SDIO_IRQ) device_init_wakeup(&pdev->dev, 1); - host->mmc->pm_flags |= MMC_PM_WAKE_SDIO_IRQ; - } else { - device_init_wakeup(&pdev->dev, 0); - } pm_runtime_put_autosuspend(&pdev->dev); -- 2.1.4