From patchwork Wed Aug 2 17:09:55 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bhumika Goyal X-Patchwork-Id: 9877197 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 5DE3E602BC for ; Wed, 2 Aug 2017 17:12:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 419E828807 for ; Wed, 2 Aug 2017 17:12:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 360AD2880C; Wed, 2 Aug 2017 17:12:54 +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=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 D8B2A28807 for ; Wed, 2 Aug 2017 17:12:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752754AbdHBRMZ (ORCPT ); Wed, 2 Aug 2017 13:12:25 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:38341 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbdHBRKF (ORCPT ); Wed, 2 Aug 2017 13:10:05 -0400 Received: by mail-pg0-f68.google.com with SMTP id 123so5278445pga.5; Wed, 02 Aug 2017 10:10:05 -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=fjz+vc+iG+KOJ92i1QprmpWra0XfKrrH4+T1RqIjTf4=; b=ZrRPGTIK9yTn25B6QXId9eVkgZGTrvFFIlBOe9uz4OgG1AFwCRftaXs5Fk84G7tzMd a0fenMZW9VgYDszRYtqp7e39Tnqq5aiI7Ig8EfWXBn5yNtCa9P0sF60K27ugyQMMzWDS fZRyRy6wfaTwEn0CI8cLPhambqB4OYIOTc7CAzQ8EZw6JnIUGp405T6RTjU8ZMTl+71x yEaHrK1zy1H4vA7PcJOun+yT0OF94Lq4U+QR/2Yy2WsVTMdnin7o78GBmOjmsBSKX9y7 SxWK1ppXX51Lx328diNZgKBbY8efuF+ZQbuTebLJAAb5JaNdieMe2rpb5KYWI7aljfdj oflA== 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=fjz+vc+iG+KOJ92i1QprmpWra0XfKrrH4+T1RqIjTf4=; b=FEz+oDEnayGX9UWDbdWo/BABntsBClDqDgerLzgXsfIEmqgfJzGXRP8LmFCJWYG8mQ chANpQZglWobpqd7GR0aKpMbFHxGvnYckDVLQs4chTIj1FX/jEu4HOKFFXUvxng+q3WO 0qGCIbwMVkHby8AguP4YXcmBwPaF0ljAtvM6luqo6Rg22A0t6nmRLrL/JjTm/tg5bNBk lKwyYfPga95aLkvYSCp9zJDzVOsr2GL3mIFoMGlYp6BU20XXiBPoOobUZJuR/e8Xs45n j7OIgF/ZfhLtGu2Nqvmg8WWBIdXuFjAgjO2zIxI7cBgNOI79ixcJ0O3W04/VGBjdjABd GfDQ== X-Gm-Message-State: AIVw111sVcvNX9kQjPaWMH7gT0jjRiY0MHTN9G0tkUlEgUFk7HSDNHky Yq3MgcV8H43xXg== X-Received: by 10.84.133.37 with SMTP id 34mr26615208plf.221.1501693804920; Wed, 02 Aug 2017 10:10:04 -0700 (PDT) Received: from gmail.com ([117.196.96.230]) by smtp.gmail.com with ESMTPSA id m65sm31285148pfi.94.2017.08.02.10.09.59 (version=TLS1 cipher=AES128-SHA bits=128/128); Wed, 02 Aug 2017 10:10:03 -0700 (PDT) Received: by gmail.com (sSMTP sendmail emulation); Wed, 02 Aug 2017 22:39:56 +0530 From: Bhumika Goyal To: julia.lawall@lip6.fr, bernie@plugable.com, b.zolnierkie@samsung.com, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Bhumika Goyal Subject: [PATCH] video: fbdev: add const to bin_attribute structures Date: Wed, 2 Aug 2017 22:39:55 +0530 Message-Id: <1501693795-13090-1-git-send-email-bhumirks@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add const to bin_attribute structures as they are only passed to the functions sysfs_{remove/create}_bin_file or device_{remove/create}_bin_file. The corresponding arguments are of type const, so declare the structures to be const. Signed-off-by: Bhumika Goyal --- drivers/video/fbdev/aty/radeon_base.c | 4 ++-- drivers/video/fbdev/udlfb.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index dba479e..1e2ec36 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -2241,7 +2241,7 @@ static ssize_t radeon_show_edid2(struct file *filp, struct kobject *kobj, return radeon_show_one_edid(buf, off, count, rinfo->mon2_EDID); } -static struct bin_attribute edid1_attr = { +static const struct bin_attribute edid1_attr = { .attr = { .name = "edid1", .mode = 0444, @@ -2250,7 +2250,7 @@ static ssize_t radeon_show_edid2(struct file *filp, struct kobject *kobj, .read = radeon_show_edid1, }; -static struct bin_attribute edid2_attr = { +static const struct bin_attribute edid2_attr = { .attr = { .name = "edid2", .mode = 0444, diff --git a/drivers/video/fbdev/udlfb.c b/drivers/video/fbdev/udlfb.c index 05ef657..4454eb4 100644 --- a/drivers/video/fbdev/udlfb.c +++ b/drivers/video/fbdev/udlfb.c @@ -1465,7 +1465,7 @@ static ssize_t metrics_reset_store(struct device *fbdev, return count; } -static struct bin_attribute edid_attr = { +static const struct bin_attribute edid_attr = { .attr.name = "edid", .attr.mode = 0666, .size = EDID_LENGTH,