Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

extcon: int3496: Constify acpi_device_id

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
1733 352 0 2085 825 drivers/extcon/extcon-intel-int3496.o

File size After adding 'const':
text data bss dec hex filename
1797 272 0 2069 815 drivers/extcon/extcon-intel-int3496.o

Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>

authored by

Arvind Yadav and committed by
Chanwoo Choi
ff890bc0 5771a8c0

+1 -1
+1 -1
drivers/extcon/extcon-intel-int3496.c
··· 171 171 return 0; 172 172 } 173 173 174 - static struct acpi_device_id int3496_acpi_match[] = { 174 + static const struct acpi_device_id int3496_acpi_match[] = { 175 175 { "INT3496" }, 176 176 { } 177 177 };