public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-i2c@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v1 1/1] i2c: core: Do not dereference fwnode in struct device
Date: Thu, 9 Dec 2021 09:44:49 +0100	[thread overview]
Message-ID: <YbHCAURU5bR3XFL2@ninjato> (raw)
In-Reply-To: <20211207162457.18450-1-andriy.shevchenko@linux.intel.com>

[-- Attachment #1: Type: text/plain, Size: 957 bytes --]


>  	client->dev.parent = &client->adapter->dev;
>  	client->dev.bus = &i2c_bus_type;
>  	client->dev.type = &i2c_client_type;
> -	client->dev.of_node = of_node_get(info->of_node);
> -	client->dev.fwnode = info->fwnode;
>  
>  	device_enable_async_suspend(&client->dev);
>  	i2c_dev_set_name(adap, client, info);
>  
> +	device_set_node(&client->dev, info->fwnode);
> +	client->dev.of_node = of_node_get(info->of_node);
> +

I am basically OK with this change. I'd just move the code block a
little to have the same behaviour as before. Something like this
(hand-edited preview version):

>  	client->dev.bus = &i2c_bus_type;
>  	client->dev.type = &i2c_client_type;
>  	client->dev.of_node = of_node_get(info->of_node);
> -	client->dev.fwnode = info->fwnode;
>  
> +	device_set_node(&client->dev, info->fwnode);
>  	device_enable_async_suspend(&client->dev);
>  	i2c_dev_set_name(adap, client, info);

Are you okay with that?


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2021-12-09  8:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-07 16:24 [PATCH v1 1/1] i2c: core: Do not dereference fwnode in struct device Andy Shevchenko
2021-12-09  8:44 ` Wolfram Sang [this message]
2021-12-09 10:08   ` Andy Shevchenko

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=YbHCAURU5bR3XFL2@ninjato \
    --to=wsa+renesas@sang-engineering.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@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