Skip to content

Commit

Permalink
pinctrl: sh-pfc: Update info pointer after SoC-specific init
Browse files Browse the repository at this point in the history
commit 3091ae775fae17084013021d01513bc1ad274e6a upstream.

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: 0c15106 ("sh-pfc: Add support for SoC-specific initialization")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
geertu authored and gregkh committed Jul 15, 2017
1 parent 4542452 commit 174ddbc
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/pinctrl/sh-pfc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -543,6 +543,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 */
Expand Down

0 comments on commit 174ddbc

Please sign in to comment.