]> git.baikalelectronics.ru Git - kernel.git/commit
usbip: vudc: Refactor init_vudc_hw() to be more obvious
authorKrzysztof Opasiak <k.opasiak@samsung.com>
Fri, 2 Dec 2016 17:42:22 +0000 (18:42 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Dec 2016 14:08:45 +0000 (15:08 +0100)
commit9a6d08d13844aa5fd8136da5ba3b5b3382c54dc0
tree3f59c11ad5114ad88d4ca8e40ca0fec1bfd4228d
parent4331a96912e4753a48faed107bfc3647096c7b3e
usbip: vudc: Refactor init_vudc_hw() to be more obvious

Current implementation of init_vudc_hw() adds ep0 to ep_list
and then after looping through all endpoints removes it from
that list.

As this may be misleading let's refactor this function
and avoid adding and removing ep0 to eplist and place it
immediately in correct place.

In addition let's remove redundant 0 assignments as ep
array is zeroed during allocation.

Signed-off-by: Krzysztof Opasiak <k.opasiak@samsung.com>
Acked-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/usbip/vudc_dev.c