From: Nicolas Schichan Date: Thu, 12 Mar 2015 16:00:58 +0000 (+0100) Subject: MIPS: BCM63xx: Move bcm63xx_gpio_init() to bcm63xx_register_devices(). X-Git-Tag: omap-for-v4.1/fixes-rc1~111^2^2~30 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ec459f2a77b808c1e5a3616c88b613d3f720c8d;p=pandora-kernel.git MIPS: BCM63xx: Move bcm63xx_gpio_init() to bcm63xx_register_devices(). When called from prom init code, bcm63xx_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 bcm63xx_gpio_init() to bcm63xx_register_devices() (an arch_initcall) where kmalloc works. Fixes: 14e85c0e69d5 ("gpio: remove gpio_descs global array") Signed-off-by: Nicolas Schichan Cc: linux-mips@linux-mips.org Cc: linux-kernel@vger.kernel.org Cc: Alexandre Courbot Patchwork: https://patchwork.linux-mips.org/patch/9530/ Signed-off-by: Ralf Baechle --- Reading git-diff-tree failed