From patchwork Tue Nov 7 08:09:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Masahiro Yamada X-Patchwork-Id: 118121 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp3686587qgn; Tue, 7 Nov 2017 00:12:01 -0800 (PST) X-Google-Smtp-Source: ABhQp+SiQRjRenUbkxa8qVzqp+B6ecEVR1e11WDBOoMOTMH1gvXu81Ez7UdMJX8EF6UeaK1QOhJd X-Received: by 10.84.149.197 with SMTP id a5mr17644451plh.231.1510042321785; Tue, 07 Nov 2017 00:12:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510042321; cv=none; d=google.com; s=arc-20160816; b=pHR+c3gTvasQD+wg8dF0hicG2o4Yp1lhH/55vQgVKjmfWHZ/svdIZtsv70MNaZMtwc x2U/vkD09sDu48Y5+Kv7ykhuMOArUrFeLzwVk5vFVblw8yR6DVoSFZLDpzmR3CcxOBuU tEesQeEW/Fnfl0PPF9lCOP+0b57qQKncl4gYOhNOy1jHLdyiR6DR7vLVD0Yto0DLK6PD qHQmPLIjG1I0W/dWE7WxwMsTYdWmOAViEy6ztRTS03u2rZPdNEnZDEmKcDs0dLkTtPs1 jvUuLnJDGKH4rsUCh4TjG0d/E7ILgjvsvu9ZYNMCPRJ4523W1AuVSLlAlMNvkG+biUui 73fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature:dkim-filter :arc-authentication-results; bh=DwMtmEMhoQeKCP+xXK1eqp6kUDEqMWCSMJjO2972Fxg=; b=yZnAw1ACZkqU9X2qpYg0Q4HCzxAXqWA7PwxZgg8mPFRJOOcuyFlUrQ5D7GCV0aTiOQ 2ptqk0lFktZAVOsJT9CYXgwLNcfYSDMMCtVIjvtrUIckBCle/9excoipBJfZ/6JceI2V 2V2J7vZ8h95V1iSmVQ5aItJ0IYG1xhR+Sl2Nz55jGDJIW/lkkKQdyTHOBlGE4/OGQnwj uBXjsnPFsYQ/B5YUThOjJ2rckW5ntkb+gNnCB2+cXyahp+0mps/anEl7RvRTH0fOhxzf op/cPURL7u3IiPeBPTLmI3csnVg7gt1ZREGCfs/lWCz+H8hr8jo8Ss+11E1o3PvEE3WF zzqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=HyBzpl+c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q18si587723pge.257.2017.11.07.00.12.01; Tue, 07 Nov 2017 00:12:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=HyBzpl+c; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932752AbdKGIMA (ORCPT + 26 others); Tue, 7 Nov 2017 03:12:00 -0500 Received: from conuserg-09.nifty.com ([210.131.2.76]:24877 "EHLO conuserg-09.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932518AbdKGIKx (ORCPT ); Tue, 7 Nov 2017 03:10:53 -0500 Received: from pug.e01.socionext.com (p14092-ipngnfx01kyoto.kyoto.ocn.ne.jp [153.142.97.92]) (authenticated) by conuserg-09.nifty.com with ESMTP id vA789u4N027191; Tue, 7 Nov 2017 17:10:00 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conuserg-09.nifty.com vA789u4N027191 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1510042201; bh=DwMtmEMhoQeKCP+xXK1eqp6kUDEqMWCSMJjO2972Fxg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HyBzpl+ckA7ZFKYvDB8aUnuEkNkomvXZiJ9CZzfHII2TpTKbRElVHWBChunNh03aD 0YlESjO+sFpm2/O4VFrBr2o1jJ7uqZD/jTecgR7F7Nl14YrygOEfo2kvS39KgdsSc0 aHMLAfURuq8dSs5jgA7V2o7ZUAgMG6yCnNIoWpF11GZGwdYkh1Jt6OiBX6yN6pnNxr UA9OdbTGtf0RvmLytOrraRLKAesRQyDC12Irp5hEffmC8+iWtpQ4ABeduVwAyLdhKa hn/zBsRjYixSmnwIT6EdmCpST3/uBGN6AqSMoak0TWOTz4HlsEx4a3M6+GwY0ZxW6e JGj5/HQA9MI0A== X-Nifty-SrcIP: [153.142.97.92] From: Masahiro Yamada To: Wolfram Sang , linux-mmc@vger.kernel.org Cc: Simon Horman , Yoshihiro Shimoda , Masahiro Yamada , linux-kernel@vger.kernel.org, Ulf Hansson Subject: [PATCH 5/6] mmc: tmio, renesas_sdhi: set mmc_host_ops hooks directly Date: Tue, 7 Nov 2017 17:09:31 +0900 Message-Id: <1510042172-27220-6-git-send-email-yamada.masahiro@socionext.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510042172-27220-1-git-send-email-yamada.masahiro@socionext.com> References: <1510042172-27220-1-git-send-email-yamada.masahiro@socionext.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Drivers can set any mmc_host_ops hooks between tmio_mmc_host_alloc() and tmio_mmc_host_probe(). Remove duplicated hooks in tmio_mmc_host. Signed-off-by: Masahiro Yamada --- drivers/mmc/host/renesas_sdhi_core.c | 4 ++-- drivers/mmc/host/tmio_mmc.h | 3 --- drivers/mmc/host/tmio_mmc_core.c | 4 ---- 3 files changed, 2 insertions(+), 9 deletions(-) -- 2.7.4 diff --git a/drivers/mmc/host/renesas_sdhi_core.c b/drivers/mmc/host/renesas_sdhi_core.c index 23c250e..7bb0252 100644 --- a/drivers/mmc/host/renesas_sdhi_core.c +++ b/drivers/mmc/host/renesas_sdhi_core.c @@ -548,8 +548,8 @@ int renesas_sdhi_probe(struct platform_device *pdev, /* SDR speeds are only available on Gen2+ */ if (mmc_data->flags & TMIO_MMC_MIN_RCAR2) { /* card_busy caused issues on r8a73a4 (pre-Gen2) CD-less SDHI */ - host->card_busy = renesas_sdhi_card_busy; - host->start_signal_voltage_switch = + host->mmc_host_ops.card_busy = renesas_sdhi_card_busy; + host->mmc_host_ops.start_signal_voltage_switch = renesas_sdhi_start_signal_voltage_switch; } diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h index b251f1c..319a2d6 100644 --- a/drivers/mmc/host/tmio_mmc.h +++ b/drivers/mmc/host/tmio_mmc.h @@ -186,9 +186,6 @@ struct tmio_mmc_host { void (*clk_disable)(struct tmio_mmc_host *host); int (*multi_io_quirk)(struct mmc_card *card, unsigned int direction, int blk_size); - int (*card_busy)(struct mmc_host *mmc); - int (*start_signal_voltage_switch)(struct mmc_host *mmc, - struct mmc_ios *ios); int (*write16_hook)(struct tmio_mmc_host *host, int addr); void (*hw_reset)(struct tmio_mmc_host *host); void (*prepare_tuning)(struct tmio_mmc_host *host, unsigned long tap); diff --git a/drivers/mmc/host/tmio_mmc_core.c b/drivers/mmc/host/tmio_mmc_core.c index 3c84044..695b4f4 100644 --- a/drivers/mmc/host/tmio_mmc_core.c +++ b/drivers/mmc/host/tmio_mmc_core.c @@ -1202,10 +1202,6 @@ int tmio_mmc_host_probe(struct tmio_mmc_host *_host, if (ret < 0) return ret; - _host->mmc_host_ops.card_busy = _host->card_busy; - _host->mmc_host_ops.start_signal_voltage_switch = - _host->start_signal_voltage_switch; - mmc->caps |= MMC_CAP_4_BIT_DATA | pdata->capabilities; mmc->caps2 |= pdata->capabilities2; mmc->max_segs = pdata->max_segs ? : 32;