From patchwork Wed Sep 10 18:40:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 4879621 X-Patchwork-Delegate: jikos@jikos.cz Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AF684C0338 for ; Wed, 10 Sep 2014 18:40:18 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E7DA720142 for ; Wed, 10 Sep 2014 18:40:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id ACA3920123 for ; Wed, 10 Sep 2014 18:40:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752562AbaIJSkP (ORCPT ); Wed, 10 Sep 2014 14:40:15 -0400 Received: from mail-pd0-f172.google.com ([209.85.192.172]:43193 "EHLO mail-pd0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752363AbaIJSkO (ORCPT ); Wed, 10 Sep 2014 14:40:14 -0400 Received: by mail-pd0-f172.google.com with SMTP id v10so12879643pde.3 for ; Wed, 10 Sep 2014 11:40:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=86R8LamQDL/I8s9qucuMQIpKzO1WiLG7A8PvJWXXwv4=; b=z1mTZK7rqSMpvM+I2xb7wHsiqJ6gnnSUH/UW+cAUkzqe8g/4PLprz6N9gg5iInxLTL jWeLCfIYUar5j2JK0pLHzbNgXC7Oo1rUUlBAzLNui0NKQhV+EVkvld56WCWJQA0dq3Qc wFNPojfGz/HcaigyvxIORjTrrnW/zFrjUwy6Y/A4DbCRMjYQ2ILw9xBXfNbbMHs+BFYV bNhwOtnoYx2SkWdA9Xu/oY3jroil6kq5eMcEZiwoeKcsNzXpCtoCnXWdn8RtepGggZdq 5ctyZbZFOVphmfr0DYVxGJkSsLdub4sV/wr5xq/kzf1NEN0/YgG1hBWTaalaGZLHh+cq cnXw== X-Received: by 10.68.190.229 with SMTP id gt5mr40577888pbc.15.1410374414431; Wed, 10 Sep 2014 11:40:14 -0700 (PDT) Received: from wacom-XPS-8500.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPSA id ka1sm14502537pbd.70.2014.09.10.11.40.12 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Sep 2014 11:40:13 -0700 (PDT) From: Ping Cheng X-Google-Original-From: Ping Cheng To: jkosina@suse.cz Cc: killertofu@gmail.com, linux-input@vger.kernel.org, Ping Cheng , "Paul A. Tessier" Subject: [PATCH 1/4] HID: wacom - Add default permission defines for sysfs attributes Date: Wed, 10 Sep 2014 11:40:04 -0700 Message-Id: <1410374404-25832-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.9.1 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-9.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP RW : ug=rw,o=r WO : ug=w Signed-off-by: Paul A. Tessier Signed-Off-by: Ping Cheng Tested-by: Benjamin Tissoires --- drivers/hid/wacom_sys.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index f0db7ec..2ce102b 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -23,6 +23,9 @@ #define WAC_CMD_ICON_BT_XFER 0x26 #define WAC_CMD_RETRIES 10 +#define DEV_ATTR_RW_PERM (S_IRUGO | S_IWUSR | S_IWGRP) +#define DEV_ATTR_WO_PERM (S_IWUSR | S_IWGRP) + static int wacom_get_report(struct hid_device *hdev, u8 type, u8 id, void *buf, size_t size, unsigned int retries) {