linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Saravana Kannan <saravanak@google.com>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/2] slimbus: core: Set fwnode for a device when setting of_node
Date: Mon, 11 May 2020 11:14:44 -0700	[thread overview]
Message-ID: <CAGETcx8+khWkCUffwWqHit1c-koKFqLKJbRZTF_ZnDX=srJ=pg@mail.gmail.com> (raw)
In-Reply-To: <20200511151334.362-2-srinivas.kandagatla@linaro.org>

On Mon, May 11, 2020 at 8:13 AM Srinivas Kandagatla
<srinivas.kandagatla@linaro.org> wrote:
>
> From: Saravana Kannan <saravanak@google.com>
>
> When setting the of_node for a newly created device, also set the
> fwnode. This allows fw_devlink feature to work for slimbus devices.
>
> Also, remove some unnecessary NULL checks. The functions in question
> already do NULL checks.
>
> Signed-off-by: Saravana Kannan <saravanak@google.com>
> [Srini: removed unnecessary NULL check from other patch]
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  drivers/slimbus/core.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
> index 526e3215d8fe..1f3beee74fdf 100644
> --- a/drivers/slimbus/core.c
> +++ b/drivers/slimbus/core.c
> @@ -162,9 +162,8 @@ static int slim_add_device(struct slim_controller *ctrl,
>         sbdev->ctrl = ctrl;
>         INIT_LIST_HEAD(&sbdev->stream_list);
>         spin_lock_init(&sbdev->stream_list_lock);
> -
> -       if (node)
> -               sbdev->dev.of_node = of_node_get(node);
> +       sbdev->dev.of_node = of_node_get(node);
> +       sbdev->dev.fwnode = of_fwnode_handle(node);
>
>         dev_set_name(&sbdev->dev, "%x:%x:%x:%x",
>                                   sbdev->e_addr.manf_id,
> --
> 2.21.0

The edits look fine to me.

-Saravana

  reply	other threads:[~2020-05-11 18:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-11 15:13 [PATCH 0/2] slimbus: patches for 5.8 Srinivas Kandagatla
2020-05-11 15:13 ` [PATCH 1/2] slimbus: core: Set fwnode for a device when setting of_node Srinivas Kandagatla
2020-05-11 18:14   ` Saravana Kannan [this message]
2020-05-11 15:13 ` [PATCH 2/2] slimbus: core: Fix mismatch in of_node_get/put Srinivas Kandagatla
2020-05-11 18:15   ` Saravana Kannan

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='CAGETcx8+khWkCUffwWqHit1c-koKFqLKJbRZTF_ZnDX=srJ=pg@mail.gmail.com' \
    --to=saravanak@google.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=srinivas.kandagatla@linaro.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;
as well as URLs for NNTP newsgroup(s).