gpiolib: Use list_first_entry()/list_last_entry()

Use list_first_entry()/list_last_entry() instead of open coded variants.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
1 file changed