[PATCH 1/2] net: fec: refactor dt probing

Baruch Siach baruch at tkos.co.il
Mon Jan 21 12:48:26 EST 2013


Hi Sascha,

On Mon, Jan 21, 2013 at 09:37:54AM +0100, Sascha Hauer wrote:
> For devicetree parsing only the fec_get_phy_mode_dt() is
> available. Rename it to fec_probe_dt() to be able to add more devicetree
> parsing to it.
> 
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> ---

[...]

> -static int fec_get_phy_mode_dt(struct platform_device *pdev)
> +static int fec_probe_dt(struct fec_enet_private *fep)
>  {
> -	struct device_node *np = pdev->dev.of_node;
> +	struct device_node *np = fep->pdev->dev.of_node;
>  
> -	if (np)
> -		return of_get_phy_mode(np);
> +	if (!np)
> +		return -ENODEV;
> +
> +	fep->phy_interface = of_get_phy_mode(np);
>  
>  	return -ENODEV;

Maybe return fep->phy_interface?

baruch

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -



More information about the linux-arm-kernel mailing list