diff mbox

[v2,1/4] pinctrl: sh-pfc: Update info pointer after SoC-specific init

Message ID 1489425167-22711-2-git-send-email-geert+renesas@glider.be
State New
Headers show

Commit Message

Geert Uytterhoeven March 13, 2017, 5:12 p.m. UTC
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(+)

Comments

Geert Uytterhoeven March 22, 2017, 1:25 p.m. UTC | #1
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 mbox

Patch

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 */