linux/arch/mips/ar7
Jonas Gorski e6b03ab63b 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: 14e85c0e69 ("gpio: remove gpio_descs global array")
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Yoshihiro YUNOMAE <yoshihiro.yunomae.ez@hitachi.com>
Cc: Nicolas Schichan <nschichan@freebox.fr>
Cc: linux-mips@linux-mips.org
Cc: linux-serial@vger.kernel.org
Cc: <stable@vger.kernel.org> # 3.19+
Patchwork: https://patchwork.linux-mips.org/patch/17542/
Signed-off-by: James Hogan <jhogan@kernel.org>
2017-11-08 12:44:26 +00:00
..
clock.c MIPS: AR7: allow NULL clock for clk_get_rate 2017-09-06 12:35:21 +02:00
gpio.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
irq.c MIPS: Mark cascade and low level interrupts IRQF_NO_THREAD 2011-09-21 17:52:15 +02:00
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
memory.c MIPS: Audit and remove any unnecessary uses of module.h 2017-02-14 09:00:25 +00:00
Platform MIPS: Whitespace cleanup. 2013-02-01 10:00:22 +01:00
platform.c MIPS: AR7: Defer registration of GPIO 2017-11-08 12:44:26 +00:00
prom.c MIPS: AR7: Defer registration of GPIO 2017-11-08 12:44:26 +00:00
setup.c MIPS: Remove all the uses of custom gpio.h 2015-09-03 12:08:02 +02:00
time.c MIPS: Restore init.h usage to arch/mips/ar7/time.c 2014-03-26 23:09:23 +01:00