From patchwork Tue Jul 14 01:03:45 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Gerecke, Jason" X-Patchwork-Id: 6783001 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2C910C05AC for ; Tue, 14 Jul 2015 01:03:58 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 58514206FA for ; Tue, 14 Jul 2015 01:03:57 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 692F720706 for ; Tue, 14 Jul 2015 01:03:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753088AbbGNBDz (ORCPT ); Mon, 13 Jul 2015 21:03:55 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:34415 "EHLO mail-pa0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753078AbbGNBDz (ORCPT ); Mon, 13 Jul 2015 21:03:55 -0400 Received: by pacan13 with SMTP id an13so24559621pac.1 for ; Mon, 13 Jul 2015 18:03:54 -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:in-reply-to:references; bh=KlVYfY30KuDmazpqy9XeseWLNet6dKIKdPwCTUwW6c4=; b=qSOtFg8iDRLDFbzi8dYOs4ZNuEdvEiQZIb+4SsPWPx89v3PU0dek+Mt84ue2r+BPcY a47IwEF+Acq6sOkorwrKigQaVBBR6Y1KhTfRDhxxTt5YW6rGDfFrKm1xWQQ+l6IxGJsQ iZa+iw+qbNzy4+KjNDShOFv0OCHp3k0n4W3FL+5ZpqYmpZ5febjFWIgWmYaBKyEAMDW+ izjz09rQexslbq4LjKT7IZSNpNAJexdNQY+jJs2iaaei5KUjXCKPbsFZGcnw+/qU6ept 2chEJcLNgKxdq6AJmfB4gHQjzFeb7DAzVbcAldT2V3rHii/UBXsriH3O6y2tk3W7+Qgc qlsA== X-Received: by 10.68.225.97 with SMTP id rj1mr75368817pbc.108.1436835834898; Mon, 13 Jul 2015 18:03:54 -0700 (PDT) Received: from wacom-arch2.localdomain ([67.51.163.2]) by smtp.gmail.com with ESMTPSA id so5sm3615164pab.37.2015.07.13.18.03.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 13 Jul 2015 18:03:53 -0700 (PDT) From: Jason Gerecke To: Jiri Kosina , Ping Cheng , Aaron Skomra , Benjamin Tissoires Cc: linux-input@vger.kernel.org, Jason Gerecke , Jason Gerecke Subject: [PATCH 2/2] HID: wacom: Set default device name to value from wacom->features Date: Mon, 13 Jul 2015 18:03:45 -0700 Message-Id: <1436835825-15380-2-git-send-email-killertofu@gmail.com> X-Mailer: git-send-email 2.4.5 In-Reply-To: <1436835825-15380-1-git-send-email-killertofu@gmail.com> References: <1436835825-15380-1-git-send-email-killertofu@gmail.com> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.2 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 Allocated input devices should not use the 'pen_name' by default since we do not know at that point in time if that is an appropriate choice of name. Instead, use the (tool-agnostic) name that is stored in the device's 'wacom_features' structure. This also has the nice side-effect of requring us to be explicit about the naming of the pen device, as we already are for touch and pad devices. Signed-off-by: Jason Gerecke --- drivers/hid/wacom_sys.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index 3512d83..2a22163 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -1130,7 +1130,7 @@ static struct input_dev *wacom_allocate_input(struct wacom *wacom) if (!input_dev) return NULL; - input_dev->name = wacom_wac->pen_name; + input_dev->name = wacom_wac->features.name; input_dev->phys = hdev->phys; input_dev->dev.parent = &hdev->dev; input_dev->open = wacom_open; @@ -1183,6 +1183,7 @@ static int wacom_allocate_inputs(struct wacom *wacom) return -ENOMEM; } + wacom_wac->pen_input->name = wacom_wac->pen_name; wacom_wac->touch_input->name = wacom_wac->touch_name; wacom_wac->pad_input->name = wacom_wac->pad_name;