dm: gpio: request list: return the count if requests max_count reached
authorPrzemyslaw Marczak <p.marczak@samsung.com>
Tue, 31 Mar 2015 16:57:16 +0000 (18:57 +0200)
committerSimon Glass <sjg@chromium.org>
Sat, 18 Apr 2015 17:11:17 +0000 (11:11 -0600)
commit2984e7a102aec85a39827b314bc898ebb5d2fdb9
treeaa69cbadf4241af85ea80f28efb9fd906b2567b1
parentf9f788f0721350e594ce3e7978968847b057afc1
dm: gpio: request list: return the count if requests max_count reached

The function gpio_request_list_by_name_nodev() returned -ENOSPC error,
when the loop count was greater than requested count. This was wrong,
because function should return the requested gpio count, when meets
the call request without errors. Now, the loop ends on requested
max_count.

Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com>
Acked-by: Simon Glass <sjg@chromium.org>
drivers/gpio/gpio-uclass.c