提交 eb1d0640 编写于 作者: F Fabio Estevam 提交者: David S. Miller

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: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 ca7c4a45
...@@ -1858,6 +1858,9 @@ fec_probe(struct platform_device *pdev) ...@@ -1858,6 +1858,9 @@ fec_probe(struct platform_device *pdev)
if (ret) if (ret)
goto failed_register; goto failed_register;
if (fep->bufdesc_ex && fep->ptp_clock)
netdev_info(ndev, "registered PHC device %d\n", fep->dev_id);
return 0; return 0;
failed_register: failed_register:
......
...@@ -379,7 +379,5 @@ void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev) ...@@ -379,7 +379,5 @@ void fec_ptp_init(struct net_device *ndev, struct platform_device *pdev)
if (IS_ERR(fep->ptp_clock)) { if (IS_ERR(fep->ptp_clock)) {
fep->ptp_clock = NULL; fep->ptp_clock = NULL;
pr_err("ptp_clock_register failed\n"); pr_err("ptp_clock_register failed\n");
} else {
pr_info("registered PHC device on %s\n", ndev->name);
} }
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册