From patchwork Fri Sep 28 21:36:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 11862 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 2891423E42 for ; Fri, 28 Sep 2012 21:36:31 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id A7F6EA180DC for ; Fri, 28 Sep 2012 21:36:30 +0000 (UTC) Received: by ieje10 with SMTP id e10so8011818iej.11 for ; Fri, 28 Sep 2012 14:36:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-provags-id:x-gm-message-state; bh=sBkZFsFtxey1pQTbWFdh9VcLO+zHk+WeZRDfiL0649E=; b=NwiLIWpqtFQUA1DoohAZi/dsBOXhkWhbaGmnFC0C+gTbtk7FvfK8+4gJGX5/QIfPYD Okwv4U2JgZNH4W4x6+Mn/MXQpw1DMlpK+Psbu/udS+om5qA+UjzUkQVav4mBpLuqdepY k0SEyi595MBrImaI4g+zLyYS7tRHccVIic4XuEEi3HsBjUNIYny3h4Q+J7j3VcGB6zhA 5F/yQN19r4EaQxZICYcRjRTaQNusiojELF4MmJA4N7DUfnqzHOyXlNFC2fEA63OMYGWV Ywi+HzSLYhdJb8nLT1X3YnjzXWTQlLocx/IB3C/FQqvfFKGb8MHs2xoqHUliQj4Ldca0 0/pQ== Received: by 10.50.217.227 with SMTP id pb3mr25509igc.28.1348868190112; Fri, 28 Sep 2012 14:36:30 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp494994igc; Fri, 28 Sep 2012 14:36:28 -0700 (PDT) Received: by 10.204.150.201 with SMTP id z9mr4185616bkv.104.1348868188409; Fri, 28 Sep 2012 14:36:28 -0700 (PDT) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.186]) by mx.google.com with ESMTPS id w17si14225049bkv.33.2012.09.28.14.36.27 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 28 Sep 2012 14:36:28 -0700 (PDT) Received-SPF: neutral (google.com: 212.227.126.186 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) client-ip=212.227.126.186; Authentication-Results: mx.google.com; spf=neutral (google.com: 212.227.126.186 is neither permitted nor denied by best guess record for domain of arnd@arndb.de) smtp.mail=arnd@arndb.de Received: from localhost.localdomain (HSI-KBW-149-172-5-253.hsi13.kabel-badenwuerttemberg.de [149.172.5.253]) by mrelayeu.kundenserver.de (node=mrbap2) with ESMTP (Nemesis) id 0LeS5t-1To2Nq39uX-00qdtu; Fri, 28 Sep 2012 23:36:20 +0200 From: Arnd Bergmann To: linux-arm-kernel@lists.infradead.org Cc: linux-kernel@vger.kernel.org, arm@kernel.org, Arnd Bergmann , Chris Ball , Thomas Abraham , Will Newton , Jaehoon Chung , Seungwon Jeon , Kyungmin Park , linux-mmc@vger.kernel.org Subject: [PATCH 03/12] mmc: dw_mmc: fix building exynos driver as a module Date: Fri, 28 Sep 2012 23:36:08 +0200 Message-Id: <1348868177-21205-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1348868177-21205-1-git-send-email-arnd@arndb.de> References: <1348868177-21205-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:uttyTGatBxP0MdqdwpytIug6c1eWOwSme4tHlF6NqbU sTj/Z+8u4d3f900C6H8ytBs9DbYa1C4UzV3A/T5TEwvuXDmGdT A8/ilcWO2CgIMl19umag9ye4b4g4n5SejtxTgOvBAk2a0IJpqV IqpR+NbNDTEF1BOdmSZQ8vSa3p8GQStHRz2Zr/l4tYgkg81rOv 6C6xys0NmaOSGgga7IyNv60AsSSazyX/lDRgIvpHcYZB0aFMEY OFx+rq7ZmiPeYXUiuGpPM9lnkg6pDPhbk2bClDNaAxzTAzmdE1 vr5AEaaaILUMoy77MuFaTFriNR00ozPiSXO6vrLySqu9E6VX4u l+poRbVvGCrBNHJ3Edb4h4aPp7m62/VZjZyYb8XSMzngeMTZMB VnyNKORy/EPuw== X-Gm-Message-State: ALoCoQkhupu1wgWB3nABIDoRxmE4asJkbwidAdKyHZOnmpfqeKBQ5d+1rhfnAFnpiB0tTd1ewGd+ The MODULE_DEVICE_TABLE() entry in the dw_mmc_exynos driver points to the wrong symbol which results in a link error when building as a loadable module. Further, we get a warning about the driver_data being marked constant, which requires annotating a few pointers as const. Signed-off-by: Arnd Bergmann Cc: Chris Ball Cc: Thomas Abraham Cc: Will Newton Cc: Jaehoon Chung Cc: Seungwon Jeon Cc: Kyungmin Park Cc: linux-mmc@vger.kernel.org --- drivers/mmc/host/dw_mmc-exynos.c | 4 ++-- drivers/mmc/host/dw_mmc-pltfm.c | 2 +- drivers/mmc/host/dw_mmc-pltfm.h | 2 +- drivers/mmc/host/dw_mmc.c | 2 +- include/linux/mmc/dw_mmc.h | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index 660bbc5..32109a6 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -223,11 +223,11 @@ static const struct of_device_id dw_mci_exynos_match[] = { .data = (void *)&exynos5250_drv_data, }, {}, }; -MODULE_DEVICE_TABLE(of, dw_mci_pltfm_match); +MODULE_DEVICE_TABLE(of, dw_mci_exynos_match); int dw_mci_exynos_probe(struct platform_device *pdev) { - struct dw_mci_drv_data *drv_data; + const struct dw_mci_drv_data *drv_data; const struct of_device_id *match; match = of_match_node(dw_mci_exynos_match, pdev->dev.of_node); diff --git a/drivers/mmc/host/dw_mmc-pltfm.c b/drivers/mmc/host/dw_mmc-pltfm.c index c960ca7..5e33156 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.c +++ b/drivers/mmc/host/dw_mmc-pltfm.c @@ -24,7 +24,7 @@ #include "dw_mmc.h" int dw_mci_pltfm_register(struct platform_device *pdev, - struct dw_mci_drv_data *drv_data) + const struct dw_mci_drv_data *drv_data) { struct dw_mci *host; struct resource *regs; diff --git a/drivers/mmc/host/dw_mmc-pltfm.h b/drivers/mmc/host/dw_mmc-pltfm.h index 301f245..2ac37b8 100644 --- a/drivers/mmc/host/dw_mmc-pltfm.h +++ b/drivers/mmc/host/dw_mmc-pltfm.h @@ -13,7 +13,7 @@ #define _DW_MMC_PLTFM_H_ extern int dw_mci_pltfm_register(struct platform_device *pdev, - struct dw_mci_drv_data *drv_data); + const struct dw_mci_drv_data *drv_data); extern int __devexit dw_mci_pltfm_remove(struct platform_device *pdev); extern const struct dev_pm_ops dw_mci_pltfm_pmops; diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c index a23af77..026cf92 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -1973,7 +1973,7 @@ static void dw_mci_init_dma(struct dw_mci *host) /* Determine which DMA interface to use */ #ifdef CONFIG_MMC_DW_IDMAC host->dma_ops = &dw_mci_idmac_ops; - dev_info(&host->dev, "Using internal DMA controller.\n"); + dev_info(host->dev, "Using internal DMA controller.\n"); #endif if (!host->dma_ops) diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 7c6a113..0f62c8c 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h @@ -162,7 +162,7 @@ struct dw_mci { u16 data_offset; struct device *dev; struct dw_mci_board *pdata; - struct dw_mci_drv_data *drv_data; + const struct dw_mci_drv_data *drv_data; void *priv; struct clk *biu_clk; struct clk *ciu_clk;