Skip to content

Commit c510f6a

Browse files
Wer-Wolfgroeck
authored andcommitted
hwmon: (dell-smm) Mark tables as __initconst
Both the config and the DMI tables never change and are only used during module init for setting up the device data struct. Mark all of them as const and __initconst for a smaller runtime memory footprint. Signed-off-by: Armin Wolf <[email protected]> Reviewed-by: Pali Rohár <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]>
1 parent 1125bac commit c510f6a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/hwmon/dell-smm-hwmon.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ enum i8k_configs {
957957
DELL_XPS,
958958
};
959959

960-
static const struct i8k_config_data i8k_config_data[] = {
960+
static const struct i8k_config_data i8k_config_data[] __initconst = {
961961
[DELL_LATITUDE_D520] = {
962962
.fan_mult = 1,
963963
.fan_max = I8K_FAN_TURBO,
@@ -1115,7 +1115,7 @@ static const struct dmi_system_id i8k_blacklist_fan_type_dmi_table[] __initconst
11151115
* support for affected blacklisted Dell machines stay disabled.
11161116
* See bug: https://bugzilla.kernel.org/show_bug.cgi?id=195751
11171117
*/
1118-
static struct dmi_system_id i8k_blacklist_fan_support_dmi_table[] __initdata = {
1118+
static const struct dmi_system_id i8k_blacklist_fan_support_dmi_table[] __initconst = {
11191119
{
11201120
.ident = "Dell Inspiron 7720",
11211121
.matches = {
@@ -1156,14 +1156,14 @@ enum i8k_fan_controls {
11561156
I8K_FAN_34A3_35A3,
11571157
};
11581158

1159-
static const struct i8k_fan_control_data i8k_fan_control_data[] = {
1159+
static const struct i8k_fan_control_data i8k_fan_control_data[] __initconst = {
11601160
[I8K_FAN_34A3_35A3] = {
11611161
.manual_fan = 0x34a3,
11621162
.auto_fan = 0x35a3,
11631163
},
11641164
};
11651165

1166-
static struct dmi_system_id i8k_whitelist_fan_control[] __initdata = {
1166+
static const struct dmi_system_id i8k_whitelist_fan_control[] __initconst = {
11671167
{
11681168
.ident = "Dell Latitude 5480",
11691169
.matches = {

0 commit comments

Comments
 (0)