]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
extcon: int3496: Constify acpi_device_id
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Thu, 6 Jul 2017 16:55:56 +0000 (22:25 +0530)
committerChanwoo Choi <cwchoi00@gmail.com>
Sun, 16 Jul 2017 06:09:30 +0000 (15:09 +0900)
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>
drivers/extcon/extcon-intel-int3496.c

index d9f9afe45961df468d58273ab4725ff79b7089a5..1a45e745717de6ab0e0f9e1cfeb7ffb39d473591 100644 (file)
@@ -171,7 +171,7 @@ static int int3496_remove(struct platform_device *pdev)
        return 0;
 }
 
-static struct acpi_device_id int3496_acpi_match[] = {
+static const struct acpi_device_id int3496_acpi_match[] = {
        { "INT3496" },
        { }
 };