Skip to content

Commit e1ec650

Browse files
ArvindYadavCsJames Morris
authored andcommitted
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>
1 parent c2a9c4b commit e1ec650

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/char/tpm/tpm_crb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ static const struct dev_pm_ops crb_pm = {
665665
SET_RUNTIME_PM_OPS(crb_pm_runtime_suspend, crb_pm_runtime_resume, NULL)
666666
};
667667

668-
static struct acpi_device_id crb_device_ids[] = {
668+
static const struct acpi_device_id crb_device_ids[] = {
669669
{"MSFT0101", 0},
670670
{"", 0},
671671
};

0 commit comments

Comments
 (0)