gpiolib: Embed iterator variable into for_each_gpio_desc_with_flag()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Fri, 8 Apr 2022 18:18:50 +0000 (21:18 +0300)
committerBartosz Golaszewski <brgl@bgdev.pl>
Sat, 9 Apr 2022 20:37:48 +0000 (22:37 +0200)
commit57017edd46f835c85642fe8299f13b0db61d4c31
tree81235681e68566e5b4717ba9d0cdc4782f3a209e
parent24a9dbb1c1575b9890bb7d9028cc89894da6dc22
gpiolib: Embed iterator variable into for_each_gpio_desc_with_flag()

The iterator loop is used exclusively to get a descriptor, which in its
turn is what is being used by the caller. Embed the iterator variable
into the loop in the for_each_gpio_desc_with_flag() macro helper.

Suggested-by: Bartosz Golaszewski <brgl@bgdev.pl>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Bartosz Golaszewski <brgl@bgdev.pl>
drivers/gpio/gpiolib-of.c
drivers/gpio/gpiolib-sysfs.c
drivers/gpio/gpiolib.c
drivers/gpio/gpiolib.h