From patchwork Thu Jun 8 11:17:31 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9774433 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 E755C6034B for ; Thu, 8 Jun 2017 11:19:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC85627F10 for ; Thu, 8 Jun 2017 11:19:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE331283BD; Thu, 8 Jun 2017 11:19:18 +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 5F04C27F10 for ; Thu, 8 Jun 2017 11:19:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750822AbdFHLTR (ORCPT ); Thu, 8 Jun 2017 07:19:17 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33376 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750788AbdFHLTQ (ORCPT ); Thu, 8 Jun 2017 07:19:16 -0400 Received: by mail-pf0-f196.google.com with SMTP id f27so4787855pfe.0; Thu, 08 Jun 2017 04:19:16 -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=zIXI9AnaI3oI9OhA1LCyNDk7mPhD1iuzetkmfM2WdLM=; b=TCNEUgmN5jtR+CJBvKKYYEWTXBP5lGKbd38GmUXtPeRYcc+THNbUFmt0TJgQT5l0v+ lw24CiiJpBDAaWQSYbv7VE1QYvMnE2S5rxHdTenqYHLak8GuQFi2vfkJFiF5aC4vsJd9 61ZWNOXkpuSuPM0aBhU4t3nWzbHDEQz6OogYpjhkJc7XyvtJzHvpec7j1WZKrRtoNnre dWBGclmPPUKMXdRGBdaV4OwAN3Tt9dmleZqPLzZGeAKzXTmotoypYijthXZAEKarD7z1 L8awH16CCNmZ+qfjiA0cgIhsnPDfs3dOqXBWIL4CpvAnlkQDyHlgV53wvgXe44RZRL8+ 6c4Q== 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=zIXI9AnaI3oI9OhA1LCyNDk7mPhD1iuzetkmfM2WdLM=; b=RDf8UDmGb4+/e/1YEEfElAWA+LBkUJlFrEz0yuHF1NhqNxbVQJ/tJWOTOAo2pAOtAO hvuup+nwNL0so8bWZ25XVC9/KmuEeMUZZTuSpI2qE+T38BaIwbk9fnO3oEQa2xlS87Nc nBsrLlpJg0BeQQVaRvKdemcvDZe4KDWHjQLuAewmBSf3lqVFhed4R6o6avB/cdj1wh5G 33aU84x3GMLH77O759+C/KrPVvS22rwz3m6IeG4/j5LzC3E4zKuQk8DJRwg9jYtKkass DgEsLrqpbFQQytQMydWLqf9pQEQnJUGU+fGPBAmITL3wO9wOuOkUCdqsUtk+GAPePTJV QIqw== X-Gm-Message-State: AODbwcAYUv+gmlBDjQLcSdBUMfNtIgq96qm0/Acf3uhjlFCMQ/SfGSxP ad+X9QjpxmrzYQ== X-Received: by 10.84.217.149 with SMTP id p21mr33500285pli.121.1496920755925; Thu, 08 Jun 2017 04:19:15 -0700 (PDT) Received: from gmail.com ([106.51.8.234]) by smtp.gmail.com with ESMTPSA id e18sm4368259pfk.118.2017.06.08.04.19.04 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 08 Jun 2017 04:19:14 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Thu, 08 Jun 2017 16:47:36 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, pali.rohar@gmail.com, dvhart@infradead.org, andy@infradead.org, ike.pan@canonical.com, corentin.chary@gmail.com, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] platform/x86: constify rfkill_ops structures Date: Thu, 8 Jun 2017 16:47:31 +0530 Message-Id: <1496920651-20298-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 --- drivers/platform/x86/dell-rbtn.c | 2 +- drivers/platform/x86/ideapad-laptop.c | 2 +- drivers/platform/x86/samsung-laptop.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/platform/x86/dell-rbtn.c b/drivers/platform/x86/dell-rbtn.c index dcd9f40..6b5bbaf 100644 --- a/drivers/platform/x86/dell-rbtn.c +++ b/drivers/platform/x86/dell-rbtn.c @@ -110,7 +110,7 @@ static int rbtn_rfkill_set_block(void *data, bool blocked) return -EINVAL; } -static struct rfkill_ops rbtn_ops = { +static const struct rfkill_ops rbtn_ops = { .query = rbtn_rfkill_query, .set_block = rbtn_rfkill_set_block, }; 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, }; 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, };