Re: [PATCHi v2] net: sh_eth: Add support of device tree probe
From: Simon Horman <horms@verge.net.au>
Date: 2013-02-22 18:49:19
Also in:
netdev
On Thu, Feb 14, 2013 at 11:56:57AM +0900, Nobuhiro Iwamatsu wrote:
(2013/02/14 10:24), Kuninori Morimoto wrote:quoted
Hi Iwamatsu-san Thank you for this patch. Small comment from mequoted
+#ifdef CONFIG_OF(snip)quoted
+sh_eth_parse_dt(struct device *dev, struct net_device *ndev) +{ + int ret; + struct device_node *np = dev->of_node; + struct sh_eth_plat_data *pdata;...quoted
+#else +static struct sh_eth_plat_data * +sh_eth_parse_dt(struct device *dev, struct net_device *ndev) +{ + return NULL; +} +#endif(snip)quoted
static int sh_eth_drv_probe(struct platform_device *pdev) {...quoted
+#ifdef CONFIG_OF + if (np&& of_device_is_available(np)) { + pd = sh_eth_parse_dt(&pdev->dev, ndev); + if (pdev->dev.platform_data) { + struct sh_eth_plat_data *tmp = + pdev->dev.platform_data; + pd->set_mdio_gate = tmp->set_mdio_gate; + pd->needs_init = tmp->needs_init; + } + } else +#endifsh_eth_parse_dt() was defined for both CONFIG_OF and !CONFIG_OF. But it is called only from CONFIG_OF ?Because of_device_is_available needs CONFIG_OF. I already send a patch which add empty function of of_device_is_available. If this was apply, this ifdef becomes without need.
Hi Iwamatsu-san, could you let me know of the status of that patch? Has it been queued-up or merged? If so, where and when?