aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/base/platform.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-12 07:37:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-12 07:37:39 +0200
commite6aa640eb2f68920cb849aec0cab44f05d843238 (patch)
tree42e07ee412112abe90d459f821e8d73c26cc648e /drivers/base/platform.c
parentdevice.h: Fix warnings for mismatched parameter names in comments (diff)
parentLinux 5.3-rc4 (diff)
downloadlinux-dev-e6aa640eb2f68920cb849aec0cab44f05d843238.tar.xz
linux-dev-e6aa640eb2f68920cb849aec0cab44f05d843238.zip
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.c9
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