Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754124AbdHURz6 (ORCPT ); Mon, 21 Aug 2017 13:55:58 -0400 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34951 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753926AbdHURz4 (ORCPT ); Mon, 21 Aug 2017 13:55:56 -0400 From: Arvind Yadav To: lee.jones@linaro.org, support.opensource@diasemi.com Cc: linux-kernel@vger.kernel.org Subject: [PATCH] mfd: da9052: constify spi_device_id Date: Mon, 21 Aug 2017 23:25:27 +0530 Message-Id: <20bd4bf8d017bdc1516b544235f986e8d0b9ecaf.1503338018.git.arvind.yadav.cs@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 770 Lines: 24 spi_device_id are not supposed to change at runtime. All functions working with spi_device_id provided by work with const spi_device_id. So mark the non-const structs as const. Signed-off-by: Arvind Yadav --- drivers/mfd/da9052-spi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/da9052-spi.c b/drivers/mfd/da9052-spi.c index b9ea1b2..abfb118 100644 --- a/drivers/mfd/da9052-spi.c +++ b/drivers/mfd/da9052-spi.c @@ -67,7 +67,7 @@ static int da9052_spi_remove(struct spi_device *spi) return 0; } -static struct spi_device_id da9052_spi_id[] = { +static const struct spi_device_id da9052_spi_id[] = { {"da9052", DA9052}, {"da9053-aa", DA9053_AA}, {"da9053-ba", DA9053_BA}, -- 2.7.4