From patchwork Fri Feb 15 15:13:50 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 2148301 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 B24723FDF1 for ; Fri, 15 Feb 2013 15:14:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757336Ab3BOPOO (ORCPT ); Fri, 15 Feb 2013 10:14:14 -0500 Received: from moutng.kundenserver.de ([212.227.17.10]:58700 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755600Ab3BOPON (ORCPT ); Fri, 15 Feb 2013 10:14:13 -0500 Received: from axis700.grange (dslb-188-109-033-039.pools.arcor-ip.net [188.109.33.39]) by mrelayeu.kundenserver.de (node=mreu3) with ESMTP (Nemesis) id 0MFE4N-1U8K8v2KSp-00GGTg; Fri, 15 Feb 2013 16:14:11 +0100 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id DDCFD40B98; Fri, 15 Feb 2013 16:14:09 +0100 (CET) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1U6MzJ-0004ja-IY; Fri, 15 Feb 2013 16:14:09 +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 , Arnd Bergmann , Guennadi Liakhovetski Subject: [PATCH v4 01/13] mmc: sdhi, tmio: only check flags in tmio-mmc driver proper Date: Fri, 15 Feb 2013 16:13:50 +0100 Message-Id: <1360941242-18153-2-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1360941242-18153-1-git-send-email-g.liakhovetski@gmx.de> References: <1360941242-18153-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:p29cm9reqLXllzl9XY6obf0TH/2hqSmWV9iWsKMAISv ceVbnEEXlR/Q7dG3uQYmPyy2rt3cWwwYSj9rQCjPFNnGVUvcNB tVqO39l6OIcYdyBvIDnM8cvquFjRaIeFdozXWmaNL9ls2ZTDbh yDEUP6IiuIoVXKDIzwSzbzx4xq1RzATHlsIWeRHjTgoqMMMg+G gEf5+t1LWI+6Eks2JRU6/ejahflnSTGd8Tx8T40B+daRxkPRI0 9bG0aiCZggbMynM66brNcZDhM09qJ7XgQelgqDDWLHKCWFI83N KpYimcjh7IlxnHVdeml1Nb7vflvvuRyGCFj2biXvMeNTG72krt n7ig+5tr0edXR2tuV6T607alTuWTnJE2jbYedNPgQZeDQbd0TM TGnjzK0FwmmOQ== 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;