platform/x86: samsung-laptop: constify rfkill_ops structures
authorBhumika Goyal <bhumirks@gmail.com>
Fri, 9 Jun 2017 06:01:44 +0000 (11:31 +0530)
committerDarren Hart (VMware) <dvhart@infradead.org>
Tue, 13 Jun 2017 18:00:19 +0000 (11:00 -0700)
Add const to rfkill_ops structures that are only passed as an argument
to the functions rfkill_alloc or samsung_new_rfkill. These arguments are
of type const, so such structures can be annotated with const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
drivers/platform/x86/samsung-laptop.c

index 1aa1173..5c4dfe4 100644 (file)
@@ -591,7 +591,7 @@ static int seclinux_rfkill_set(void *data, bool blocked)
                                 !blocked);
 }
 
-static struct rfkill_ops seclinux_rfkill_ops = {
+static const struct rfkill_ops seclinux_rfkill_ops = {
        .set_block = seclinux_rfkill_set,
 };
 
@@ -651,7 +651,7 @@ static void swsmi_rfkill_query(struct rfkill *rfkill, void *priv)
        rfkill_set_sw_state(rfkill, !ret);
 }
 
-static struct rfkill_ops swsmi_rfkill_ops = {
+static const struct rfkill_ops swsmi_rfkill_ops = {
        .set_block = swsmi_rfkill_set,
        .query = swsmi_rfkill_query,
 };