From patchwork Thu Aug 29 23:04:58 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ping Cheng X-Patchwork-Id: 2851636 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DDC619F3DC for ; Thu, 29 Aug 2013 23:05:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0508420497 for ; Thu, 29 Aug 2013 23:05:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E8F6120466 for ; Thu, 29 Aug 2013 23:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756104Ab3H2XFG (ORCPT ); Thu, 29 Aug 2013 19:05:06 -0400 Received: from mail-pd0-f175.google.com ([209.85.192.175]:55819 "EHLO mail-pd0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755316Ab3H2XFF (ORCPT ); Thu, 29 Aug 2013 19:05:05 -0400 Received: by mail-pd0-f175.google.com with SMTP id q10so1061294pdj.34 for ; Thu, 29 Aug 2013 16:05:04 -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=qTITCRBmi2tgrOPQ6dtcJ77zPKCXAH06wGOcyRlGHr0=; b=hsps5Ovr+Z+r41sbH9EoVlZ5GaPuao4I6PWdPjga9pTsRDeOvBltpZz8s2v41gGZFY aZfrzB8qKc3XSvuoUpyAUsESD/jp3qtvKlSMAfhEUxzYI4yb6zKvdb0b5q0MHMxhCVkW U8dDS4hxTjGDHnBGaDg89maYkrJ/AN9+Y9WupBXFug6fRZA33Tpd2bvNfZn4AlthXJKY 9hv6GadyJHA0QkvqN303Oxr8lsJV7b7URbxF+u+7Z20onqCZYOY+cTSNVbQtrt9YZx6w rc0yiy6wqUmh3KeaZqw2fvnC9XQvDW6YItjYGf/o/e5Ip0+ACehfQgwEP/CYRVVHY1gk 8iZA== X-Received: by 10.66.231.104 with SMTP id tf8mr7132511pac.59.1377817504386; Thu, 29 Aug 2013 16:05:04 -0700 (PDT) Received: from wacom-XPS-8500.wacom.com ([67.51.163.2]) by mx.google.com with ESMTPSA id yo2sm43466301pab.8.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 29 Aug 2013 16:05:03 -0700 (PDT) From: Ping Cheng To: linux-input@vger.kernel.org Cc: dmitry.torokhov@gmail.com, Ping Cheng Subject: [PATCH 2/2] Input: wacom - LED is only suported through digitizer interface Date: Thu, 29 Aug 2013 16:04:58 -0700 Message-Id: <1377817498-29799-1-git-send-email-pingc@wacom.com> X-Mailer: git-send-email 1.8.1.2 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 Signed-off-by: Ping Cheng --- drivers/input/tablet/wacom_sys.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/drivers/input/tablet/wacom_sys.c b/drivers/input/tablet/wacom_sys.c index 1c70a8d..f1469e4 100644 --- a/drivers/input/tablet/wacom_sys.c +++ b/drivers/input/tablet/wacom_sys.c @@ -978,14 +978,17 @@ static int wacom_initialize_leds(struct wacom *wacom) case INTUOS5S: case INTUOS5: case INTUOS5L: - wacom->led.select[0] = 0; - wacom->led.select[1] = 0; - wacom->led.llv = 32; - wacom->led.hlv = 0; - wacom->led.img_lum = 0; - - error = sysfs_create_group(&wacom->intf->dev.kobj, - &intuos5_led_attr_group); + if (wacom->wacom_wac.features.device_type == BTN_TOOL_PEN) { + wacom->led.select[0] = 0; + wacom->led.select[1] = 0; + wacom->led.llv = 32; + wacom->led.hlv = 0; + wacom->led.img_lum = 0; + + error = sysfs_create_group(&wacom->intf->dev.kobj, + &intuos5_led_attr_group); + } else + return 0; break; default: @@ -1021,8 +1024,9 @@ static void wacom_destroy_leds(struct wacom *wacom) case INTUOS5S: case INTUOS5: case INTUOS5L: - sysfs_remove_group(&wacom->intf->dev.kobj, - &intuos5_led_attr_group); + if (wacom->wacom_wac.features.device_type == BTN_TOOL_PEN) + sysfs_remove_group(&wacom->intf->dev.kobj, + &intuos5_led_attr_group); break; } }