diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-12 07:37:39 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-08-12 07:37:39 +0200 |
commit | e6aa640eb2f68920cb849aec0cab44f05d843238 (patch) | |
tree | 42e07ee412112abe90d459f821e8d73c26cc648e /drivers/base/platform.c | |
parent | 1f573cce48a2ebb35953034062ef01056b7d6a58 (diff) | |
parent | d45331b00ddb179e291766617259261c112db872 (diff) |
Merge 5.3-rc4 into driver-core-next
We need the driver core fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base/platform.c')
-rw-r--r-- | drivers/base/platform.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 9426736551b5..8ad701068c11 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -152,8 +152,13 @@ static int __platform_get_irq(struct platform_device *dev, unsigned int num) * the device will only expose one IRQ, and this fallback * allows a common code path across either kind of resource. */ - if (num == 0 && has_acpi_companion(&dev->dev)) - return acpi_dev_gpio_irq_get(ACPI_COMPANION(&dev->dev), num); + if (num == 0 && has_acpi_companion(&dev->dev)) { + int ret = acpi_dev_gpio_irq_get(ACPI_COMPANION(&dev->dev), num); + + /* Our callers expect -ENXIO for missing IRQs. */ + if (ret >= 0 || ret == -EPROBE_DEFER) + return ret; + } return -ENXIO; #endif |