Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1661955

[PATCH v2] platform/x86: ideapad-laptop: constify rfkill_ops structure

From Bhumika Goyal <bhumirks@gmail.com>
Newsgroups linux.kernel
Subject [PATCH v2] platform/x86: ideapad-laptop: constify rfkill_ops structure
Date 2017-06-09 08:20 +0200
Message-ID <tQlr4-6oe-17@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Add const to rfkill_ops structure as it is only passed as an argument
to the functions rfkill_alloc. This argument is of type const, 
so annotate the structure with const.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
Changes since v1:
* Split the changes to one patch per vendor.

 drivers/platform/x86/ideapad-laptop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/platform/x86/ideapad-laptop.c b/drivers/platform/x86/ideapad-laptop.c
index 24ca9fb..3beec1e 100644
--- a/drivers/platform/x86/ideapad-laptop.c
+++ b/drivers/platform/x86/ideapad-laptop.c
@@ -478,7 +478,7 @@ static int ideapad_rfk_set(void *data, bool blocked)
 	return write_ec_cmd(priv->priv->adev->handle, opcode, !blocked);
 }
 
-static struct rfkill_ops ideapad_rfk_ops = {
+static const struct rfkill_ops ideapad_rfk_ops = {
 	.set_block = ideapad_rfk_set,
 };
 
-- 
2.7.4

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v2] platform/x86: ideapad-laptop: constify rfkill_ops structure Bhumika Goyal <bhumirks@gmail.com> - 2017-06-09 08:20 +0200

csiph-web