[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YbHCAURU5bR3XFL2@ninjato>
Date: Thu, 9 Dec 2021 09:44:49 +0100
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc: linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v1 1/1] i2c: core: Do not dereference fwnode in struct
device
> 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?
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists