From patchwork Mon Mar 16 19:20:28 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabian Frederick X-Patchwork-Id: 450723 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2001:1868:205::9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 77190140077 for ; Tue, 17 Mar 2015 06:23:30 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YXaaD-0001HE-EG; Mon, 16 Mar 2015 19:21:49 +0000 Received: from mailrelay118.isp.belgacom.be ([195.238.20.145]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YXaZi-0000gk-M9 for linux-mtd@lists.infradead.org; Mon, 16 Mar 2015 19:21:19 +0000 X-Belgacom-Dynamic: yes X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=yz6z4UlqfYe1Iv9USMliYggvHmbgQ4ACOrhY3D/q6Wc= c=1 sm=2 a=MKtGQD3n3ToA:10 a=1oJP67jkp3AA:10 a=ptHaC60jXrnvewmIlngA:9 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: A2BRCADTLAdV/4zC9FFbgwaBLLFpAQEBAQEBBQF2jA+LdQKBNk0BAQEBAQF9hBABBVYjEFE5HhmIMwGyI5VTAQEBAQYihgqJfgcWhBcFmiCLJIhwI4ICHIFRPTGCQwEBAQ Received: from 140.194-244-81.adsl-dyn.isp.belgacom.be (HELO localhost.localdomain) ([81.244.194.140]) by relay.skynet.be with ESMTP; 16 Mar 2015 20:20:59 +0100 From: Fabian Frederick To: linux-kernel@vger.kernel.org Subject: [PATCH 12/35 linux-next] mtd: constify of_device_id array Date: Mon, 16 Mar 2015 20:20:28 +0100 Message-Id: <1426533651-25586-3-git-send-email-fabf@skynet.be> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1426533651-25586-1-git-send-email-fabf@skynet.be> References: <1426533469-25458-1-git-send-email-fabf@skynet.be> <1426533651-25586-1-git-send-email-fabf@skynet.be> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150316_122118_905206_05575A36 X-CRM114-Status: UNSURE ( 8.64 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [195.238.20.145 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [195.238.20.145 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record Cc: Greg Kroah-Hartman , Fabian Frederick , linux-mtd@lists.infradead.org, Han Xu , Brian Norris , David Woodhouse X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick --- drivers/mtd/devices/docg3.c | 2 +- drivers/mtd/maps/physmap_of.c | 4 ++-- drivers/mtd/nand/mpc5121_nfc.c | 2 +- drivers/mtd/spi-nor/fsl-quadspi.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/devices/docg3.c b/drivers/mtd/devices/docg3.c index 0310f91..008337e 100644 --- a/drivers/mtd/devices/docg3.c +++ b/drivers/mtd/devices/docg3.c @@ -2117,7 +2117,7 @@ static int __exit docg3_release(struct platform_device *pdev) } #ifdef CONFIG_OF -static struct of_device_id docg3_dt_ids[] = { +static const struct of_device_id docg3_dt_ids[] = { { .compatible = "m-systems,diskonchip-g3" }, {} }; diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c index ff26e97..774b32f 100644 --- a/drivers/mtd/maps/physmap_of.c +++ b/drivers/mtd/maps/physmap_of.c @@ -147,7 +147,7 @@ static void of_free_probes(const char * const *probes) kfree(probes); } -static struct of_device_id of_flash_match[]; +static const struct of_device_id of_flash_match[]; static int of_flash_probe(struct platform_device *dev) { const char * const *part_probe_types; @@ -327,7 +327,7 @@ err_flash_remove: return err; } -static struct of_device_id of_flash_match[] = { +static const struct of_device_id of_flash_match[] = { { .compatible = "cfi-flash", .data = (void *)"cfi_probe", diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c index 1f12e5b..2a49b53 100644 --- a/drivers/mtd/nand/mpc5121_nfc.c +++ b/drivers/mtd/nand/mpc5121_nfc.c @@ -837,7 +837,7 @@ static int mpc5121_nfc_remove(struct platform_device *op) return 0; } -static struct of_device_id mpc5121_nfc_match[] = { +static const struct of_device_id mpc5121_nfc_match[] = { { .compatible = "fsl,mpc5121-nfc", }, {}, }; diff --git a/drivers/mtd/spi-nor/fsl-quadspi.c b/drivers/mtd/spi-nor/fsl-quadspi.c index 1c7308c..3cd61e9 100644 --- a/drivers/mtd/spi-nor/fsl-quadspi.c +++ b/drivers/mtd/spi-nor/fsl-quadspi.c @@ -663,7 +663,7 @@ static int fsl_qspi_nor_setup_last(struct fsl_qspi *q) return 0; } -static struct of_device_id fsl_qspi_dt_ids[] = { +static const struct of_device_id fsl_qspi_dt_ids[] = { { .compatible = "fsl,vf610-qspi", .data = (void *)&vybrid_data, }, { .compatible = "fsl,imx6sx-qspi", .data = (void *)&imx6sx_data, }, { /* sentinel */ }