diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2021-03-29 17:12:06 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-04-05 13:18:22 +0200 |
commit | e588fead04ec51ad9ede7010676de19dcaa50b71 (patch) | |
tree | 009b2d11a1e77885d3216fd5d786d15482496fb9 /drivers/base | |
parent | software node: Imply kobj_to_swnode() to be no-op (diff) | |
download | linux-e588fead04ec51ad9ede7010676de19dcaa50b71.tar.xz linux-e588fead04ec51ad9ede7010676de19dcaa50b71.zip |
software node: Introduce SOFTWARE_NODE_REFERENCE() helper macro
This is useful to assign software node reference with arguments
in a common way. Moreover, we have already couple of users that
may be converted. And by the fact, one of them is moved right here
to use the helper.
Tested-by: Daniel Scally <djrscally@gmail.com>
Reviewed-by: Daniel Scally <djrscally@gmail.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20210329151207.36619-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/test/property-entry-test.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/base/test/property-entry-test.c b/drivers/base/test/property-entry-test.c index 3a4f755c483c..1106fedcceed 100644 --- a/drivers/base/test/property-entry-test.c +++ b/drivers/base/test/property-entry-test.c @@ -412,15 +412,8 @@ static void pe_test_reference(struct kunit *test) }; static const struct software_node_ref_args refs[] = { - { - .node = &nodes[0], - .nargs = 0, - }, - { - .node = &nodes[1], - .nargs = 2, - .args = { 3, 4 }, - }, + SOFTWARE_NODE_REFERENCE(&nodes[0]), + SOFTWARE_NODE_REFERENCE(&nodes[1], 3, 4), }; const struct property_entry entries[] = { |