summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorArvind Yadav <arvind.yadav.cs@gmail.com>2017-07-06 19:48:39 +0200
committerJames Morris <james.l.morris@oracle.com>2017-09-24 06:49:52 +0200
commite1ec650f9ae7d1e66f77bf14c86e4e9dc629a4d5 (patch)
treeceb2528962c32f8a71ae218f04e6ac0595e07103 /drivers/char
parenttpm: vtpm: constify vio_device_id (diff)
downloadlinux-e1ec650f9ae7d1e66f77bf14c86e4e9dc629a4d5.tar.xz
linux-e1ec650f9ae7d1e66f77bf14c86e4e9dc629a4d5.zip
tpm: tpm_crb: 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 4198 608 0 4806 12c6 drivers/char/tpm/tpm_crb.o File size After adding 'const': text data bss dec hex filename 4262 520 0 4782 12ae drivers/char/tpm/tpm_crb.o Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off-by: James Morris <james.l.morris@oracle.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_crb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c
index a4ac63a21d8a..8f0a98dea327 100644
--- a/drivers/char/tpm/tpm_crb.c
+++ b/drivers/char/tpm/tpm_crb.c
@@ -665,7 +665,7 @@ static const struct dev_pm_ops crb_pm = {
SET_RUNTIME_PM_OPS(crb_pm_runtime_suspend, crb_pm_runtime_resume, NULL)
};
-static struct acpi_device_id crb_device_ids[] = {
+static const struct acpi_device_id crb_device_ids[] = {
{"MSFT0101", 0},
{"", 0},
};