Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIPS: AR7: Defer registration of GPIO
When called from prom init code, ar7_gpio_init() will fail as it will call gpiochip_add() which relies on a working kmalloc() to alloc the gpio_desc array and kmalloc is not useable yet at prom init time. Move ar7_gpio_init() to ar7_register_devices() (a device_initcall) where kmalloc works. Fixes: 14e85c0 ("gpio: remove gpio_descs global array") Signed-off-by: Jonas Gorski <[email protected]> Reviewed-by: Florian Fainelli <[email protected]> Cc: Ralf Baechle <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Yoshihiro YUNOMAE <[email protected]> Cc: Nicolas Schichan <[email protected]> Cc: [email protected] Cc: [email protected] Cc: <[email protected]> # 3.19+ Patchwork: https://patchwork.linux-mips.org/patch/17542/ Signed-off-by: James Hogan <[email protected]>
- Loading branch information