platform/x86: acerhdf: Add const to thermal_cooling_device_ops structure
authorBhumika Goyal <bhumirks@gmail.com>
Wed, 21 Jun 2017 07:04:16 +0000 (12:34 +0530)
committerDarren Hart (VMware) <dvhart@infradead.org>
Wed, 21 Jun 2017 21:12:46 +0000 (14:12 -0700)
Declare 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.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/acerhdf.c

index 2acdb0d6ea8983f82ed23a28e2408ab37a6f0ce7..ea22591ee66feb9c08d8a831cbb822d8b9ab7591 100644 (file)
@@ -557,7 +557,7 @@ err_out:
 }
 
 /* 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,