From patchwork Tue May 30 20:39:46 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlo Caione X-Patchwork-Id: 9755227 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 E3D54602F0 for ; Tue, 30 May 2017 20:40:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D81B2281E1 for ; Tue, 30 May 2017 20:40:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CB9CA28405; Tue, 30 May 2017 20:40:01 +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_SIGNED, 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 B5E30281E1 for ; Tue, 30 May 2017 20:40:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750885AbdE3Uj7 (ORCPT ); Tue, 30 May 2017 16:39:59 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:33341 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750811AbdE3Uj6 (ORCPT ); Tue, 30 May 2017 16:39:58 -0400 Received: by mail-pf0-f196.google.com with SMTP id f27so20359363pfe.0; Tue, 30 May 2017 13:39:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id; bh=8+1/TD3iOByyOQCwtf52LbKMEhcGNTCrGlGkPYraKaI=; b=cbPcu3ji39IEUHKHLyoT8L9W0nednfVUo0u7vWBc4D/agmxs2lbmHz/tV9VZwU6NRA g1fv+fYBW0DOb0uDfQUp1sKwNj1bOGEdpI92KkXrJu1vo/7aAszqhmXPOd4ojH+gDOzs neZ5PoY0vRBwM5rd987nKzxaxnjgyznJOUHclhSmY5lEPFXmxKZpyyei85psO+ih29xU 0f7jnZsWvDtzOR9k0gMuQ1Rpcm0dHBYxmbLzCClwGoR1OSvH6CHw3NfYd0MxWOZsukR0 inURdf0BllIjBUoCBB8qITnkaYJZHvRDzBxPZHnu82Q5DDe8R4hlGPWvxBU+oLrkdAQE R3GA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id; bh=8+1/TD3iOByyOQCwtf52LbKMEhcGNTCrGlGkPYraKaI=; b=gEcSdym2/3BFf1YsXRqN27YWpQY9SJjSD+gZdwT/1rYKwOJ/V2acXblX6tbgRXTQVg 9n14ZZdZ7pL0Zf6brj8y2QNcUFZRV6ek1IHdAud1ySkp7rxOmVQ1vI2UvkbxwRrUUsym j0R/2LXEwv1+ufpX1pPEuZMHV3V8i7PXSMZYzKwKNnODOXGBkR9DwWiFfSew3XKgGezj NOPNIzetYcgRcfa1CwGIBrY+8rsH0EPVdrbKzctpk/47t1t6Z13eWwyLfBm/JAEaJA8d oEwVdwQpDbP4Xi5OPsesiupp8nTgfRcsYImN71XCO2pJXON8yLG9fL3Kq2JqzNr156xS 58ew== X-Gm-Message-State: AODbwcD48qCDjFYfN86rBuFwAoL0gIWJOgC5FT7lk3Biv7/fOQLFDkA5 upBq4vlzy95vAw== X-Received: by 10.98.95.68 with SMTP id t65mr26208293pfb.152.1496176798237; Tue, 30 May 2017 13:39:58 -0700 (PDT) Received: from mephisto.endlessm-sf.com (host171-33-dynamic.248-95-r.retail.telecomitalia.it. [95.248.33.171]) by smtp.gmail.com with ESMTPSA id g75sm22979933pfd.83.2017.05.30.13.39.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 30 May 2017 13:39:57 -0700 (PDT) From: Carlo Caione To: jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux@endlessm.com Cc: Carlo Caione Subject: [PATCH] HID: asus: Stop underlying hardware on remove Date: Tue, 30 May 2017 22:39:46 +0200 Message-Id: <20170530203946.9346-1-carlo@caione.org> X-Mailer: git-send-email 2.9.3 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 From: Carlo Caione We are missing a call to hid_hw_stop() on the remove hook. Among other things this is causing an Oops when (re-)starting GNOME / upowerd / ... after the module has been already rmmod-ed. Signed-off-by: Carlo Caione Reviewed-by: Benjamin Tissoires --- drivers/hid/hid-asus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/hid/hid-asus.c b/drivers/hid/hid-asus.c index 16df6cc..2e9642d 100644 --- a/drivers/hid/hid-asus.c +++ b/drivers/hid/hid-asus.c @@ -536,6 +536,8 @@ static void asus_remove(struct hid_device *hdev) drvdata->kbd_backlight->removed = true; cancel_work_sync(&drvdata->kbd_backlight->work); } + + hid_hw_stop(hdev); } static __u8 *asus_report_fixup(struct hid_device *hdev, __u8 *rdesc,