Skip to content

Commit f3e7d28

Browse files
committed
pinctrl: lynxpoint: Make use of for_each_requested_gpio()
Make use of for_each_requested_gpio() instead of home grown analogue. Signed-off-by: Andy Shevchenko <[email protected]> Acked-by: Mika Westerberg <[email protected]>
1 parent d1bfd02 commit f3e7d28

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/pinctrl/intel/pinctrl-lynxpoint.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -919,16 +919,17 @@ static int lp_gpio_runtime_resume(struct device *dev)
919919
static int lp_gpio_resume(struct device *dev)
920920
{
921921
struct intel_pinctrl *lg = dev_get_drvdata(dev);
922+
struct gpio_chip *chip = &lg->chip;
923+
const char *dummy;
922924
void __iomem *reg;
923925
int i;
924926

925927
/* on some hardware suspend clears input sensing, re-enable it here */
926-
for (i = 0; i < lg->chip.ngpio; i++) {
927-
if (gpiochip_is_requested(&lg->chip, i) != NULL) {
928-
reg = lp_gpio_reg(&lg->chip, i, LP_CONFIG2);
929-
iowrite32(ioread32(reg) & ~GPINDIS_BIT, reg);
930-
}
928+
for_each_requested_gpio(chip, i, dummy) {
929+
reg = lp_gpio_reg(chip, i, LP_CONFIG2);
930+
iowrite32(ioread32(reg) & ~GPINDIS_BIT, reg);
931931
}
932+
932933
return 0;
933934
}
934935

0 commit comments

Comments
 (0)