From patchwork Wed Jan 16 16:54:36 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guennadi Liakhovetski X-Patchwork-Id: 1991871 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D49A0DF2F3 for ; Wed, 16 Jan 2013 16:55:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757911Ab3APQzJ (ORCPT ); Wed, 16 Jan 2013 11:55:09 -0500 Received: from moutng.kundenserver.de ([212.227.126.171]:58573 "EHLO moutng.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757963Ab3APQyu (ORCPT ); Wed, 16 Jan 2013 11:54:50 -0500 Received: from axis700.grange (dslb-178-006-255-053.pools.arcor-ip.net [178.6.255.53]) by mrelayeu.kundenserver.de (node=mrbap4) with ESMTP (Nemesis) id 0LalfU-1TFbwO2efg-00kO86; Wed, 16 Jan 2013 17:54:49 +0100 Received: from 6a.grange (6a.grange [192.168.1.11]) by axis700.grange (Postfix) with ESMTPS id C83B240BC7; Wed, 16 Jan 2013 17:54:47 +0100 (CET) Received: from lyakh by 6a.grange with local (Exim 4.72) (envelope-from ) id 1TvWGE-0006mW-Lo; Wed, 16 Jan 2013 17:54:46 +0100 From: Guennadi Liakhovetski To: linux-mmc@vger.kernel.org Cc: linux-sh@vger.kernel.org, Magnus Damm Subject: [PATCH 01/11] mmc: sdhi, tmio: only check flags in tmio-mmc driver proper Date: Wed, 16 Jan 2013 17:54:36 +0100 Message-Id: <1358355286-26029-2-git-send-email-g.liakhovetski@gmx.de> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1358355286-26029-1-git-send-email-g.liakhovetski@gmx.de> References: <1358355286-26029-1-git-send-email-g.liakhovetski@gmx.de> X-Provags-ID: V02:K0:zsuVus4LK7pKyPVGUnuTBOIZ1NwbnR8phC1Qd3p2pKt 8H10mWCje2qi8+P2AZcvzBPBtju4h2vdK48xcClaOUDRFgP39e snm9+I5J3XXd1wkqZIUr8DZrQWeKXJ6ZTChWFbBOfbr5yxPfa4 44CzdGVY9ywcmgA+ftQqapPk4GiLZjIZGxZpubjN1/eUZgOyRQ 2dsvYzKpeTQPPge4xLAKrWxHNWgMwS0hR3CbdDdDUHJ8RTY8My n3lpPgC7qbIaOarYabhp0xsjh5BQuMIlAe/dmT22yDgIVLNP3z 5vqILu+qulL2tMTzX5isf/IKJ3cUeFESadaYdJ3lz5S0o9+wYY Q3bHrR94W4c1mVC9odH5LHRMyNk5u2R+7llryAkoWCBKxP2KUX VZ61Ro0kP1avA== 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..fa71b01 100644 --- a/drivers/mmc/host/sh_mobile_sdhi.c +++ b/drivers/mmc/host/sh_mobile_sdhi.c @@ -155,8 +155,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev) mmc_data->capabilities = MMC_CAP_MMC_HIGHSPEED; 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->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;