lkml.org 
[lkml]   [2023]   [Jun]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH v2] spi: stm32: disable device mode with st,stm32f4-spi compatible
From
On 27/06/2023 14:39, Valentin Caron wrote:
> STM32 SPI driver is not capable to handle device mode with stm32f4 soc.
> Stop probing if this case happens, and print an error with involved
> compatible.
>

...

>
> static const struct of_device_id stm32_spi_of_match[] = {
> @@ -1798,8 +1802,16 @@ static int stm32_spi_probe(struct platform_device *pdev)
> struct device_node *np = pdev->dev.of_node;
> bool device_mode;
> int ret;
> + const char *compatible =
> + of_match_device(pdev->dev.driver->of_match_table, &pdev->dev)->compatible;

The goal was to replace it, so drop it.

> + const struct stm32_spi_cfg *cfg = (const struct stm32_spi_cfg *)

Why do you need the cast? To drop the const? Are you sure it is really
needed?

> + of_device_get_match_data(&pdev->dev);
Best regards,
Krzysztof

\
 
 \ /
  Last update: 2023-06-27 15:40    [W:0.035 / U:1.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site