max17042: propagate of_node to power supply device

This commit is contained in:
Pierre Bourdon 2018-02-18 04:14:06 +01:00
parent 1e7c933fa4
commit 57c8ea9f76

View file

@ -1053,6 +1053,7 @@ static int max17042_probe(struct i2c_client *client,
i2c_set_clientdata(client, chip);
psy_cfg.drv_data = chip;
psy_cfg.of_node = dev->of_node;
/* When current is not measured,
* CURRENT_NOW and CURRENT_AVG properties should be invisible. */