From: Sergei Shtylyov Date: Thu, 25 Jun 2015 22:40:56 +0000 (+0300) Subject: sh-pfc: fix sparse GPIOs for R-Car SoCs X-Git-Tag: v4.2-rc4~28^2~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=61bb3aef92a4d102382f399eafccd5c72be6fdf2;p=profile%2Fcommon%2Fplatform%2Fkernel%2Flinux-artik7.git sh-pfc: fix sparse GPIOs for R-Car SoCs The PFC driver causes the kernel to hang on the R-Car gen2 SoC based boards when the CPU_ALL_PORT() macro is fixed to reflect the reality, i.e. when the GPIO space becomes actually sparse. This happens because the _GP_GPIO() macro includes an indexed initializer which causes the "holes" (array entries filled with all 0s) between the groups of the existing GPIOs; and the driver can't cope with that. There seems to be no reason to use the indexed initializer, so we can remove the index specifier and so avoid the "holes". Signed-off-by: Sergei Shtylyov Acked-by: Laurent Pinchart Tested-by: Geert Uytterhoeven Signed-off-by: Linus Walleij --- diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h index c7508d5..0874cfe 100644 --- a/drivers/pinctrl/sh-pfc/sh_pfc.h +++ b/drivers/pinctrl/sh-pfc/sh_pfc.h @@ -224,7 +224,7 @@ struct sh_pfc_soc_info { /* PINMUX_GPIO_GP_ALL - Expand to a list of sh_pfc_pin entries */ #define _GP_GPIO(bank, _pin, _name, sfx) \ - [(bank * 32) + _pin] = { \ + { \ .pin = (bank * 32) + _pin, \ .name = __stringify(_name), \ .enum_id = _name##_DATA, \