Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934111AbaKMUov (ORCPT ); Thu, 13 Nov 2014 15:44:51 -0500 Received: from mail-oi0-f41.google.com ([209.85.218.41]:64310 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933888AbaKMUot (ORCPT ); Thu, 13 Nov 2014 15:44:49 -0500 MIME-Version: 1.0 In-Reply-To: References: <1415909806-23848-1-git-send-email-bleung@chromium.org> Date: Thu, 13 Nov 2014 12:44:48 -0800 X-Google-Sender-Auth: cemqX1PTPikXF8aLM2m0zbQ7CAE Message-ID: Subject: Re: [PATCH] HID: usbhid: get/put around clearing needs_remote_wakeup From: Benson Leung To: Alan Stern Cc: johan@kernel.org, Jiri Kosina , linux-usb@vger.kernel.org, "linux-input@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Sameer Nanda Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 13, 2014 at 12:41 PM, Alan Stern wrote: > usbhid_stop probably doesn't need it. And it should be possible to fix > usbhid_close more easily just by interchanging the two lines: > > - usb_kill_urb(usbhid->urbin); > usbhid->intf->needs_remote_wakeup = 0; > + usb_kill_urb(usbhid->urbin); > > Have you tried this? Yes, I tried that as well, and that does work. I used the get/put because that's the way it was done in other drivers, for example in synusb_close() in drivers/input/mouse/synaptics_usb.c -- Benson Leung Software Engineer, Chrom* OS bleung@chromium.org -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/