pinctrl: sh-pfc: Update info pointer after SoC-specific init
authorGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 9 Mar 2017 18:20:48 +0000 (19:20 +0100)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Tue, 21 Mar 2017 10:21:55 +0000 (11:21 +0100)
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.

Fixes: 0c151062f32c9db8 ("sh-pfc: Add support for SoC-specific initialization")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
drivers/pinctrl/sh-pfc/core.c

index cf80ce1dd7cea5a0fdd9c524a6c5a03e1d93e0f2..4a5a0feb931bf43ccdb768f142a45e34ace30823 100644 (file)
@@ -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 */