From eb1d064058c7c7c2b2e414c4c8e81c21965cdbe9 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Sat, 13 Apr 2013 07:25:36 +0000 Subject: [PATCH] fec: Fix PHC device log Currently when booting a mx6 device we get the following on boot: registered PHC device on eth%d Fix it by printing the network device name only after it gets registered, so that the following can be read now: fec 2188000.ethernet eth0: registered PHC device 0 Signed-off-by: Fabio Estevam Signed-off-by: David S. Miller --- drivers/net/ethernet/freescale/fec_main.c | 3 +++ drivers/net/ethernet/freescale/fec_ptp.c | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c index befdf78b3f69..153437b32358 100644 --- a/drivers/net/ethernet/freescale/fec_main.c +++ b/drivers/net/ethernet/freescale/fec_main.c @@ -1858,6 +1858,9 @@ fec_probe(struct platform_device *pdev) if (ret) goto failed_register; + if (fep->bufdesc_ex && fep->ptp_clock) + netdev_info(ndev, "registered PHC device %d\n", fep->dev_id); + return 0; failed_register: diff --git a/drivers/net/ethernet/freescale/fec_ptp.c b/drivers/net/ethernet/freescale/fec_ptp.c index 1f17ca0f2201..e040c8b2733a 100644 --- a/drivers/net/ethernet/freescale/fec_ptp.c +++ b/drivers/net/ethernet/freescale/fec_ptp.c @@ -379,7 +379,5 @@ void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev) if (IS_ERR(fep->ptp_clock)) { fep->ptp_clock = NULL; pr_err("ptp_clock_register failed\n"); - } else { - pr_info("registered PHC device on %s\n", ndev->name); } } -- 2.20.1