[PATCH] gpio: gpiolib: Remove WARN reference

Grant Likely grant.likely at secretlab.ca
Tue Feb 26 13:00:09 EST 2013


On Sat, 16 Feb 2013 20:22:33 -0200, Fabio Estevam <festevam at gmail.com> wrote:
> On Sat, Feb 16, 2013 at 7:24 PM, Fabio Estevam <festevam at gmail.com> wrote:
> > From: Fabio Estevam <fabio.estevam at freescale.com>
> >
> > mx28evk has two ethernet controllers. The GPIO that performs the
> > ethernet reset on both ports is the same GPIO, so on the board dts file, only in
> > one ethernet instance is passed the GPIO reset property.
> >
> > Replace the WARN with a pr_warn message.
> >
> > Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
> 
> Please discard this patch, I think the proper fix would be in the fec driver:

I agree. You shouldn't need to change the .dts file to fix the problem.

g.

> 
>  drivers/net/ethernet/freescale/fec.c |    3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/net/ethernet/freescale/fec.c
> b/drivers/net/ethernet/freescale/fec.c
> index 0fe68c4..5864a67 100644
> --- a/drivers/net/ethernet/freescale/fec.c
> +++ b/drivers/net/ethernet/freescale/fec.c
> @@ -1689,6 +1689,9 @@ static void fec_reset_phy(struct platform_device *pdev)
>  		msec = 1;
> 
>  	phy_reset = of_get_named_gpio(np, "phy-reset-gpios", 0);
> +	if (!gpio_is_valid(phy_reset))
> +		return;
> +
>  	err = devm_gpio_request_one(&pdev->dev, phy_reset,
>  				    GPIOF_OUT_INIT_LOW, "phy-reset");
>  	if (err) {
> 
> Will submit it to net-dev.

-- 
Grant Likely, B.Sc, P.Eng.
Secret Lab Technologies, Ltd.



More information about the linux-arm-kernel mailing list