Skip to content

Commit 4a2eae2

Browse files
Russell Kingbjorn-helgaas
authored andcommitted
PCI: mvebu: Use gpio_set_value_cansleep()
We are in a context where we can sleep, and the PCIe reset gpio may be on an I2C expander. Use the cansleep() variant when setting the GPIO value. Tested-by: Willy Tarreau <[email protected]> (Iomega iConnect Kirkwood, MiraBox Armada 370) Tested-by: Andrew Lunn <[email protected]> (D-Link DIR664 Kirkwood) Tested-by: Thomas Petazzoni <[email protected]> (Armada XP GP) Signed-off-by: Russell King <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Thomas Petazzoni <[email protected]>
1 parent 3884d84 commit 4a2eae2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/pci/host/pci-mvebu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,8 +1111,8 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
11111111
of_property_read_u32(child, "reset-delay-us",
11121112
&reset_udelay);
11131113

1114-
gpio_set_value(port->reset_gpio,
1115-
(port->reset_active_low) ? 1 : 0);
1114+
gpio_set_value_cansleep(port->reset_gpio,
1115+
!!port->reset_active_low);
11161116
msleep(reset_udelay/1000);
11171117
}
11181118

0 commit comments

Comments
 (0)