From patchwork Wed Feb 6 19:46:48 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2106451 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 610863FCFC for ; Wed, 6 Feb 2013 19:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758045Ab3BFTrR (ORCPT ); Wed, 6 Feb 2013 14:47:17 -0500 Received: from moutng.kundenserver.de ([212.227.17.9]:60545 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757346Ab3BFTrN (ORCPT ); Wed, 6 Feb 2013 14:47:13 -0500 Received: from axis700.grange (dslb-178-006-240-079.pools.arcor-ip.net [178.6.240.79]) by mrelayeu.kundenserver.de (node=mrbap0) with ESMTP (Nemesis) id 0Lpgco-1UYN6W3vS2-00fIAC; Wed, 06 Feb 2013 20:47:03 +0100 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id 7CA5840B98; Wed, 6 Feb 2013 20:47:02 +0100 (CET) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1U3AxS-0004q1-AU; Wed, 06 Feb 2013 20:47:02 +0100 From: Guennadi Liakhovetski To: linux-mmc@vger.kernel.org Cc: devicetree-discuss@lists.ozlabs.org, linux-sh@vger.kernel.org, Magnus Damm , Simon Horman , Guennadi Liakhovetski Subject: [PATCH v3 01/13] mmc: sdhi, tmio: only check flags in tmio-mmc driver proper Date: Wed, 6 Feb 2013 20:46:48 +0100 Message-Id: <1360180020-18555-2-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1360180020-18555-1-git-send-email-g.liakhovetski@gmx.de> References: <1360180020-18555-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:mC/79fj2kas5QN4o0phqTwZTKHXjw5twVwPQirAh8ZW +fwcHAU8r7EW6jAtrHE1DHduRGVE762rbv/KsnK3fmGZZMXhPU HNahdpqD0hLQFZ6icJMXHS6Sszwth4BgOojdcd98VhW17PmRTX WCEMPiH3h90OrYEDGEs/zBGmo6Vs8FjPO5u3mi5zTw07+byowp bOuSUiCkR8sJjJqBimqA3qj+Ttk0XfTEGO/QgWEvloQSvOi31j bgdibsDN3a3iSASIVA0+Sbc0rouIzVoQ3E2c5jIS/IE/T2q+4J Nh49UEsZLIE0FFpuJipzwbbVKxnHIPQtw+Cdo0t7AnVwYI338X agAaam28fjseiD2ZGNDFASS7h07BisNZRoWcmU5uEEgf3zxNVQ z/HHOOjS9HLXA== Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org tmio-mmc platform flags can be set by various means, including caller drivers and device-tree bindings, therefore it is better to only check them in the tmio-mmc driver proper, not in caller drivers themselves. Signed-off-by: Guennadi Liakhovetski --- drivers/mmc/host/sh_mobile_sdhi.c | 3 +-- drivers/mmc/host/tmio_mmc_pio.c | 3 +++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c index 524a7f7..e0ca0ab 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -153,10 +153,9 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) mmc_data->clk_enable = sh_mobile_sdhi_clk_enable; mmc_data->clk_disable = sh_mobile_sdhi_clk_disable; mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; + mmc_data->write16_hook = sh_mobile_sdhi_write16_hook; if (p) { mmc_data->flags = p->tmio_flags; - if (mmc_data->flags & TMIO_MMC_HAS_IDLE_WAIT) - mmc_data->write16_hook = sh_mobile_sdhi_write16_hook; mmc_data->ocr_mask = p->tmio_ocr_mask; mmc_data->capabilities |= p->tmio_caps; mmc_data->capabilities2 |= p->tmio_caps2; diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c index 0f992e9..b25adb4 100644 --- a/drivers/mmc/host/tmio_mmc_pio.c +++ b/drivers/mmc/host/tmio_mmc_pio.c @@ -928,6 +928,9 @@ int tmio_mmc_host_probe(struct tmio_mmc_host **host, int ret; u32 irq_mask = TMIO_MASK_CMD; + if (!(pdata->flags & TMIO_MMC_HAS_IDLE_WAIT)) + pdata->write16_hook = NULL; + res_ctl = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!res_ctl) return -EINVAL;