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@linux.intel.com> Signed-off-by: Wolfram Sang <wsa@kernel.org>
This commit is contained in:
parent
f9c3d27343
commit
239798f5fb
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user