[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210329105047.51033-9-heikki.krogerus@linux.intel.com>
Date: Mon, 29 Mar 2021 13:50:43 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Wolfram Sang <wsa@...nel.org>
Cc: linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
Ajay Gupta <ajayg@...dia.com>
Subject: [PATCH 08/12] i2c: nvidia-gpu: Constify the software node
Additional device properties are always just a part of a
software fwnode. If the device properties are constant, the
software node can also be constant.
Signed-off-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Cc: Ajay Gupta <ajayg@...dia.com>
---
drivers/i2c/busses/i2c-nvidia-gpu.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/i2c/busses/i2c-nvidia-gpu.c b/drivers/i2c/busses/i2c-nvidia-gpu.c
index 6b20601ffb139..b5055a3cbd935 100644
--- a/drivers/i2c/busses/i2c-nvidia-gpu.c
+++ b/drivers/i2c/busses/i2c-nvidia-gpu.c
@@ -262,6 +262,10 @@ static const struct property_entry ccgx_props[] = {
{ }
};
+static const struct software_node ccgx_node = {
+ .properties = ccgx_props,
+};
+
static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
{
i2cd->gpu_ccgx_ucsi = devm_kzalloc(i2cd->dev,
@@ -274,7 +278,7 @@ static int gpu_populate_client(struct gpu_i2c_dev *i2cd, int irq)
sizeof(i2cd->gpu_ccgx_ucsi->type));
i2cd->gpu_ccgx_ucsi->addr = 0x8;
i2cd->gpu_ccgx_ucsi->irq = irq;
- i2cd->gpu_ccgx_ucsi->properties = ccgx_props;
+ i2cd->gpu_ccgx_ucsi->swnode = &ccgx_node;
i2cd->ccgx_client = i2c_new_client_device(&i2cd->adapter, i2cd->gpu_ccgx_ucsi);
return PTR_ERR_OR_ZERO(i2cd->ccgx_client);
}
--
2.30.2
Powered by blists - more mailing lists