From patchwork Tue Nov 6 21:55:31 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12698 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 7565923E00 for ; Tue, 6 Nov 2012 21:55:49 +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 C3103A1872C for ; Tue, 6 Nov 2012 21:55:48 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so1321946iej.11 for ; Tue, 06 Nov 2012 13:55:48 -0800 (PST) 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=9DUQv0lfjVbldXkstbocSTBmCX14/2T0nG5pvSY1XNI=; b=GqKJW2kJtlECAZX4cIwPRxl0APJwtvUv39Yk+DZiMHRas9wnHKtH0OJpJ5aPKLS2eO XBY+zaUbv5c5pvrIoUtnrSERRRM3qvZbyMkaaB0YfliVrGKX+K0MxJYzBy7yCJ25PJke AbmisFDgEvU3789WTMOB2j7zhyRIOgQV1fwgOLxidbxTTUFSyDMtV9WtTqVW11+HCB6p U5i0uRVzDc/mWMXSiivDiG+N61OXCd7rY24uV7bRfqKlNZP8ncQBQM3JegTuEfyyEor0 X+RYjZA325HToLC9iJq+CaDEVFp+nPRQxgm66GLrmVzVFulfg/D8a0l864PX2zm0O19U RX2Q== Received: by 10.50.237.69 with SMTP id va5mr101435igc.62.1352238948222; Tue, 06 Nov 2012 13:55:48 -0800 (PST) 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.67.148 with SMTP id n20csp114504igt; Tue, 6 Nov 2012 13:55:47 -0800 (PST) Received: by 10.14.223.4 with SMTP id u4mr7838996eep.19.1352238947016; Tue, 06 Nov 2012 13:55:47 -0800 (PST) Received: from moutng.kundenserver.de (moutng.kundenserver.de. [212.227.126.186]) by mx.google.com with ESMTPS id z46si2126004eeo.136.2012.11.06.13.55.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Nov 2012 13:55:47 -0800 (PST) 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=mrbap0) with ESMTP (Nemesis) id 0MY4FU-1TryTm03MG-00VKl1; Tue, 06 Nov 2012 22:55:42 +0100 From: Arnd Bergmann To: linux-kernel@vger.kernel.org Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , Thomas Abraham , Will Newton , Chris Ball Subject: [PATCH 6/8] mmc: dw_mmc: constify dw_mci_idmac_ops in exynos back-end Date: Tue, 6 Nov 2012 22:55:31 +0100 Message-Id: <1352238933-4886-7-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 1.7.10 In-Reply-To: <1352238933-4886-1-git-send-email-arnd@arndb.de> References: <1352238933-4886-1-git-send-email-arnd@arndb.de> X-Provags-ID: V02:K0:T8wtbYZUk7YRqg1xEHk6D8ajEvX7rr7pQs8I05fyocI TysyiTUuBhvNSk0jbXbwFEbab0gKI6i370Wc0Mwe4Qu5fZKxtj WYpwZXsaKnyxHA0K3awg0Zw3E0h32dxZhNCZA0mdhG6nQ/EFxb R48uu8uNijfSiTWNJfSGIEM6KRjngAzrwaeo6ri2QsEjLY+7l2 dDH3f+UhojzzlnJPr4euLaFIVc7QQSfsKmfxhEP7jRy71JJNC+ /g3rdpJpvhb0k1zw5Lilj/bJAtrUH42pY/naVW97Y1hV946Chh nPAn0E2KZRSuMkWmT6zSVzf5A0PMarZNdGn1O4Tuo4pnmHM4DF QEYDCZKOPaGM5GXdR067a7UOOE5hhEa0WAap+OhQbRznfzNXkJ dx1+ervJ4xlcg== X-Gm-Message-State: ALoCoQkxDw+Uk8qB+A4WaHF0MTijuCz+w8diYNwtPjfEjWR83PyUqPkM6bS3+vSBKRR/oJ3vs6Sk The of_device_id match data is now marked as const and must not be modified. This changes the dw_mmc to mark all pointers passing the dw_mci_drv_data or dw_mci_dma_ops structures as const, and also marks the static definitions as const. drivers/mmc/host/dw_mmc-exynos.c: In function 'dw_mci_exynos_probe': drivers/mmc/host/dw_mmc-exynos.c:234:11: warning: assignment discards 'const' qualifier from pointer target type [enabled by default] Signed-off-by: Arnd Bergmann Cc: Thomas Abraham Cc: Will Newton Cc: Chris Ball --- drivers/mmc/host/dw_mmc-exynos.c | 6 +++--- 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 | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/host/dw_mmc-exynos.c b/drivers/mmc/host/dw_mmc-exynos.c index 0147ac3a..4d50da6 100644 --- a/drivers/mmc/host/dw_mmc-exynos.c +++ b/drivers/mmc/host/dw_mmc-exynos.c @@ -208,7 +208,7 @@ static unsigned long exynos5250_dwmmc_caps[4] = { MMC_CAP_CMD23, }; -static struct dw_mci_drv_data exynos5250_drv_data = { +static const struct dw_mci_drv_data exynos5250_drv_data = { .caps = exynos5250_dwmmc_caps, .init = dw_mci_exynos_priv_init, .setup_clock = dw_mci_exynos_setup_clock, @@ -220,14 +220,14 @@ static struct dw_mci_drv_data exynos5250_drv_data = { static const struct of_device_id dw_mci_exynos_match[] = { { .compatible = "samsung,exynos5250-dw-mshc", - .data = (void *)&exynos5250_drv_data, }, + .data = &exynos5250_drv_data, }, {}, }; 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 250aa18..4f01f9f 100644 --- a/drivers/mmc/host/dw_mmc.c +++ b/drivers/mmc/host/dw_mmc.c @@ -434,7 +434,7 @@ static int dw_mci_idmac_init(struct dw_mci *host) return 0; } -static struct dw_mci_dma_ops dw_mci_idmac_ops = { +static const struct dw_mci_dma_ops dw_mci_idmac_ops = { .init = dw_mci_idmac_init, .start = dw_mci_idmac_start_dma, .stop = dw_mci_idmac_stop_dma, diff --git a/include/linux/mmc/dw_mmc.h b/include/linux/mmc/dw_mmc.h index 7c6a113..b611f32 100644 --- a/include/linux/mmc/dw_mmc.h +++ b/include/linux/mmc/dw_mmc.h @@ -137,7 +137,7 @@ struct dw_mci { dma_addr_t sg_dma; void *sg_cpu; - struct dw_mci_dma_ops *dma_ops; + const struct dw_mci_dma_ops *dma_ops; #ifdef CONFIG_MMC_DW_IDMAC unsigned int ring_size; #else @@ -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;