From patchwork Mon Mar 6 18:54:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aaron Armstrong Skomra X-Patchwork-Id: 9607323 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 E0EED602B4 for ; Mon, 6 Mar 2017 19:04:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F10CA27B2F for ; Mon, 6 Mar 2017 19:04:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E55D927F54; Mon, 6 Mar 2017 19:04:40 +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 9519C27B2F for ; Mon, 6 Mar 2017 19:04:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754444AbdCFTEe (ORCPT ); Mon, 6 Mar 2017 14:04:34 -0500 Received: from mail-pg0-f65.google.com ([74.125.83.65]:34494 "EHLO mail-pg0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754393AbdCFTEQ (ORCPT ); Mon, 6 Mar 2017 14:04:16 -0500 Received: by mail-pg0-f65.google.com with SMTP id b5so3696201pgg.1 for ; Mon, 06 Mar 2017 11:04:15 -0800 (PST) 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=Jv3IhZXMMVo6/VroE/8696sGCU4QBsCM1z8IztH6Oks=; b=HkTGZ5irHb+VL0n8kwBvYS8G4HhPozR+pN44lHd0pDL9VUqn4CgzA/aVz6cgjecMia CmQ1SpyzU4oO4Iix+o2xzUU9rawlJhKHGV9NCcPfLAWRIyZ2ee/vnDxFUGqb4+Okbye7 L4HvJK8BCtDNq8FivMI6jerKaq5oEEuC1ICtzrhXfn8ZQUvxQRPNpBKkVjOt/+W3gKFI imeCi8eIP8te5XT88CBDGI246l5dHEpEY4qXlMteexSAqphbMtGToKA5fuMqcpsPZJ4D Its8cEYY3ShJenGMCZG1u22uwKkIG5R0JFy4Wkm+1qZDT6AX96lVFZI/PjPYZSfdot/q AtQA== 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=Jv3IhZXMMVo6/VroE/8696sGCU4QBsCM1z8IztH6Oks=; b=nRByOhAzqwO0Vi6ZEevVd7x4P/VmlwhejqZk7s80QgkEuwiB88HZBRiH5kH88VuznE Ou8qXGIN80CTKutJS6nED1K1YZVl9HE99a0bUPRUDpktRiumSqzDukw/BEK4P5AA840b xv6ggD6h7QZS/UxYSCs+ULfLWEVGfgCD3PCJ6N3zNXeZYKtAVfJKlzzsxeMP9hEfxj5+ ZKYlTB6dJxDTXtHjq3o8EXlvwiner96gTW0/FT+XOP+Rm2y3bY4cNgt9l3ZmrBT0N2d6 jMc+W3HqYNAMz2C1ixWP/FfVcLNNEPFM+s0QYStK5WWWbuvd/YoJp3wBI2BL0lwCQ91r TnkA== X-Gm-Message-State: AMke39mgE3+6xekrZZ7Jyvnx1y0kWAhNjRX2TKN8kp+7zs1JJAMteFnMM6E3xqgcTpDVrw== X-Received: by 10.84.217.133 with SMTP id p5mr29025824pli.164.1488826523155; Mon, 06 Mar 2017 10:55:23 -0800 (PST) Received: from thelibrarian.wacom.duckdns.org (71-36-101-170.ptld.qwest.net. [71.36.101.170]) by smtp.googlemail.com with ESMTPSA id r4sm41258361pgr.53.2017.03.06.10.55.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Mar 2017 10:55:22 -0800 (PST) From: Aaron Armstrong Skomra To: linux-input@vger.kernel.org, jkosina@suse.cz, pinglinux@gmail.com, Ping.Cheng@wacom.com, killertofu@gmail.com, benjamin.tissoires@redhat.com Cc: Aaron Armstrong Skomra Subject: [PATCH 2/2] HID: wacom: don't manually release resources for the EKR Date: Mon, 6 Mar 2017 10:54:58 -0800 Message-Id: <1488826498-8578-3-git-send-email-skomra@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1488826498-8578-1-git-send-email-skomra@gmail.com> References: <1488826498-8578-1-git-send-email-skomra@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 Commit 5b779fc introduces the manual release of resources in wacom_remove() as an addition to the driver's use of devm. The EKR resources can only be released through wacom_remote_destroy_one() so we skip the manual release for it. Signed-off-by: Aaron Armstrong Skomra --- drivers/hid/wacom_sys.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c index be8f7e2..994bddc 100644 --- a/drivers/hid/wacom_sys.c +++ b/drivers/hid/wacom_sys.c @@ -2579,7 +2579,9 @@ static void wacom_remove(struct hid_device *hdev) /* make sure we don't trigger the LEDs */ wacom_led_groups_release(wacom); - wacom_release_resources(wacom); + + if (wacom->wacom_wac.features.type != REMOTE) + wacom_release_resources(wacom); hid_set_drvdata(hdev, NULL); }