From patchwork Tue Jan 28 08:24:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jaehoon Chung X-Patchwork-Id: 3545621 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 E7AA09F381 for ; Tue, 28 Jan 2014 08:24:30 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CD7CC20138 for ; Tue, 28 Jan 2014 08:24:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B3C9F2015B for ; Tue, 28 Jan 2014 08:24:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754595AbaA1IY1 (ORCPT ); Tue, 28 Jan 2014 03:24:27 -0500 Received: from mailout3.samsung.com ([203.254.224.33]:48734 "EHLO mailout3.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754321AbaA1IYZ (ORCPT ); Tue, 28 Jan 2014 03:24:25 -0500 Received: from epcpsbgr1.samsung.com (u141.gpu120.samsung.co.kr [203.254.230.141]) by mailout3.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N03000PPRCOLH80@mailout3.samsung.com> for linux-mmc@vger.kernel.org; Tue, 28 Jan 2014 17:24:24 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.115]) by epcpsbgr1.samsung.com (EPCPMTA) with SMTP id EF.3F.12635.83967E25; Tue, 28 Jan 2014 17:24:24 +0900 (KST) X-AuditID: cbfee68d-b7fcd6d00000315b-44-52e7693897c4 Received: from epmmp2 ( [203.254.227.17]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 29.8E.28157.83967E25; Tue, 28 Jan 2014 17:24:24 +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 <0N03001IBRCOC700@mmp2.samsung.com>; Tue, 28 Jan 2014 17:24:24 +0900 (KST) Message-id: <52E76957.50306@samsung.com> Date: Tue, 28 Jan 2014 17:24:55 +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 v2 4/8] mmc: dw_mmc: remove unused member variable. Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgkeLIzCtJLcpLzFFi42JZI2JSrGuR+TzI4O9pHYsJl7czWhz5389o 8eH+RWYHZo8brxYyefRtWcXo8XmTXABzFJdNSmpOZllqkb5dAlfGs0sfWAq2KFWs+P2XqYGx TaaLkZNDQsBE4sTpN+wQtpjEhXvr2boYuTiEBJYySrxeuoMRpuj+8TvsEInpjBLHtzUwQjiv GSU2bT7FAlLFK6Ahsf/hMjCbRUBVYmHfDLCxbAI6Etu/HWcCsUUFwiSmnrgKVS8o8WPyPSCb g0NEwFqi+bcsSJhZwF1iysdbYK3CAs4S85cuYYeI60jsb53GBmHLS2xe85YZ5AYJgXZ2icbT XewQewUkvk0+BDZTQkBWYtMBZogHJCUOrrjBMoFRZBaSzbOQjJ2FZOwCRuZVjKKpBckFxUnp RYZ6xYm5xaV56XrJ+bmbGIGxcPrfs94djLcPWB9iTAZaOZFZSjQ5HxhLeSXxhsZmRhamJqbG RuaWZqQJK4nzJj1MChISSE8sSc1OTS1ILYovKs1JLT7EyMTBKdXAmHj58DJOxQvPzn578PNB q5PrjdkNueaXWatX2l+qe8f0jlPo7rOl3nmB2mrdAhJmL/WXKGQwLZtQ6uF8Q6MnY5uyS1dA deu1ErkQpfjQcJ/9C+9IZeR8KDwWtPuSUK3+1SWHTI0mxa728f1ifatGSfHUme+7j+67f7Nq JhNXT1XC5K8P//OvUWIpzkg01GIuKk4EAPmIcgWbAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrKIsWRmVeSWpSXmKPExsVy+t9jQV2LzOdBBgfmqFhMuLyd0eLI/35G iw/3LzI7MHvceLWQyaNvyypGj8+b5AKYoxoYbTJSE1NSixRS85LzUzLz0m2VvIPjneNNzQwM dQ0tLcyVFPISc1NtlVx8AnTdMnOANikplCXmlAKFAhKLi5X07TBNCA1x07WAaYzQ9Q0Jgusx MkADCWsYM55d+sBSsEWpYsXvv0wNjG0yXYycHBICJhL3j99hh7DFJC7cW8/WxcjFISQwnVHi +LYGRgjnNaPEps2nWECqeAU0JPY/XAZmswioSizsmwHWzSagI7H923EmEFtUIExi6omrUPWC Ej8m3wOyOThEBKwlmn/LgoSZBdwlpny8BdYqLOAsMX/pEnaIuI7E/tZpbBC2vMTmNW+ZJzDy zUIyaRaSsllIyhYwMq9iFE0tSC4oTkrPNdIrTswtLs1L10vOz93ECI60Z9I7GFc1WBxiFOBg VOLhbUx+HiTEmlhWXJl7iFGCg1lJhPfslGdBQrwpiZVVqUX58UWlOanFhxiTgR6dyCwlmpwP TAJ5JfGGxiZmRpZG5oYWRsbmpAkrifMebLUOFBJITyxJzU5NLUgtgtnCxMEp1cDIYbhr06xu q60m7DLGBhoXOpStspyfKmkqSXg2/BSIvGhgVfr7q+9Oibxaxs7sm0WXyjY6f199pUTqfq3A 5c9/HSY8/77sn3QRx5FP10TvtGxwMnNTPnu0SOFgqpxrz9ujNXXbAuZpTGE58/HWF4NbLmuO 8ZlZii0Mzb/gMnP73r672n4R0yYosRRnJBpqMRcVJwIAr6GxPvgCAAA= 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.4 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 --- Changelog V2: - None 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 ead2998..fed82da 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;