diff options
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 506a0175a5a7..ec974ba9c0c4 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c | |||
@@ -157,8 +157,13 @@ int platform_get_irq(struct platform_device *dev, unsigned int num) | |||
157 | * the device will only expose one IRQ, and this fallback | 157 | * the device will only expose one IRQ, and this fallback |
158 | * allows a common code path across either kind of resource. | 158 | * allows a common code path across either kind of resource. |
159 | */ | 159 | */ |
160 | if (num == 0 && has_acpi_companion(&dev->dev)) | 160 | if (num == 0 && has_acpi_companion(&dev->dev)) { |
161 | return acpi_dev_gpio_irq_get(ACPI_COMPANION(&dev->dev), num); | 161 | int ret = acpi_dev_gpio_irq_get(ACPI_COMPANION(&dev->dev), num); |
162 | |||
163 | /* Our callers expect -ENXIO for missing IRQs. */ | ||
164 | if (ret >= 0 || ret == -EPROBE_DEFER) | ||
165 | return ret; | ||
166 | } | ||
162 | 167 | ||
163 | return -ENXIO; | 168 | return -ENXIO; |
164 | #endif | 169 | #endif |