Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756309AbbLARHz (ORCPT ); Tue, 1 Dec 2015 12:07:55 -0500 Received: from mail.linuxfoundation.org ([140.211.169.12]:47871 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754046AbbLARHy (ORCPT ); Tue, 1 Dec 2015 12:07:54 -0500 Date: Tue, 1 Dec 2015 09:07:52 -0800 From: Greg Kroah-Hartman To: Oliver Neukum Cc: Dmitry Torokhov , Alan Stern , Felipe Balbi , Vladis Dronov , USB list , lkml Subject: Re: [PATCH] usb: interface: allow drivers declare number of endpoints they need Message-ID: <20151201170752.GB2714@kroah.com> References: <20151130211150.GA38770@dtor-ws> <20151130221825.GA6426@kroah.com> <20151130233653.GB8414@kroah.com> <20151201010909.GA13673@kroah.com> <1448956437.27886.2.camel@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1448956437.27886.2.camel@suse.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1475 Lines: 34 On Tue, Dec 01, 2015 at 08:53:57AM +0100, Oliver Neukum wrote: > On Mon, 2015-11-30 at 17:09 -0800, Greg Kroah-Hartman wrote: > > > that would loop through endpoints so that drivers do not have to > > > open-code the loop and we indeed need to fix the drivers that > > blindly > > > grab endpoints at fixed offsets and expect them to be there and have > > > correct types. > > > > Yes, that would work for one single type of endpoint, but lots of > > drivers need/have 2 of the same type/direction, so what would this > > function do then? Error out? Hm, that might work, and it would > > reduce > > a bunch of common code, care to make up a patch for that? > > Hi, > > in that case let us go the whole way. Give drivers a way to describe > what they need that covers all possibilities up to exactly telling the > core what it expects and in which order and numbers. > Actually that would be better in the interface matching code path. Trying to describe a static, or variable, number of endpoints, for each interface and endpoint type, and then add that information to the usb_device_id structure and common macros, and then touch all users of those macros, might be a bit too much work to do here... :) thanks, greg k-h -- 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/