Patchwork [05/11] ARM: imx6q: move imx6q_sabrelite specific code to a dedicated function

login
register
mail settings
Submitter Richard Zhao
Date April 27, 2012, 7:02 a.m.
Message ID <1335510185-7906-6-git-send-email-richard.zhao@freescale.com>
Download mbox | patch
Permalink /patch/155392/
State New
Headers show

Comments

Richard Zhao - April 27, 2012, 7:02 a.m.
It'll be easier to add other board specific code.

Signed-off-by: Richard Zhao <richard.zhao@freescale.com>
---
 arch/arm/mach-imx/mach-imx6q.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)
Shawn Guo - May 1, 2012, 1:18 p.m.
On Fri, Apr 27, 2012 at 03:02:59PM +0800, Richard Zhao wrote:
> It'll be easier to add other board specific code.
> 
> Signed-off-by: Richard Zhao <richard.zhao@freescale.com>

Applied, thanks.

Regards,
Shawn

Patch

diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c
index da6c1d9..d25c5d8 100644
--- a/arch/arm/mach-imx/mach-imx6q.c
+++ b/arch/arm/mach-imx/mach-imx6q.c
@@ -75,11 +75,16 @@  static int ksz9021rn_phy_fixup(struct phy_device *phydev)
 	return 0;
 }
 
+static void __init imx6q_sabrelite_init(void)
+{
+	phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
+				ksz9021rn_phy_fixup);
+}
+
 static void __init imx6q_init_machine(void)
 {
 	if (of_machine_is_compatible("fsl,imx6q-sabrelite"))
-		phy_register_fixup_for_uid(PHY_ID_KSZ9021, MICREL_PHY_ID_MASK,
-					   ksz9021rn_phy_fixup);
+		imx6q_sabrelite_init();
 
 	of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);