From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
"Rafael J. Wysocki" <rafael@kernel.org>,
linux-kernel@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH 1/2] software node: Fix node registration
Date: Mon, 1 Mar 2021 17:10:35 +0200 [thread overview]
Message-ID: <YD0D6/NQpDdj1WeX@smile.fi.intel.com> (raw)
In-Reply-To: <20210301143012.55118-2-heikki.krogerus@linux.intel.com>
On Mon, Mar 01, 2021 at 05:30:11PM +0300, Heikki Krogerus wrote:
> Software node can not be registered before its parent.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
(On Intel Galileo Gen 2 with some custom patches to convert gpio-dwapb et al.
to use swnodes. Those patches a subject to further submission.)
Thanks!
> Fixes: 80488a6b1d3c ("software node: Add support for static node descriptors")
> Cc: stable@vger.kernel.org
> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
> ---
> drivers/base/swnode.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/base/swnode.c b/drivers/base/swnode.c
> index 37179a8b1ceba..74db8c971db74 100644
> --- a/drivers/base/swnode.c
> +++ b/drivers/base/swnode.c
> @@ -938,6 +938,9 @@ int software_node_register(const struct software_node *node)
> if (software_node_to_swnode(node))
> return -EEXIST;
>
> + if (node->parent && !parent)
> + return -EINVAL;
> +
> return PTR_ERR_OR_ZERO(swnode_register(node, parent, 0));
> }
> EXPORT_SYMBOL_GPL(software_node_register);
> --
> 2.30.1
>
--
With Best Regards,
Andy Shevchenko
next prev parent reply other threads:[~2021-03-01 15:14 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 14:30 [PATCH 0/2] software node: Two fixes Heikki Krogerus
2021-03-01 14:30 ` [PATCH 1/2] software node: Fix node registration Heikki Krogerus
2021-03-01 15:10 ` Andy Shevchenko [this message]
2021-03-01 14:30 ` [PATCH 2/2] software node: Fix device_add_software_node() Heikki Krogerus
2021-03-01 15:11 ` Andy Shevchenko
2021-03-09 10:51 ` [PATCH 0/2] software node: Two fixes Andy Shevchenko
2021-03-09 13:51 ` Rafael J. Wysocki
2021-03-10 7:36 ` Heikki Krogerus
2021-03-10 14:16 ` Rafael J. Wysocki
2021-03-10 14:30 ` Rafael J. Wysocki
2021-03-11 8:23 ` Heikki Krogerus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YD0D6/NQpDdj1WeX@smile.fi.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox