From patchwork Mon Aug 21 11:43:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9912249 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 108DD602A0 for ; Mon, 21 Aug 2017 11:45:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBEC1286E4 for ; Mon, 21 Aug 2017 11:45:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E07802875B; Mon, 21 Aug 2017 11:45:25 +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=-6.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=unavailable 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 7FC75286E4 for ; Mon, 21 Aug 2017 11:45:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753785AbdHULol (ORCPT ); Mon, 21 Aug 2017 07:44:41 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:36575 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753774AbdHULoh (ORCPT ); Mon, 21 Aug 2017 07:44:37 -0400 Received: by mail-pg0-f68.google.com with SMTP id y129so23455660pgy.3; Mon, 21 Aug 2017 04:44:36 -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:in-reply-to:references; bh=+Odrdk5Jysj0zctudhSVarf2ieI8MaYP5XF4K9PPPn4=; b=DVd9XYyDo+0EY4NfsbzLoruFE8v+6xqYpm+K50fubtMrz0eewlnDyFUw5X7PkdXyyp bBJqo+Q6TbDAri8Tz16hqEZRKxPkJ1MqvfF7m1PGR1nZ6ryyRQLExQfMjakH9+WJXO9j 7ePGVE3xG0s08+MQzV7f/enRjP+omSeji5nkRM3CCGfj5Q+y7PfEu3igYVK3U760eeR2 yAZi2q/kwYX4SFs+FnP8FBO1tvgNInJqYKthm/JePGkkhTGEHwYcOnVdMhTKClUGQazU Pbjb8Y77wY3Q128DGmp/GeolcHoWekf8f2hkImT4Q53eyJJIr68iutKjxODgAWW0cc+u DtxQ== 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:in-reply-to :references; bh=+Odrdk5Jysj0zctudhSVarf2ieI8MaYP5XF4K9PPPn4=; b=WN60zrUCZajSf37B4AOYSKrpctTfaOJ8I63iSEYGsZyaF3zyuNSBGUd3MdvcTK2NUH S6rzaDoFWPkMLLiQyluzBL3Jm8Fm9DvnBCO91SoUHcr1aGD26/mnqTJ0cWqvOSD+vD51 5fJq0T+7BbuAE9hGIyXx3B4c/8cmC8l7pj9w2Fo9ePZzjj2dFW5XkvDBRPcab3hrbH0j YIiXME517RKqgQ1Bfj5FcJT+AMWS93YUdcAIua4t0ChneDjungTP/TBMQq6cWmMM1uew lGRhOc6CT+ogA1mCaJ9MGZEfcXvmFboH2h7zXGsEPTSE0PW/0P2C/R3RRHHMnjWf3Xx9 Nm8w== X-Gm-Message-State: AHYfb5h8QkgaLH9Hj3ohL/glfkY5sELEoJwcAoMSvvBms47zVUsCpG0U VuDBhJQK5DgBfg== X-Received: by 10.98.220.194 with SMTP id c63mr5653997pfl.114.1503315876165; Mon, 21 Aug 2017 04:44:36 -0700 (PDT) Received: from gmail.com ([117.196.124.142]) by smtp.gmail.com with ESMTPSA id q9sm23568941pfa.177.2017.08.21.04.44.27 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 21 Aug 2017 04:44:35 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Mon, 21 Aug 2017 17:14:24 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, rjw@rjwysocki.net, lenb@kernel.org, jbacik@fb.com, jikos@kernel.org, benjamin.tissoires@redhat.com, manish.chopra@cavium.com, rahul.verma@cavium.com, Dept-GELinuxNICDev@cavium.com, harish.patil@cavium.com, cascardo@holoscopio.com, don@syst.com.br, dvhart@infradead.org, andy@infradead.org, sre@kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, linux-block@vger.kernel.org, nbd-general@lists.sourceforge.net, linux-input@vger.kernel.org, netdev@vger.kernel.org, platform-driver-x86@vger.kernel.org, linux-pm@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH 5/6] platform/x86: make device_attribute const Date: Mon, 21 Aug 2017 17:13:11 +0530 Message-Id: <1503315792-14837-6-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1503315792-14837-1-git-send-email-bhumirks@gmail.com> References: <1503315792-14837-1-git-send-email-bhumirks@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Make these const as they are only passed as an argument to the function device_create_file and device_remove_file and the corresponding arguments are of type const. Done using Coccinelle Signed-off-by: Bhumika Goyal Acked-by: Thadeu Lima de Souza Cascardo --- drivers/platform/x86/classmate-laptop.c | 6 +++--- drivers/platform/x86/intel-rst.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c index 55cf10b..d3715e2 100644 --- a/drivers/platform/x86/classmate-laptop.c +++ b/drivers/platform/x86/classmate-laptop.c @@ -254,7 +254,7 @@ static ssize_t cmpc_accel_sensitivity_store_v4(struct device *dev, return strnlen(buf, count); } -static struct device_attribute cmpc_accel_sensitivity_attr_v4 = { +static const struct device_attribute cmpc_accel_sensitivity_attr_v4 = { .attr = { .name = "sensitivity", .mode = 0660 }, .show = cmpc_accel_sensitivity_show_v4, .store = cmpc_accel_sensitivity_store_v4 @@ -303,7 +303,7 @@ static ssize_t cmpc_accel_g_select_store_v4(struct device *dev, return strnlen(buf, count); } -static struct device_attribute cmpc_accel_g_select_attr_v4 = { +static const struct device_attribute cmpc_accel_g_select_attr_v4 = { .attr = { .name = "g_select", .mode = 0660 }, .show = cmpc_accel_g_select_show_v4, .store = cmpc_accel_g_select_store_v4 @@ -599,7 +599,7 @@ static ssize_t cmpc_accel_sensitivity_store(struct device *dev, return strnlen(buf, count); } -static struct device_attribute cmpc_accel_sensitivity_attr = { +static const struct device_attribute cmpc_accel_sensitivity_attr = { .attr = { .name = "sensitivity", .mode = 0660 }, .show = cmpc_accel_sensitivity_show, .store = cmpc_accel_sensitivity_store diff --git a/drivers/platform/x86/intel-rst.c b/drivers/platform/x86/intel-rst.c index 7344d84..760a9bf 100644 --- a/drivers/platform/x86/intel-rst.c +++ b/drivers/platform/x86/intel-rst.c @@ -65,7 +65,7 @@ static ssize_t irst_store_wakeup_events(struct device *dev, return count; } -static struct device_attribute irst_wakeup_attr = { +static const struct device_attribute irst_wakeup_attr = { .attr = { .name = "wakeup_events", .mode = 0600 }, .show = irst_show_wakeup_events, .store = irst_store_wakeup_events @@ -111,7 +111,7 @@ static ssize_t irst_store_wakeup_time(struct device *dev, return count; } -static struct device_attribute irst_timeout_attr = { +static const struct device_attribute irst_timeout_attr = { .attr = { .name = "wakeup_time", .mode = 0600 }, .show = irst_show_wakeup_time, .store = irst_store_wakeup_time