From patchwork Sat Jul 21 19:09:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Harshit Jain X-Patchwork-Id: 10539097 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0858AA6F6 for ; Sun, 22 Jul 2018 00:57:35 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8E1E628952 for ; Sat, 21 Jul 2018 19:11:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 82D5328AC2; Sat, 21 Jul 2018 19:11:33 +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=-7.8 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI,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 749E628952 for ; Sat, 21 Jul 2018 19:11:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728166AbeGUUEW (ORCPT ); Sat, 21 Jul 2018 16:04:22 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:34618 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727554AbeGUUEW (ORCPT ); Sat, 21 Jul 2018 16:04:22 -0400 Received: by mail-wr1-f66.google.com with SMTP id c13-v6so14137956wrt.1; Sat, 21 Jul 2018 12:10:35 -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=cs0oJnLo2LfTemgdMwNzfJPIk8MN9r2ly9dw0G7v5ts=; b=Z0XelieA39SlDImtmOwEoL3K30qD6KgKX4I6m+UfwymTBb7pZra8V6jZvzzgBjXFoK XV9mcJcDdLg0OefChXGvvtMHkpVXOwlyvQaKXeItg2WkiwVsCWOY+Qwnt6UsJYXmENqT PVYKTLVBBVmGXvjL3JCTvT/POl48J7BW6O79NsBUmLVyF3YP7fsEHP1lJPQ9zIEr1U/c hp8sEygpNLy03L1s3juW/BYsRauMF2cH/QlrF0fl8ppYF1GkFxu+BFAt1ewVtrDCCRq7 dnX3BiBMk1GvF7CmgpNtznO7Zk//93k2x7lVV8S4FYmKPhI4l7qHiNJ7FDDR+1QloD1V Xa4w== 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=cs0oJnLo2LfTemgdMwNzfJPIk8MN9r2ly9dw0G7v5ts=; b=b9fPKKSTX4TIWv/tleh25BN8KB6hAl+ZoVNsTjRyskCZnsXVmJWkVih/s2YoUHp+ZD Y5gsxlo9sRODrYxl8kG7+wPjYjVgdPd/uz6CKqLZY28X3WiyrDdefsj5yF35OCmkEXCE TmY0Op8dXaHO0nNHRhtT8jg7Zo3bb0O3jk5TwA9ynL7ab9OlGic/OxFQojS1455+a8oX 8LgjFeu5+6py0U0H/Ptcd8/9GYxsj8P+VNvuXBKdivbqHUwC+XPDWiICk2KIzr6LzI5+ FKGyEsQhtoS4FO1r0EM23ekvODcRxe83ZyaG4kIQuYcIs3bFmVTbFgfj9Wl/vSCglhjR w8wg== X-Gm-Message-State: AOUpUlGBaszEEkHuUnEKKaSgSjF2Ac/yBrV9HXBpkS4IpqLRs1NpD2Xz yGmBansmQtaN2ryz3jy2iQM= X-Google-Smtp-Source: AAOMgpfGXgEpDzd9R1NzI+A00aoxc1Y07iOV9RnHmHUkv/UfZRW/4SkRPs+SIKVT32A5njvcjU38Jw== X-Received: by 2002:adf:99ea:: with SMTP id y97-v6mr4391317wrb.215.1532200234328; Sat, 21 Jul 2018 12:10:34 -0700 (PDT) Received: from localhost.localdomain ([2a01:4f8:201:1487::2]) by smtp.gmail.com with ESMTPSA id x19-v6sm4241933wrd.32.2018.07.21.12.10.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 21 Jul 2018 12:10:33 -0700 (PDT) From: dev-harsh1998 To: trivial@kernel.org Cc: Dmitry Torokhov , Andi Shyti , Simon Budig , Luca Ceresoli , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 03/11] touchscreen: ad7846: Use octal permissions Date: Sun, 22 Jul 2018 00:39:43 +0530 Message-Id: <20180721191029.25658-2-harshitjain6751@gmail.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180721191029.25658-1-harshitjain6751@gmail.com> References: <20180721191029.25658-1-harshitjain6751@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 WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); WARNING: Symbolic permissions 'S_IRUGO' are not preferred. Consider using octal permissions '0444'. +static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); Signed-off-by: dev-harsh1998 --- drivers/input/touchscreen/ads7846.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index a2f45aefce08..7c07de0802de 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -431,7 +431,7 @@ name ## _show(struct device *dev, struct device_attribute *attr, char *buf) \ return v; \ return sprintf(buf, "%u\n", adjust(ts, v)); \ } \ -static DEVICE_ATTR(name, S_IRUGO, name ## _show, NULL); +static DEVICE_ATTR(name, 0444, name ## _show, NULL); /* Sysfs conventions report temperatures in millidegrees Celsius. @@ -561,7 +561,7 @@ static ssize_t ads7846_pen_down_show(struct device *dev, return sprintf(buf, "%u\n", ts->pendown); } -static DEVICE_ATTR(pen_down, S_IRUGO, ads7846_pen_down_show, NULL); +static DEVICE_ATTR(pen_down, 0444, ads7846_pen_down_show, NULL); static ssize_t ads7846_disable_show(struct device *dev, struct device_attribute *attr, char *buf)