Commit 9e3617a7 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by David S. Miller

net: pch_gbe: Propagate error from devm_gpio_request_one()

If GPIO controller is not available yet we need to defer
the probe of GBE until provider will become available.

While here, drop GPIOF_EXPORT because it's deprecated and
may not be available.

Fixes: f1a26fdf ("pch_gbe: Add MinnowBoard support")
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: default avatarFlavio Suligoi <f.suligoi@asem.it>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 27d64141
...@@ -2532,9 +2532,13 @@ static int pch_gbe_probe(struct pci_dev *pdev, ...@@ -2532,9 +2532,13 @@ static int pch_gbe_probe(struct pci_dev *pdev,
adapter->pdev = pdev; adapter->pdev = pdev;
adapter->hw.back = adapter; adapter->hw.back = adapter;
adapter->hw.reg = pcim_iomap_table(pdev)[PCH_GBE_PCI_BAR]; adapter->hw.reg = pcim_iomap_table(pdev)[PCH_GBE_PCI_BAR];
adapter->pdata = (struct pch_gbe_privdata *)pci_id->driver_data; adapter->pdata = (struct pch_gbe_privdata *)pci_id->driver_data;
if (adapter->pdata && adapter->pdata->platform_init) if (adapter->pdata && adapter->pdata->platform_init) {
adapter->pdata->platform_init(pdev); ret = adapter->pdata->platform_init(pdev);
if (ret)
goto err_free_netdev;
}
adapter->ptp_pdev = adapter->ptp_pdev =
pci_get_domain_bus_and_slot(pci_domain_nr(adapter->pdev->bus), pci_get_domain_bus_and_slot(pci_domain_nr(adapter->pdev->bus),
...@@ -2629,7 +2633,7 @@ static int pch_gbe_probe(struct pci_dev *pdev, ...@@ -2629,7 +2633,7 @@ static int pch_gbe_probe(struct pci_dev *pdev,
*/ */
static int pch_gbe_minnow_platform_init(struct pci_dev *pdev) static int pch_gbe_minnow_platform_init(struct pci_dev *pdev)
{ {
unsigned long flags = GPIOF_DIR_OUT | GPIOF_INIT_HIGH | GPIOF_EXPORT; unsigned long flags = GPIOF_OUT_INIT_HIGH;
unsigned gpio = MINNOW_PHY_RESET_GPIO; unsigned gpio = MINNOW_PHY_RESET_GPIO;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment