Browse Source

fec: Use gpio_set_value_cansleep()

We are in a context where we can sleep, and the FEC PHY reset gpio
may be on an I2C expander. Use the cansleep() variant when
setting the GPIO value.

Based on a patch from Russell King for pci-mvebu.c.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Fabio Estevam 10 years ago
parent
commit
f4444574a4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/net/ethernet/freescale/fec_main.c

+ 1 - 1
drivers/net/ethernet/freescale/fec_main.c

@@ -3262,7 +3262,7 @@ static void fec_reset_phy(struct platform_device *pdev)
 		return;
 	}
 	msleep(msec);
-	gpio_set_value(phy_reset, 1);
+	gpio_set_value_cansleep(phy_reset, 1);
 }
 #else /* CONFIG_OF */
 static void fec_reset_phy(struct platform_device *pdev)