Re: [PATCH] usb: interface: allow drivers declare number of endpoints they need

From: Oliver Neukum
Date: Tue Dec 01 2015 - 02:56:23 EST


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.

Regards
Oliver


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/