[PATCH 1/2] spi: stm32: disable device mode with st,stm32f4-spi compatible
Krzysztof Kozlowski
krzysztof.kozlowski at linaro.org
Wed Jun 21 05:25:57 PDT 2023
On 21/06/2023 13:55, Valentin Caron wrote:
> STM32 SPI driver is not capable to handle device mode with stm32f4/f7 soc.
> Stop probing if this case happens.
>
> Signed-off-by: Valentin Caron <valentin.caron at foss.st.com>
...
>
> static const struct of_device_id stm32_spi_of_match[] = {
> @@ -1798,8 +1802,15 @@ static int stm32_spi_probe(struct platform_device *pdev)
> struct device_node *np = pdev->dev.of_node;
> bool device_mode;
> int ret;
> + const struct of_device_id *of_match =
> + of_match_device(pdev->dev.driver->of_match_table, &pdev->dev);
> + const struct stm32_spi_cfg *cfg = (const struct stm32_spi_cfg *)of_match->data;
It seems you open-coded of_device_get_match_data().
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list