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);
...
}
Best regards,
--
Krzysztof Opasiak
Samsung R&D Institute Poland
Samsung Electronics
--
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