Message ID | 1489425167-22711-2-git-send-email-geert+renesas@glider.be |
---|---|
State | New |
Headers | show |
On Mon, Mar 13, 2017 at 6:12 PM, Geert Uytterhoeven <geert+renesas@glider.be> wrote: > Update the sh_pfc_soc_info pointer after calling the SoC-specific > initialization function, as it may have been updated to e.g. handle > different SoC revisions. This makes sure the correct subdriver name is > printed later. > > Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Queued in sh-pfc-for-v4.12 with Fixes: 0c151062f32c9db8 ("sh-pfc: Add support for SoC-specific initialization") as this has been reported independently afterwards. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds -- To unsubscribe from this list: send the line "unsubscribe linux-gpio" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/pinctrl/sh-pfc/core.c b/drivers/pinctrl/sh-pfc/core.c index cf80ce1dd7cea5a0..4a5a0feb931bf43c 100644 --- a/drivers/pinctrl/sh-pfc/core.c +++ b/drivers/pinctrl/sh-pfc/core.c @@ -586,6 +586,9 @@ static int sh_pfc_probe(struct platform_device *pdev) ret = info->ops->init(pfc); if (ret < 0) return ret; + + /* .init() may have overridden pfc->info */ + info = pfc->info; } /* Enable dummy states for those platforms without pinctrl support */
Update the sh_pfc_soc_info pointer after calling the SoC-specific initialization function, as it may have been updated to e.g. handle different SoC revisions. This makes sure the correct subdriver name is printed later. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> --- v2: - new. --- drivers/pinctrl/sh-pfc/core.c | 3 +++ 1 file changed, 3 insertions(+)