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

smsc911x: Do not use netdev_dbg() when device is not registered

With debug enabled we get the following message:

smsc911x smsc911x (unregistered net_device): couldn't get clock -2

As the device has not been registered at this point, it is better to use
dev_dbg() instead of netdev_dbg().

CC: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Suggested-by: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 cc93fc51
......@@ -439,7 +439,8 @@ static int smsc911x_request_resources(struct platform_device *pdev)
/* Request clock */
pdata->clk = clk_get(&pdev->dev, NULL);
if (IS_ERR(pdata->clk))
netdev_dbg(ndev, "couldn't get clock %li\n", PTR_ERR(pdata->clk));
dev_dbg(&pdev->dev, "couldn't get clock %li\n",
PTR_ERR(pdata->clk));
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册