Tarun Kanti DebBarma <tarun.kanti@xxxxxx> writes: > From: Charulatha V <charu@xxxxxx> > > gpio_bank_count is the count of number of GPIO devices > in a SoC. Remove this dependency from the driver. Also remove > the dependency on array of pointers to gpio_bank struct of > all GPIO devices. > > The cpu_is*() checks used in omap2_gpio_prepare_for_idle() and > omap2_gpio_resume_after_idle() would be removed in one of the > patches in this series > > Signed-off-by: Charulatha V <charu@xxxxxx> This is all in the right direction, but some comments about the save/restore context... [...] > @@ -1497,11 +1494,16 @@ void omap2_gpio_resume_after_idle(void) > /* save the registers of bank 2-6 */ > void omap_gpio_save_context(void) > { > - int i; > + struct gpio_bank *bank; > + int i = 0; > > /* saving banks from 2-6 only since GPIO1 is in WKUP */ > - for (i = 1; i < gpio_bank_count; i++) { > - struct gpio_bank *bank = &gpio_bank[i]; > + list_for_each_entry(bank, &omap_gpio_list, node) { > + i++; > + > + if (bank->id == 0) > + continue; > + Rather than add a list iterator here, I'd rather see the save_context called from the prepare_for_idle, only for the specific banks needed (and then gpio_save_context can be removed from pm34xx.c.) Similar for restore. If you prefer, you can do that in an additional patch on top of this one. Kevin -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html