From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751453AbdFBHb2 (ORCPT ); Fri, 2 Jun 2017 03:31:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46604 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751180AbdFBHbM (ORCPT ); Fri, 2 Jun 2017 03:31:12 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 481F637EEC Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx05.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=benjamin.tissoires@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 481F637EEC Date: Fri, 2 Jun 2017 09:31:00 +0200 From: Benjamin Tissoires To: Carlo Caione Cc: jikos@kernel.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, linux@endlessm.com, Carlo Caione Subject: Re: [PATCH] HID: asus: Stop underlying hardware on remove Message-ID: <20170602073100.GL1293@mail.corp.redhat.com> References: <20170530203946.9346-1-carlo@caione.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20170530203946.9346-1-carlo@caione.org> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 02 Jun 2017 07:31:06 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On May 30 2017 or thereabouts, Carlo Caione wrote: > 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. Good catch: Reviewed-by: Benjamin Tissoires Cheers, Benjamin > > Signed-off-by: Carlo Caione > --- > 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, > -- > 2.9.3 >