diff options
-rw-r--r-- | drivers/hwmon/ltc2990.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/hwmon/ltc2990.c b/drivers/hwmon/ltc2990.c index f9431ad43ad3..53ff5051774c 100644 --- a/drivers/hwmon/ltc2990.c +++ b/drivers/hwmon/ltc2990.c | |||
@@ -13,7 +13,7 @@ | |||
13 | #include <linux/i2c.h> | 13 | #include <linux/i2c.h> |
14 | #include <linux/kernel.h> | 14 | #include <linux/kernel.h> |
15 | #include <linux/module.h> | 15 | #include <linux/module.h> |
16 | #include <linux/of.h> | 16 | #include <linux/property.h> |
17 | 17 | ||
18 | #define LTC2990_STATUS 0x00 | 18 | #define LTC2990_STATUS 0x00 |
19 | #define LTC2990_CONTROL 0x01 | 19 | #define LTC2990_CONTROL 0x01 |
@@ -206,7 +206,6 @@ static int ltc2990_i2c_probe(struct i2c_client *i2c, | |||
206 | int ret; | 206 | int ret; |
207 | struct device *hwmon_dev; | 207 | struct device *hwmon_dev; |
208 | struct ltc2990_data *data; | 208 | struct ltc2990_data *data; |
209 | struct device_node *of_node = i2c->dev.of_node; | ||
210 | 209 | ||
211 | if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_SMBUS_BYTE_DATA | | 210 | if (!i2c_check_functionality(i2c->adapter, I2C_FUNC_SMBUS_BYTE_DATA | |
212 | I2C_FUNC_SMBUS_WORD_DATA)) | 211 | I2C_FUNC_SMBUS_WORD_DATA)) |
@@ -218,9 +217,10 @@ static int ltc2990_i2c_probe(struct i2c_client *i2c, | |||
218 | 217 | ||
219 | data->i2c = i2c; | 218 | data->i2c = i2c; |
220 | 219 | ||
221 | if (of_node) { | 220 | if (dev_fwnode(&i2c->dev)) { |
222 | ret = of_property_read_u32_array(of_node, "lltc,meas-mode", | 221 | ret = device_property_read_u32_array(&i2c->dev, |
223 | data->mode, 2); | 222 | "lltc,meas-mode", |
223 | data->mode, 2); | ||
224 | if (ret < 0) | 224 | if (ret < 0) |
225 | return ret; | 225 | return ret; |
226 | 226 | ||