Thread (2 messages) 2 messages, 2 authors, 2023-11-23

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

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_can
Thanks for the updates.

Reviewed-by: Simon Horman <horms@kernel.org>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help