Skip to content

Commit bba7fd1

Browse files
jhovoldgregkh
authored andcommitted
slimbus: core: clean up of_slim_get_device()
Clean up of_find_slim_device() by folding in the of_find_slim_device() helper. Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20251126145329.5022-7-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 7831f71 commit bba7fd1

1 file changed

Lines changed: 10 additions & 16 deletions

File tree

drivers/slimbus/core.c

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -390,21 +390,6 @@ struct slim_device *slim_get_device(struct slim_controller *ctrl,
390390
}
391391
EXPORT_SYMBOL_GPL(slim_get_device);
392392

393-
static struct slim_device *of_find_slim_device(struct slim_controller *ctrl,
394-
struct device_node *np)
395-
{
396-
struct slim_device *sbdev;
397-
struct device *dev;
398-
399-
dev = device_find_child(ctrl->dev, np, device_match_of_node);
400-
if (dev) {
401-
sbdev = to_slim_device(dev);
402-
return sbdev;
403-
}
404-
405-
return NULL;
406-
}
407-
408393
/**
409394
* of_slim_get_device() - get handle to a device using dt node.
410395
*
@@ -419,7 +404,16 @@ static struct slim_device *of_find_slim_device(struct slim_controller *ctrl,
419404
struct slim_device *of_slim_get_device(struct slim_controller *ctrl,
420405
struct device_node *np)
421406
{
422-
return of_find_slim_device(ctrl, np);
407+
struct slim_device *sbdev;
408+
struct device *dev;
409+
410+
dev = device_find_child(ctrl->dev, np, device_match_of_node);
411+
if (dev) {
412+
sbdev = to_slim_device(dev);
413+
return sbdev;
414+
}
415+
416+
return NULL;
423417
}
424418
EXPORT_SYMBOL_GPL(of_slim_get_device);
425419

0 commit comments

Comments
 (0)