Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752390AbdFUDvT (ORCPT ); Tue, 20 Jun 2017 23:51:19 -0400 Received: from 18.mo6.mail-out.ovh.net ([46.105.73.110]:39106 "EHLO 18.mo6.mail-out.ovh.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751135AbdFUDvS (ORCPT ); Tue, 20 Jun 2017 23:51:18 -0400 X-Greylist: delayed 12597 seconds by postgrey-1.27 at vger.kernel.org; Tue, 20 Jun 2017 23:51:18 EDT Subject: Re: [PATCH] mtd: spi-nor: cqspi: make of_device_ids const To: Marek Vasut , Arvind Yadav , dwmw2@infradead.org, computersforpeace@gmail.com, boris.brezillon@free-electrons.com, richard@nod.at Cc: linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org References: <4f604ebc-69a7-4e35-d682-cc4fa9e76c82@gmail.com> From: Cyrille Pitchen Message-ID: Date: Tue, 20 Jun 2017 23:56:00 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <4f604ebc-69a7-4e35-d682-cc4fa9e76c82@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Ovh-Tracer-Id: 11094336210850174743 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrfeeljedrkeelgddtkecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1131 Lines: 36 Le 16/06/2017 à 12:27, Marek Vasut a écrit : > On 06/16/2017 11:35 AM, Arvind Yadav wrote: >> of_device_ids are not supposed to change at runtime. All functions >> working with of_device_ids provided by work with const >> of_device_ids. So mark the non-const structs as const. >> >> Signed-off-by: Arvind Yadav > > Works for me > Reviewed-by: Marek Vasut > Applied to the spi-nor/next branch of l2-mtd Thanks! >> --- >> drivers/mtd/spi-nor/cadence-quadspi.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/mtd/spi-nor/cadence-quadspi.c b/drivers/mtd/spi-nor/cadence-quadspi.c >> index 9f8102d..1a25637 100644 >> --- a/drivers/mtd/spi-nor/cadence-quadspi.c >> +++ b/drivers/mtd/spi-nor/cadence-quadspi.c >> @@ -1277,7 +1277,7 @@ static int cqspi_resume(struct device *dev) >> #define CQSPI_DEV_PM_OPS NULL >> #endif >> >> -static struct of_device_id const cqspi_dt_ids[] = { >> +static const struct of_device_id const cqspi_dt_ids[] = { >> {.compatible = "cdns,qspi-nor",}, >> { /* end of table */ } >> }; >> > >