diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2015-10-03 19:13:12 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2015-10-09 11:20:28 -0500 |
commit | 4a2eae2359bc79fe7d9e7463ed69ad17034fa00f (patch) | |
tree | 81abfcb5e96baad0c24ed7753412cbd5342903dd /drivers/pci | |
parent | 3884d846a4ed402992ac84e6b79962848ba5f521 (diff) |
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 <w@1wt.eu> (Iomega iConnect Kirkwood, MiraBox Armada 370)
Tested-by: Andrew Lunn <andrew@lunn.ch> (D-Link DIR664 Kirkwood)
Tested-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (Armada XP GP)
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'drivers/pci')
-rw-r--r-- | drivers/pci/host/pci-mvebu.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c index 92c777e1aa3c..00467c5a58ac 100644 --- a/drivers/pci/host/pci-mvebu.c +++ b/drivers/pci/host/pci-mvebu.c @@ -1111,8 +1111,8 @@ static int mvebu_pcie_probe(struct platform_device *pdev) of_property_read_u32(child, "reset-delay-us", &reset_udelay); - gpio_set_value(port->reset_gpio, - (port->reset_active_low) ? 1 : 0); + gpio_set_value_cansleep(port->reset_gpio, + !!port->reset_active_low); msleep(reset_udelay/1000); } |