From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jiri Slaby Subject: Re: [PATCH] HID: don't grab devices with no input Date: Thu, 13 Nov 2008 23:05:09 +0100 Message-ID: <491CA495.7010007@gmail.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: Received: from ey-out-2122.google.com ([74.125.78.24]:7309 "EHLO ey-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751598AbYKMWFT (ORCPT ); Thu, 13 Nov 2008 17:05:19 -0500 Received: by ey-out-2122.google.com with SMTP id 6so474369eyi.37 for ; Thu, 13 Nov 2008 14:05:17 -0800 (PST) In-Reply-To: Sender: linux-input-owner@vger.kernel.org List-Id: linux-input@vger.kernel.org To: Alan Stern Cc: Andi Kleen , Jiri Kosina , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org On 11/13/2008 10:37 PM, Alan Stern wrote: >> + for (n = 0; n < interface->desc.bNumEndpoints; n++) >> + if (usb_endpoint_dir_in(&interface->endpoint[n].desc)) >> + has_in++; >> + if (!has_in) { >> + dev_err(&intf->dev, "couldn't find an input interrupt " >> + "endpoint"); >> + return -ENODEV; >> + } >> + > > Do you want to use usb_endpoint_is_int_in() instead? It matches the > error message more closely. Yes, good catch, thanks.