Re: [PATCH 1/2] spi: stm32: disable device mode with st,stm32f4-spi compatible

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxx>

...

>  
>  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




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux