[PATCH 3/6] crypto: artpec6 - Simplify with of_device_get_match_data()

Krzysztof Kozlowski krzysztof.kozlowski at linaro.org
Thu Nov 6 11:09:49 PST 2025


On 06/11/2025 17:31, Krzysztof Kozlowski wrote:
>  	struct device *dev = &pdev->dev;
> @@ -2853,12 +2852,10 @@ static int artpec6_crypto_probe(struct platform_device *pdev)
>  	if (artpec6_crypto_dev)
>  		return -ENODEV;
>  
> -	match = of_match_node(artpec6_crypto_of_match, dev->of_node);
> -	if (!match)
> +	variant = of_device_get_match_data(dev);

This needs cast for 32-bit builds like it was before. I will send v2.

> +	if (!variant)
>  		return -EINVAL;
>  
> -	variant = (enum artpec6_crypto_variant)match->data;



Best regards,
Krzysztof



More information about the linux-arm-kernel mailing list