Skip to contentSkip to conversation

fec: Use gpio_set_value_cansleep()

PATCH Applied Fabio Estevam 2 participants 2 messages Oct 28, 2015 – Nov 1, 2015

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fec: Use gpio_set_value_cansleep()

From: Fabio Estevam <[email protected]>

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.

---
 drivers/net/ethernet/freescale/fec_main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/freescale/fec_main.c +1 -1
index 501e143..b2a3220 100644
@@ -3261,7 +3261,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)
Signature · 1 line
1.9.1
maintainer Applied
#1 lore raw

From: Fabio Estevam <[email protected]>
Date: Wed, 28 Oct 2015 10:20:30 -0200

Quoted 9 lines

From: Fabio Estevam <[email protected]>

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.

Applied.