Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755972AbYKMWMu (ORCPT ); Thu, 13 Nov 2008 17:12:50 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751697AbYKMWMl (ORCPT ); Thu, 13 Nov 2008 17:12:41 -0500 Received: from one.firstfloor.org ([213.235.205.2]:46226 "EHLO one.firstfloor.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751192AbYKMWMk (ORCPT ); Thu, 13 Nov 2008 17:12:40 -0500 Date: Thu, 13 Nov 2008 23:22:00 +0100 From: Andi Kleen To: Jiri Slaby Cc: Alan Stern , Andi Kleen , Jiri Kosina , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] HID: don't grab devices with no input Message-ID: <20081113222200.GD3810@one.firstfloor.org> References: <491CA495.7010007@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <491CA495.7010007@gmail.com> User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 870 Lines: 27 On Thu, Nov 13, 2008 at 11:05:09PM +0100, Jiri Slaby wrote: > 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. Should I test it with that change or the original version? -Andi -- ak@linux.intel.com -- 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/