Re: [PATCH v2] net: can: Use device_get_match_data()
From: Simon Horman <horms@kernel.org>
Date: 2023-11-23 10:15:44
Also in:
linux-arm-kernel, linux-can, lkml
From: Simon Horman <horms@kernel.org>
Date: 2023-11-23 10:15:44
Also in:
linux-arm-kernel, linux-can, lkml
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@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_canThanks for the updates. Reviewed-by: Simon Horman <horms@kernel.org>