platform/x86: add const to thermal_cooling_device_ops structures
PATCH 1/2 acerhdf: add const to thermal_cooling_device_ops structure
In reply to Bhumika GoyalDeclare thermal_cooling_device_ops structure as const as it is only passed as an argument to the function thermal_cooling_device_register and this argument is of type const. So, declare the structure as const.
--- drivers/platform/x86/acerhdf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/acerhdf.c +1 -1
@@ -557,7 +557,7 @@ static int acerhdf_set_cur_state(struct thermal_cooling_device *cdev, }/* bind fan callbacks to fan device */ -static struct thermal_cooling_device_ops acerhdf_cooling_ops = { +static const struct thermal_cooling_device_ops acerhdf_cooling_ops = { .get_max_state = acerhdf_get_max_state, .get_cur_state = acerhdf_get_cur_state, .set_cur_state = acerhdf_set_cur_state,
Signature · 1 line
2.7.4
PATCH 2/2 intel_menlow: add const to thermal_cooling_device_ops structure
In reply to Bhumika GoyalDeclare thermal_cooling_device_ops structure as const as it is only passed as an argument to the function thermal_cooling_device_register and this argument is of type const. So, declare the structure as const.
--- drivers/platform/x86/intel_menlow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/platform/x86/intel_menlow.c +1 -1
@@ -142,7 +142,7 @@ static int memory_set_cur_bandwidth(struct thermal_cooling_device *cdev,return 0 ; } -static struct thermal_cooling_device_ops memory_cooling_ops = { +static const struct thermal_cooling_device_ops memory_cooling_ops = { .get_max_state = memory_get_max_bandwidth, .get_cur_state = memory_get_cur_bandwidth, .set_cur_state = memory_set_cur_bandwidth,
Signature · 1 line
2.7.4
cover platform/x86: add const to thermal_cooling_device_ops structures
Declare thermal_cooling_device_ops structures as const.
Bhumika Goyal (2):
acerhdf: add const to thermal_cooling_device_ops structure
intel_menlow: add const to thermal_cooling_device_ops structure
drivers/platform/x86/acerhdf.c | 2 +- drivers/platform/x86/intel_menlow.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.7.4
Quoted 2 lines · Bhumika Goyal
Declare
thermal_cooling_device_opsstructures as const.
Thanks, applied to testing.
Quoted 12 lines
Bhumika Goyal (2):
acerhdf: add const tothermal_cooling_device_opsstructure
intel_menlow: add const tothermal_cooling_device_opsstructuredrivers/platform/x86/acerhdf.c | 2 +- drivers/platform/x86/intel_menlow.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)Signature · 1 line
2.7.4
Signature · 2 lines
Darren Hart VMware Open Source Technology Center