summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDaniel Scally <djrscally@gmail.com>2021-01-07 14:28:32 +0100
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>2021-01-26 19:28:32 +0100
commitf0328be57568c7954061284a533c98f91bd9938f (patch)
treef6e32a86352ee2ca6f317d5370b17c4625221473 /lib
parentmedia: software_node: Add support for fwnode_graph*() family of functions (diff)
downloadlinux-f0328be57568c7954061284a533c98f91bd9938f.tar.xz
linux-f0328be57568c7954061284a533c98f91bd9938f.zip
media: lib/test_printf.c: Use helper function to unwind array of software_nodes
Use the software_node_unregister_nodes() helper function to unwind this array in a cleaner way. Acked-by: Petr Mladek <pmladek@suse.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Daniel Scally <djrscally@gmail.com> Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'lib')
-rw-r--r--lib/test_printf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/test_printf.c b/lib/test_printf.c
index 7ac87f18a10f..7d60f24240a4 100644
--- a/lib/test_printf.c
+++ b/lib/test_printf.c
@@ -644,9 +644,7 @@ static void __init fwnode_pointer(void)
test(second_name, "%pfwP", software_node_fwnode(&softnodes[1]));
test(third_name, "%pfwP", software_node_fwnode(&softnodes[2]));
- software_node_unregister(&softnodes[2]);
- software_node_unregister(&softnodes[1]);
- software_node_unregister(&softnodes[0]);
+ software_node_unregister_nodes(softnodes);
}
static void __init