summaryrefslogtreecommitdiff
path: root/drivers/acpi/pmic/intel_pmic_chtdc_ti.c
diff options
context:
space:
mode:
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>2024-06-29 08:58:42 +0200
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2024-07-01 20:06:02 +0200
commitcfff1997aafa25ea98c2ceb7251642276745266a (patch)
tree3d0e1c8aff92ff8ea1d2bc8067c528ab8bc75617 /drivers/acpi/pmic/intel_pmic_chtdc_ti.c
parentf42cfd5ceced62799a7dd82899b03d7b9575fc22 (diff)
ACPI: PMIC: Constify struct pmic_table
'struct pmic_table' is not modified in these drivers. Constifying this structure moves some data to a read-only section, so increase overall security. On a x86_64, with allmodconfig, as an example: Before: ====== text data bss dec hex filename 3811 786 0 4597 11f5 drivers/acpi/pmic/intel_pmic_xpower.o text data bss dec hex filename 4147 450 0 4597 11f5 drivers/acpi/pmic/intel_pmic_xpower.o Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://patch.msgid.link/a6c9b1bcdf259adabbcaf91183d3f5ab87a98600.1719644292.git.christophe.jaillet@wanadoo.fr Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/pmic/intel_pmic_chtdc_ti.c')
-rw-r--r--drivers/acpi/pmic/intel_pmic_chtdc_ti.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/pmic/intel_pmic_chtdc_ti.c b/drivers/acpi/pmic/intel_pmic_chtdc_ti.c
index 79f9df552524..ecb36fbc1e7f 100644
--- a/drivers/acpi/pmic/intel_pmic_chtdc_ti.c
+++ b/drivers/acpi/pmic/intel_pmic_chtdc_ti.c
@@ -23,7 +23,7 @@
#define CHTDC_TI_BPTHERM 0x58
#define CHTDC_TI_GPADC 0x5a
-static struct pmic_table chtdc_ti_power_table[] = {
+static const struct pmic_table chtdc_ti_power_table[] = {
{ .address = 0x00, .reg = 0x41 }, /* LDO1 */
{ .address = 0x04, .reg = 0x42 }, /* LDO2 */
{ .address = 0x08, .reg = 0x43 }, /* LDO3 */
@@ -39,7 +39,7 @@ static struct pmic_table chtdc_ti_power_table[] = {
{ .address = 0x30, .reg = 0x4e }, /* LD14 */
};
-static struct pmic_table chtdc_ti_thermal_table[] = {
+static const struct pmic_table chtdc_ti_thermal_table[] = {
{
.address = 0x00,
.reg = CHTDC_TI_GPADC