Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Johan Hovold and committed by
Greg Kroah-Hartman
bba7fd12 7831f710

+10 -16
+10 -16
drivers/slimbus/core.c
··· 390 390 } 391 391 EXPORT_SYMBOL_GPL(slim_get_device); 392 392 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 - 408 393 /** 409 394 * of_slim_get_device() - get handle to a device using dt node. 410 395 * ··· 404 419 struct slim_device *of_slim_get_device(struct slim_controller *ctrl, 405 420 struct device_node *np) 406 421 { 407 - return of_find_slim_device(ctrl, np); 422 + struct slim_device *sbdev; 423 + struct device *dev; 424 + 425 + dev = device_find_child(ctrl->dev, np, device_match_of_node); 426 + if (dev) { 427 + sbdev = to_slim_device(dev); 428 + return sbdev; 429 + } 430 + 431 + return NULL; 408 432 } 409 433 EXPORT_SYMBOL_GPL(of_slim_get_device); 410 434