From patchwork Wed Oct 31 03:35:47 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 1675741 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 93ADF3FC4C for ; Wed, 31 Oct 2012 03:36:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758606Ab2JaDgL (ORCPT ); Tue, 30 Oct 2012 23:36:11 -0400 Received: from mail-yh0-f46.google.com ([209.85.213.46]:60617 "EHLO mail-yh0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758722Ab2JaDgK (ORCPT ); Tue, 30 Oct 2012 23:36:10 -0400 Received: by mail-yh0-f46.google.com with SMTP id m54so201997yhm.19 for ; Tue, 30 Oct 2012 20:36:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer; bh=DKceLrQrwwq4eMDGPj3i0XFt+y2rsIQNNM7aewNUV70=; b=V4UQ7P7eU8Vpz/b11ieVrqdvYJvk5H/DhORl6wQlJ9epaCm1bZxgsQckAVeHMJrp0p omNMaNcw0q8iIB8iUz1IaHRQRTxOSE7l+HEVBHo0xRjrrC+owhPOiD9OXUQETlgAhba/ 8H15XOMt8vgwDXz50bTZVg6qq2mRpot5h8w5FwSgOa/0lM2swvHAFyRSlkdcDRdR6etK 11JKkZQCYOumG29hHmnLkK+JxRXqPPjZvQL9Qx99GMDjszjnTbbDx3mz71zUHwVmfPD1 xb0SDPtGmSq2QYlxPVXFhOPRD+nz39Mjy3aZOEZLqX9nCsZWETbzvnXbyGvURuRR4a6b ZvvQ== Received: by 10.236.146.239 with SMTP id r75mr35634196yhj.100.1351654570090; Tue, 30 Oct 2012 20:36:10 -0700 (PDT) Received: from fabio-Latitude-E6410.cps.virtua.com.br ([201.82.136.205]) by mx.google.com with ESMTPS id e18sm2643749yhi.0.2012.10.30.20.36.07 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 30 Oct 2012 20:36:09 -0700 (PDT) From: Fabio Estevam To: cjb@laptop.org Cc: shawn.guo@linaro.org, marex@denx.de, linux-mmc@vger.kernel.org, Fabio Estevam Subject: [PATCH] mmc: mxs-mmc: Remove platform data Date: Wed, 31 Oct 2012 01:35:47 -0200 Message-Id: <1351654547-615-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 1.7.9.5 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org From: Fabio Estevam All MXS users have been converted to device tree and the board files have been removed. No need to keep platform data in the driver. Also move bus_width declaration in the beggining of mxs_mmc_probe() to avoid: 'warning: ISO C90 forbids mixed declarations and code'. Signed-off-by: Fabio Estevam --- drivers/mmc/host/mxs-mmc.c | 30 ++++++++++-------------------- 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/drivers/mmc/host/mxs-mmc.c b/drivers/mmc/host/mxs-mmc.c index 80d1e6d..37fd9fc 100644 --- a/drivers/mmc/host/mxs-mmc.c +++ b/drivers/mmc/host/mxs-mmc.c @@ -593,13 +593,13 @@ static int mxs_mmc_probe(struct platform_device *pdev) struct mxs_mmc_host *host; struct mmc_host *mmc; struct resource *iores, *dmares; - struct mxs_mmc_platform_data *pdata; struct pinctrl *pinctrl; int ret = 0, irq_err, irq_dma; dma_cap_mask_t mask; struct regulator *reg_vmmc; enum of_gpio_flags flags; struct mxs_ssp *ssp; + u32 bus_width = 0; iores = platform_get_resource(pdev, IORESOURCE_MEM, 0); dmares = platform_get_resource(pdev, IORESOURCE_DMA, 0); @@ -682,25 +682,15 @@ static int mxs_mmc_probe(struct platform_device *pdev) mmc->caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SDIO_IRQ | MMC_CAP_NEEDS_POLL; - pdata = mmc_dev(host->mmc)->platform_data; - if (!pdata) { - u32 bus_width = 0; - of_property_read_u32(np, "bus-width", &bus_width); - if (bus_width == 4) - mmc->caps |= MMC_CAP_4_BIT_DATA; - else if (bus_width == 8) - mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; - host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0, - &flags); - if (flags & OF_GPIO_ACTIVE_LOW) - host->wp_inverted = 1; - } else { - if (pdata->flags & SLOTF_8_BIT_CAPABLE) - mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; - if (pdata->flags & SLOTF_4_BIT_CAPABLE) - mmc->caps |= MMC_CAP_4_BIT_DATA; - host->wp_gpio = pdata->wp_gpio; - } + of_property_read_u32(np, "bus-width", &bus_width); + if (bus_width == 4) + mmc->caps |= MMC_CAP_4_BIT_DATA; + else if (bus_width == 8) + mmc->caps |= MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA; + host->wp_gpio = of_get_named_gpio_flags(np, "wp-gpios", 0, &flags); + + if (flags & OF_GPIO_ACTIVE_LOW) + host->wp_inverted = 1; mmc->f_min = 400000; mmc->f_max = 288000000;