From patchwork Fri Jun 9 06:01:44 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9777261 X-Patchwork-Delegate: andy.shevchenko@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DD3B76034B for ; Fri, 9 Jun 2017 06:03:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C3D4527F17 for ; Fri, 9 Jun 2017 06:03:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B63CB28563; Fri, 9 Jun 2017 06:03:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_WEB autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5315B27F17 for ; Fri, 9 Jun 2017 06:03:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751504AbdFIGDU (ORCPT ); Fri, 9 Jun 2017 02:03:20 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:32993 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751501AbdFIGDU (ORCPT ); Fri, 9 Jun 2017 02:03:20 -0400 Received: by mail-pf0-f196.google.com with SMTP id f27so7551368pfe.0; Thu, 08 Jun 2017 23:03:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=qc1QUwooBUBpdLt0WUb3ONTAnT+rid51MeES/L5G0WI=; b=Mk8bxFGrXJ1EgN3hSKDvR5q9c599sDu2fR1QI/vImXg9dTb39tk2Gb9Xft1BLIBk+z tBkVGgjfR2Ox9hR2cysAoBAQ1k3bHKKgCplyAHsOJ42+7unTbCvjeJwMh78eLLFXAMdF LTV08DHsGYf3HOOKmk8Vpa1ZikOrno9VwGlQU+kEO/PuA/KDqa3a2a2F2+mPOJlIk/7i hRpjkvULIyoi6/ZTSpXK7pN6KzBG6kDng1hx/jQ0kbWUN1U/MV7v5ljTpcrQgPoS8wM2 /mkUgkW9nu7lKTIdqRU3EBwNfPe8IqovK7bGYqlEIfqmZ5iv3KE0I5ovGMZ/0czDJnRS 22xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qc1QUwooBUBpdLt0WUb3ONTAnT+rid51MeES/L5G0WI=; b=GyRqGBAqnhvv/S12L42w3o2T753Ipt0U5AVH1C+jtKy0xyhqhWTs3K+Ekgg4/SfBab OQMrDX8xjZQfpfDR55ylzuI8Y19yhOYkxwv7JKAmBFAOgFaa2wqKA8VNlz5nYoZYWcVk IyS6R5CrrBd6H3s5eFoLMEKGxvpLAbqZ189yi/YjQ79SiYGzspr+4bOY0vtYahukKaUG nZyyZvy5p6V/Bf5ZnihKNy42hSAONFJpT1277z4UtkXtCCvFmRIpGaOh3I8ch1eCNRW1 Ud1UzgNokIn6+h8SZxRHn6cmXuV6hzcttu2rtJxMIdJzE/v+8TdW8NoNYzspmWNRdArx fd+A== X-Gm-Message-State: AODbwcBN/6WbrirQahsnW2FHUo6lBcEZC2IXqoIb4ZAjitQXM2TCphAB jQYocNfWbI+3kA== X-Received: by 10.84.209.238 with SMTP id y101mr38336131plh.290.1496988199212; Thu, 08 Jun 2017 23:03:19 -0700 (PDT) Received: from gmail.com ([106.51.8.234]) by smtp.gmail.com with ESMTPSA id z7sm519599pfi.43.2017.06.08.23.03.14 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 08 Jun 2017 23:03:18 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Fri, 09 Jun 2017 11:31:50 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, corentin.chary@gmail.com, dvhart@infradead.org, andy@infradead.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH v2] platform/x86: samsung-laptop: constify rfkill_ops structures Date: Fri, 9 Jun 2017 11:31:44 +0530 Message-Id: <1496988104-29001-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: platform-driver-x86-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- Changes since v1: * Split the changes to one patch per vendor. drivers/platform/x86/samsung-laptop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/platform/x86/samsung-laptop.c b/drivers/platform/x86/samsung-laptop.c index 8c146e2..e1e8897 100644 --- a/drivers/platform/x86/samsung-laptop.c +++ b/drivers/platform/x86/samsung-laptop.c @@ -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, };