From patchwork Tue Jan 21 10:16:57 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 3516181 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 94EF69F2E9 for ; Tue, 21 Jan 2014 10:16:40 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7AF242010E for ; Tue, 21 Jan 2014 10:16:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 355512015A for ; Tue, 21 Jan 2014 10:16:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754203AbaAUKQf (ORCPT ); Tue, 21 Jan 2014 05:16:35 -0500 Received: from mailout1.samsung.com ([203.254.224.24]:60294 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754122AbaAUKQd (ORCPT ); Tue, 21 Jan 2014 05:16:33 -0500 Received: from epcpsbgr2.samsung.com (u142.gpu120.samsung.co.kr [203.254.230.142]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MZQ00EH8XVL3J00@mailout1.samsung.com> for linux-mmc@vger.kernel.org; Tue, 21 Jan 2014 19:16:33 +0900 (KST) Received: from epcpsbgm1.samsung.com ( [172.20.52.114]) by epcpsbgr2.samsung.com (EPCPMTA) with SMTP id 26.B3.09028.1094ED25; Tue, 21 Jan 2014 19:16:33 +0900 (KST) X-AuditID: cbfee68e-b7f566d000002344-6e-52de49012d42 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm1.samsung.com (EPCPMTA) with SMTP id 20.83.29263.1094ED25; Tue, 21 Jan 2014 19:16:33 +0900 (KST) Received: from [10.252.81.186] by mmp2.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0MZQ00JXZXVKKD10@mmp2.samsung.com>; Tue, 21 Jan 2014 19:16:32 +0900 (KST) Message-id: <52DE4919.8080101@samsung.com> Date: Tue, 21 Jan 2014 19:16:57 +0900 From: Jaehoon Chung User-Agent: Mozilla/5.0 (X11; Linux i686; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-version: 1.0 To: "linux-mmc@vger.kernel.org" Cc: Chris Ball , Seungwon Jeon Subject: [PATCH 4/7] mmc: dw_mmc: remove unused member variable. Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmphkeLIzCtJLcpLzFFi42JZI2JSpMvoeS/IYMIqfosJl7czWhz5389o 8eH+RWYHZo8brxYyefRtWcXo8XmTXABzFJdNSmpOZllqkb5dAlfG3dW3mApmKFX8/r+ZpYHx q3QXIyeHhICJxP1NLSwQtpjEhXvr2UBsIYGljBL/npvD1PxsmcXexcgFFJ/OKPF851RWCOc1 o8T8d2eZuhg5OHgFtCQONoWAmCwCqhKnvpaD9LIJ6Ehs/3acCcQWFQiTmHriKtguXgFBiR+T 77GAlIsIWEs0/5YFCTMLuEtM+XiLHcQWFnCQOHV0GztEXEdif+s0NghbXmLzmrfMEKd1s0ts OhwIYrMICEh8m3wIbKSEgKzEpgNQJZISB1fcYJnAKDILyeJZSKbOQjJ1ASPzKkbR1ILkguKk 9CIjveLE3OLSvHS95PzcTYzAGDj971nfDsabB6wPMSYDrZzILCWanA+MobySeENjMyMLUxNT YyNzSzPShJXEeRc9TAoSEkhPLEnNTk0tSC2KLyrNSS0+xMjEwSnVwLhmLZ/ckdrOoNNPXDX7 jZ+HZc7i7O2JWlTqOzdhTnOv4tJX+94L8R/5VSeU5bikL0KLr+rjrC15okqWifmPLP55Py2M EXo8/dCvnICpTcybzI5Fr1EJecrG+LvK5NCj4ufyh/WCGy1X3d+4x6hm0VzZ6usLX2apBkXe 1vgmxv/+aiX//vYjdkosxRmJhlrMRcWJAFj1onCXAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrMIsWRmVeSWpSXmKPExsVy+t9jQV1Gz3tBBmdusltMuLyd0eLI/35G iw/3LzI7MHvceLWQyaNvyypGj8+b5AKYoxoYbTJSE1NSixRS85LzUzLz0m2VvIPjneNNzQwM dQ0tLcyVFPISc1NtlVx8AnTdMnOANikplCXmlAKFAhKLi5X07TBNCA1x07WAaYzQ9Q0Jgusx MkADCWsYM+6uvsVUMEOp4vf/zSwNjF+luxg5OSQETCR+tsxih7DFJC7cW8/WxcjFISQwnVHi +c6prBDOa0aJ+e/OMnUxcnDwCmhJHGwKATFZBFQlTn0tB+llE9CR2P7tOBOILSoQJjH1xFUW EJtXQFDix+R7LCDlIgLWEs2/ZUHCzALuElM+3gJbKyzgIHHq6DZ2iLiOxP7WaWwQtrzE5jVv mScw8s1CMmkWkrJZSMoWMDKvYhRNLUguKE5KzzXUK07MLS7NS9dLzs/dxAiOsmdSOxhXNlgc YhTgYFTi4a3ceDdIiDWxrLgy9xCjBAezkgjvMcd7QUK8KYmVValF+fFFpTmpxYcYk4H+nMgs JZqcD0wAeSXxhsYmZkaWRuaGFkbG5qQJK4nzHmi1DhQSSE8sSc1OTS1ILYLZwsTBKdXAeOR8 9Iash9FPNFVfZaz/wi26udlLO1z3ZcizrXLivZpNCXdVY3p/3skLs/kt3TrZmXGWjHd4WNmn k2Ih546nFX+xNLdM+yfByMf+cKd7QWuG6XXlSX5bLjQGT2D4E2Gdv9R7rsCmkuYwjn3rVoQc kvOJFb29TO3CXZuMT0zJ9u8aeF8qt81XYinOSDTUYi4qTgQAWH5NwfYCAAA= DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Since using the device-tree, didn't use the callback pointer. So removed the unused callback pointer. Signed-off-by: Jaehoon Chung --- drivers/mmc/host/dw_mmc.c | 33 +++------------------------------ include/linux/mmc/dw_mmc.h | 14 -------------- 2 files changed, 3 insertions(+), 44 deletions(-) diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index 3970fc3..9bac3ed 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -850,8 +850,6 @@ static void __dw_mci_start_request(struct dw_mci *host, u32 cmdflags; mrq = slot->mrq; - if (host->pdata->select_slot) - host->pdata->select_slot(slot->id); host->cur_slot = slot; host->mrq = mrq; @@ -985,17 +983,11 @@ static void dw_mci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) switch (ios->power_mode) { case MMC_POWER_UP: set_bit(DW_MMC_CARD_NEED_INIT, &slot->flags); - /* Power up slot */ - if (slot->host->pdata->setpower) - slot->host->pdata->setpower(slot->id, mmc->ocr_avail); regs = mci_readl(slot->host, PWREN); regs |= (1 << slot->id); mci_writel(slot->host, PWREN, regs); break; case MMC_POWER_OFF: - /* Power down slot */ - if (slot->host->pdata->setpower) - slot->host->pdata->setpower(slot->id, 0); regs = mci_readl(slot->host, PWREN); regs &= ~(1 << slot->id); mci_writel(slot->host, PWREN, regs); @@ -1009,13 +1001,10 @@ static int dw_mci_get_ro(struct mmc_host *mmc) { int read_only; struct dw_mci_slot *slot = mmc_priv(mmc); - struct dw_mci_board *brd = slot->host->pdata; /* Use platform get_ro function, else try on board write protect */ if (slot->quirks & DW_MCI_SLOT_QUIRK_NO_WRITE_PROTECT) read_only = 0; - else if (brd->get_ro) - read_only = brd->get_ro(slot->id); else if (gpio_is_valid(slot->wp_gpio)) read_only = gpio_get_value(slot->wp_gpio); else @@ -1039,8 +1028,6 @@ static int dw_mci_get_cd(struct mmc_host *mmc) /* Use platform get_cd function, else try onboard card detect */ if (brd->quirks & DW_MCI_QUIRK_BROKEN_CARD_DETECTION) present = 1; - else if (brd->get_cd) - present = !brd->get_cd(slot->id); else if (!IS_ERR_VALUE(gpio_cd)) present = gpio_cd; else @@ -2138,17 +2125,7 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id) mmc->f_max = freq[1]; } - if (host->pdata->get_ocr) - mmc->ocr_avail = host->pdata->get_ocr(id); - else - mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; - - /* - * Start with slot power disabled, it will be enabled when a card - * is detected. - */ - if (host->pdata->setpower) - host->pdata->setpower(id, 0); + mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34; if (host->pdata->caps) mmc->caps = host->pdata->caps; @@ -2217,10 +2194,6 @@ err_setup_bus: static void dw_mci_cleanup_slot(struct dw_mci_slot *slot, unsigned int id) { - /* Shutdown detect IRQ */ - if (slot->host->pdata->exit) - slot->host->pdata->exit(id); - /* Debugfs stuff is cleaned up by mmc core */ mmc_remove_host(slot->mmc); slot->host->slot[id] = NULL; @@ -2395,9 +2368,9 @@ int dw_mci_probe(struct dw_mci *host) } } - if (!host->pdata->select_slot && host->pdata->num_slots > 1) { + if (host->pdata->num_slots > 1) { dev_err(host->dev, - "Platform data must supply select_slot function\n"); + "Platform data must supply num_slots.\n"); return -ENODEV; } diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 6ce7d2c..babaea9 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h @@ -248,20 +248,6 @@ struct dw_mci_board { /* delay in mS before detecting cards after interrupt */ u32 detect_delay_ms; - int (*init)(u32 slot_id, irq_handler_t , void *); - int (*get_ro)(u32 slot_id); - int (*get_cd)(u32 slot_id); - int (*get_ocr)(u32 slot_id); - int (*get_bus_wd)(u32 slot_id); - /* - * Enable power to selected slot and set voltage to desired level. - * Voltage levels are specified using MMC_VDD_xxx defines defined - * in linux/mmc/host.h file. - */ - void (*setpower)(u32 slot_id, u32 volt); - void (*exit)(u32 slot_id); - void (*select_slot)(u32 slot_id); - struct dw_mci_dma_ops *dma_ops; struct dma_pdata *data; struct block_settings *blk_settings;