Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1682585 > unrolled thread

[PATCH] nfc: nxp-nci: constify acpi_device_id.

Started byArvind Yadav <arvind.yadav.cs@gmail.com>
First post2017-07-06 19:00 +0200
Last post2017-07-06 19:00 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] nfc: nxp-nci: constify acpi_device_id. Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-07-06 19:00 +0200

#1682585 — [PATCH] nfc: nxp-nci: constify acpi_device_id.

FromArvind Yadav <arvind.yadav.cs@gmail.com>
Date2017-07-06 19:00 +0200
Subject[PATCH] nfc: nxp-nci: constify acpi_device_id.
Message-ID<u0iid-87X-3@gated-at.bofh.it>
acpi_device_id are not supposed to change at runtime. All functions
working with acpi_device_id provided by <acpi/acpi_bus.h> work with
const acpi_device_id. So mark the non-const structs as const.

File size before:
   text	   data	    bss	    dec	    hex	filename
   2208	    400	      0	   2608	    a30	drivers/nfc/nxp-nci/i2c.o

File size After adding 'const':
   text	   data	    bss	    dec	    hex	filename
   2272	    336	      0	   2608	    a30	drivers/nfc/nxp-nci/i2c.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
 drivers/nfc/nxp-nci/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nfc/nxp-nci/i2c.c b/drivers/nfc/nxp-nci/i2c.c
index ff22d76..35d4fc5 100644
--- a/drivers/nfc/nxp-nci/i2c.c
+++ b/drivers/nfc/nxp-nci/i2c.c
@@ -407,7 +407,7 @@ static const struct of_device_id of_nxp_nci_i2c_match[] = {
 MODULE_DEVICE_TABLE(of, of_nxp_nci_i2c_match);
 
 #ifdef CONFIG_ACPI
-static struct acpi_device_id acpi_id[] = {
+static const struct acpi_device_id acpi_id[] = {
 	{ "NXP7471" },
 	{ },
 };
-- 
2.7.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web