Commit 6a01a12d authored by Chris Packham's avatar Chris Packham Committed by Guenter Roeck
Browse files

hwmon: (adt7475) Convert to use device_property APIs



Instead of of_property_read_*() use the equivalent
device_property_read_*() API. This will allow these properties to be
used on DT unaware platforms. For DT aware platforms this will be a
noop.

Signed-off-by: default avatarChris Packham <chris.packham@alliedtelesis.co.nz>
Link: https://lore.kernel.org/r/20230418233656.869055-3-chris.packham@alliedtelesis.co.nz


Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent bd594022
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -1468,7 +1468,7 @@ static int load_config3(const struct i2c_client *client, const char *propname)
	u8 config3;
	int ret;

	ret = of_property_read_string(client->dev.of_node, propname, &function);
	ret = device_property_read_string(&client->dev, propname, &function);
	if (!ret) {
		ret = adt7475_read(REG_CONFIG3);
		if (ret < 0)
@@ -1494,7 +1494,7 @@ static int load_config4(const struct i2c_client *client, const char *propname)
	u8 config4;
	int ret;

	ret = of_property_read_string(client->dev.of_node, propname, &function);
	ret = device_property_read_string(&client->dev, propname, &function);
	if (!ret) {
		ret = adt7475_read(REG_CONFIG4);
		if (ret < 0)
@@ -1556,7 +1556,7 @@ static int set_property_bit(const struct i2c_client *client, char *property,
			    u8 *config, u8 bit_index)
{
	u32 prop_value = 0;
	int ret = of_property_read_u32(client->dev.of_node, property,
	int ret = device_property_read_u32(&client->dev, property,
					   &prop_value);

	if (!ret) {