OSDN Git Service

iio: adc: stm32-adc: fix a wrong error message when probing interrupts
authorFabrice Gasnier <fabrice.gasnier@st.com>
Tue, 12 May 2020 13:27:05 +0000 (15:27 +0200)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Fri, 22 May 2020 16:29:25 +0000 (17:29 +0100)
commit10134ec3f8cefa6a40fe84987f1795e9e0da9715
tree7786265094fbcfb85ba99969c7c71d58723f394d
parentf6dbf83c17cb223ceabd7c42d441414f3e0e8a86
iio: adc: stm32-adc: fix a wrong error message when probing interrupts

A wrong error message is printed out currently, like on STM32MP15:
- stm32-adc-core 48003000.adc: IRQ index 2 not found.

This is seen since commit 7723f4c5ecdb ("driver core: platform: Add an
error message to platform_get_irq*()").
The STM32 ADC core driver wrongly requests up to 3 interrupt lines. It
should request only the necessary IRQs, based on the compatible:
- stm32f4/h7 ADCs share a common interrupt
- stm32mp1, has one interrupt line per ADC.
So add the number of required interrupts to the compatible data.

Fixes: d58c67d1d851 ("iio: adc: stm32-adc: add support for STM32MP1")
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Cc: <Stable@vger.kernel.org>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/stm32-adc-core.c