Hi Krzysztof, On Mon, Mar 27, 2017 at 04:31:42PM +0200, Krzysztof Opasiak wrote: > > > On 03/27/2017 07:25 AM, Yuyang Du wrote: > >On Mon, Mar 27, 2017 at 09:07:50AM +0200, Krzysztof Opasiak wrote: > >> > >>As now we have multiple controllers I would be more than happy if we > >>could fix functions like this one to take a controller as a > >>parameter and invoke commands on it instead hardcoding loops like > >>this one with some unclear conditions like if (i > 0). > > > >You mean something like this? > > > >int parse_controller_status(int controller) { > > > > if (controller > 0) > > ... > > > > ... > > > >} > > > > Rather: > > int parse_status(controller *ctrl) > { > stat = get_status(ctrl->status_path); > > ... > } I hope I know how to get the status_path easily, but I don't. So I'll post another version with this unaddressed. Please make it in detail and I'll make another version. Thanks, Yuyang -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html