Skip to content

Commit

Permalink
fec: Use gpio_set_value_cansleep()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Fabio Estevam authored and David S. Miller committed Nov 1, 2015
1 parent 523e134 commit f444457
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/freescale/fec_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit f444457

Please sign in to comment.