From patchwork Mon Jun 5 04:41:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 9765483 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 8CCA660353 for ; Mon, 5 Jun 2017 04:41:47 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 801FC27DCD for ; Mon, 5 Jun 2017 04:41:47 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 74E2027FA5; Mon, 5 Jun 2017 04:41:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 157CE27DCD for ; Mon, 5 Jun 2017 04:41:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751306AbdFEElp (ORCPT ); Mon, 5 Jun 2017 00:41:45 -0400 Received: from mailout3.samsung.com ([203.254.224.33]:32924 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751309AbdFEElk (ORCPT ); Mon, 5 Jun 2017 00:41:40 -0400 Received: from epcas1p4.samsung.com (unknown [182.195.41.48]) by mailout3.samsung.com (KnoxPortal) with ESMTP id 20170605044138epoutp03dbdc765d015e13351d977843dcf64ad3~FIA6yMlsV1249612496epoutp03b; Mon, 5 Jun 2017 04:41:38 +0000 (GMT) Received: from epsmges1p4.samsung.com (unknown [182.195.40.69]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20170605044138epcas1p4b89a85f0c6f1bb3e5b8031d5e7db833f~FIA6U57-f2526325263epcas1p4V; Mon, 5 Jun 2017 04:41:38 +0000 (GMT) Received: from epcas1p3.samsung.com ( [182.195.41.47]) by epsmges1p4.samsung.com (Symantec Messaging Gateway) with SMTP id 36.55.12779.201E4395; Mon, 5 Jun 2017 13:41:38 +0900 (KST) Received: from epsmgms2p1.samsung.com (unknown [182.195.42.79]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20170605044137epcas1p4e618a41342719da1ba318627baff7098~FIA6E7liu1468614686epcas1p4Q; Mon, 5 Jun 2017 04:41:37 +0000 (GMT) X-AuditID: b6c32a38-f791a6d0000031eb-c9-5934e1021a2f Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p1.samsung.com (Symantec Messaging Gateway) with SMTP id 91.F1.02179.101E4395; Mon, 5 Jun 2017 13:41:37 +0900 (KST) Received: from localhost.localdomain ([10.113.62.216]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OR200A0S51CWR90@mmp1.samsung.com>; Mon, 05 Jun 2017 13:41:37 +0900 (KST) From: Jaehoon Chung To: linux-mmc@vger.kernel.org Cc: ulf.hansson@linaro.org, shawn.lin@rock-chips.com, Jaehoon Chung Subject: [PATCH 6/6] mmc: dw_mmc: remove the unnecessary slot variable Date: Mon, 05 Jun 2017 13:41:35 +0900 Message-id: <20170605044135.18304-7-jh80.chung@samsung.com> X-Mailer: git-send-email 2.10.2 In-reply-to: <20170605044135.18304-1-jh80.chung@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrNKsWRmVeSWpSXmKPExsWy7bCmvi7TQ5NIgyN/OSxu/GpjtTjyv5/R 4s6T9awWx9eGO7B43Lm2h83j76z9LB59W1YxenzeJBfAEpVqk5GamJJapJCal5yfkpmXbqvk HRzvHG9qZmCoa2hpYa6kkJeYm2qr5OIToOuWmQO0UUmhLD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AicTqBYZdjJxAppjEhXvr2boYuTiEBLYxSuxufs0K4fxglPgw5zkTSBWbgI7E 9m/HwWwRAVmJn38usIHYzAJxEouO/mQHsYUF3CTenDsFZrMIqEqcnHGcBcTmFbCW+Hp0HTPE NnmJheePgM3hFLCRWH33EZgtBFRzpb2JaQIj7wJGhlWMXKkFxbnpucVGBYabGIHBuO2wlv8O xh9now8xCnAwKvHwSmSaRAqxJpYVV+YeYpTgYFYS4S2+DhTiTUmsrEotyo8vKs1JLT7EaAp0 ykRmKdHkfGCk5JXEG5pYGpkYmJkZGhkYmymJ804I/BIhJJCeWJKanZpakFoE08fEwSnVwKgd wmYV51TG9PXXA6m7UjfuLxULkV2we9nqBa0phgkTn8p82ZCcemLObu493vv/MkQ6qv9Nsvnk wF6z6evKbw8ilxdLx3sVXDNpt9uUZuactHD1gsaTjSyt/kV6z7IX83HUG++UShaR/5jiFxx2 eFLT5/WJ5h1vvcuqGBSn7+H1Xy7Qc+BKohJLcUaioRZzUXEiAJ1loq1cAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170605044137epcas1p4e618a41342719da1ba318627baff7098 X-Msg-Generator: CA X-Sender-IP: 182.195.42.79 X-Local-Sender: =?UTF-8?B?7KCV7J6s7ZuIG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?SmFlaG9vbiBDaHVuZxtUaXplbiBQbGF0Zm9ybSBMYWIuG1Nh?= =?UTF-8?B?bXN1bmcgRWxlY3Ryb25pY3MbU2VuaW9yIEVuZ2luZWVy?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 101P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170605044137epcas1p4e618a41342719da1ba318627baff7098 X-RootMTR: 20170605044137epcas1p4e618a41342719da1ba318627baff7098 References: <20170605044135.18304-1-jh80.chung@samsung.com> Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Remove the unnecessary slot variable. Signed-off-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 97a8b0c..a9dfb26 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -2995,17 +2995,15 @@ static void dw_mci_enable_cd(struct dw_mci *host) { unsigned long irqflags; u32 temp; - struct dw_mci_slot *slot; /* * No need for CD if all slots have a non-error GPIO * as well as broken card detection is found. */ - slot = host->slot; - if (slot->mmc->caps & MMC_CAP_NEEDS_POLL) + if (host->slot->mmc->caps & MMC_CAP_NEEDS_POLL) return; - if (mmc_gpio_get_cd(slot->mmc) < 0) { + if (mmc_gpio_get_cd(host->slot->mmc) < 0) { spin_lock_irqsave(&host->irq_lock, irqflags); temp = mci_readl(host, INTMASK); temp |= SDMMC_INT_CD; @@ -3273,7 +3271,6 @@ int dw_mci_runtime_resume(struct device *dev) { int ret = 0; struct dw_mci *host = dev_get_drvdata(dev); - struct dw_mci_slot *slot = host->slot; if (host->slot && (mmc_can_gpio_cd(host->slot->mmc) || @@ -3313,11 +3310,11 @@ int dw_mci_runtime_resume(struct device *dev) mci_writel(host, CTRL, SDMMC_CTRL_INT_ENABLE); - if (slot->mmc->pm_flags & MMC_PM_KEEP_POWER) - dw_mci_set_ios(slot->mmc, &slot->mmc->ios); + if (host->slot->mmc->pm_flags & MMC_PM_KEEP_POWER) + dw_mci_set_ios(host->slot->mmc, &host->slot->mmc->ios); /* Force setup bus to guarantee available clock output */ - dw_mci_setup_bus(slot, true); + dw_mci_setup_bus(host->slot, true); /* Now that slots are all setup, we can enable card detect */ dw_mci_enable_cd(host);