[PATCH v2] net: can: Use device_get_match_data()

Simon Horman horms at kernel.org
Thu Nov 23 02:15:34 PST 2023


On Wed, Nov 22, 2023 at 11:01:39AM -0700, Rob Herring wrote:
> Use preferred device_get_match_data() instead of of_match_device() to
> get the driver match data. With this, adjust the includes to explicitly
> include the correct headers.
> 
> Error checking for matching and match data was not necessary as matching
> is always successful if we're already in probe and the match tables always
> have data pointers.
> 
> Signed-off-by: Rob Herring <robh at kernel.org>
> ---
> v2:
>   - Drop calling "platform_get_device_id(pdev)->driver_data" in c_can
>     and flexcan as device_get_match_data() already did that. The logic
>     was also wrong and would have resulted in returning -ENODEV.
>   - Drop initializing devtype in xilinx_can

Thanks for the updates.

Reviewed-by: Simon Horman <horms at kernel.org>



More information about the linux-arm-kernel mailing list