diff options
author | Zijun Hu <quic_zijuhu@quicinc.com> | 2024-12-24 21:05:06 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2025-01-03 11:19:35 +0100 |
commit | 989e2b3569bf7eed912144ba86aab003c6cf858c (patch) | |
tree | ea2a9c6c06f98a809460f0dd820df47078a1e723 | |
parent | 6890fdc856014d731708d684a7c6f9dafec17d60 (diff) | |
download | lwn-989e2b3569bf7eed912144ba86aab003c6cf858c.tar.gz lwn-989e2b3569bf7eed912144ba86aab003c6cf858c.zip |
slimbus: core: Remove of_slim_match_dev()
static of_slim_match_dev() has same function as API device_match_of_node().
Remove the former and use the later instead.
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>
Link: https://lore.kernel.org/r/20241224-const_dfc_done-v5-7-6623037414d4@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/slimbus/core.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c index ab927fd077cb..005fa2ef100f 100644 --- a/drivers/slimbus/core.c +++ b/drivers/slimbus/core.c @@ -385,21 +385,13 @@ struct slim_device *slim_get_device(struct slim_controller *ctrl, } EXPORT_SYMBOL_GPL(slim_get_device); -static int of_slim_match_dev(struct device *dev, const void *data) -{ - const struct device_node *np = data; - struct slim_device *sbdev = to_slim_device(dev); - - return (sbdev->dev.of_node == np); -} - static struct slim_device *of_find_slim_device(struct slim_controller *ctrl, struct device_node *np) { struct slim_device *sbdev; struct device *dev; - dev = device_find_child(ctrl->dev, np, of_slim_match_dev); + dev = device_find_child(ctrl->dev, np, device_match_of_node); if (dev) { sbdev = to_slim_device(dev); return sbdev; |