> [snip] > > > > +static inline int init_gpio_info(struct platform_device *pdev) > > +{ > > + gpio_bank = kzalloc(gpio_bank_count * sizeof(struct gpio_bank), > > + GFP_KERNEL); > > This is the real issue with the gpio_bank_count. > > You are creating a global driver information related to all instances of > this device with a per device variable. > You should store the registers per device, and that will remove the need > for that global information. Agreed. But "gpio_bank" can be removed only during cleanup, as this information is spread around the whole driver and the current gpio driver assumes it to be an array of all instances of the device. For now, would modify the code to get gpio_bank_count using omap_hwmod_class() iteration count. Until code cleanup is done, 'gpio_bank_count' would be given to driver by means of a global variable/ a function pointer to omap_get_gpio_count(). > > Benoit -- 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