mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-24 05:50:53 +07:00
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 <andriy.shevchenko@linux.intel.com> Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com>
This commit is contained in:
parent
d1bfd0229e
commit
f3e7d28122
@ -919,16 +919,17 @@ static int lp_gpio_runtime_resume(struct device *dev)
|
||||
static int lp_gpio_resume(struct device *dev)
|
||||
{
|
||||
struct intel_pinctrl *lg = dev_get_drvdata(dev);
|
||||
struct gpio_chip *chip = &lg->chip;
|
||||
const char *dummy;
|
||||
void __iomem *reg;
|
||||
int i;
|
||||
|
||||
/* on some hardware suspend clears input sensing, re-enable it here */
|
||||
for (i = 0; i < lg->chip.ngpio; i++) {
|
||||
if (gpiochip_is_requested(&lg->chip, i) != NULL) {
|
||||
reg = lp_gpio_reg(&lg->chip, i, LP_CONFIG2);
|
||||
iowrite32(ioread32(reg) & ~GPINDIS_BIT, reg);
|
||||
}
|
||||
for_each_requested_gpio(chip, i, dummy) {
|
||||
reg = lp_gpio_reg(chip, i, LP_CONFIG2);
|
||||
iowrite32(ioread32(reg) & ~GPINDIS_BIT, reg);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user