diff options
| author | Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> | 2026-03-26 10:30:00 +0100 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2026-03-30 19:45:06 -0700 |
| commit | 331e5fd5bfd7aae3ab4eb947367b9d609ebb3fb3 (patch) | |
| tree | 2abfa7a642ff220928a4ed01045265784aa1131d /drivers/hwmon | |
| parent | b95ba51883fdfb60ab2633e0a5320a2f26f5298e (diff) | |
hwmon: (ina2xx) drop unused platform data
Nobody defines struct ina2xx_platform_data. Remove platform data support
from the drivers which still have it (it's effectively dead code) and
remove the header.
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@intel.com>
Acked-by: Jonathan Cameron <jonathan.cameron@huawei.com>
Link: https://lore.kernel.org/r/20260326-drop-ina2xx-pdata-v1-1-c159437bb2df@oss.qualcomm.com
[groeck: Fixed continuation line alignment]
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
| -rw-r--r-- | drivers/hwmon/ina209.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/drivers/hwmon/ina209.c b/drivers/hwmon/ina209.c index bd7b3380d847..a116f1600e81 100644 --- a/drivers/hwmon/ina209.c +++ b/drivers/hwmon/ina209.c @@ -27,8 +27,6 @@ #include <linux/hwmon.h> #include <linux/hwmon-sysfs.h> -#include <linux/platform_data/ina2xx.h> - /* register definitions */ #define INA209_CONFIGURATION 0x00 #define INA209_STATUS 0x01 @@ -487,7 +485,6 @@ static void ina209_restore_conf(struct i2c_client *client, static int ina209_init_client(struct i2c_client *client, struct ina209_data *data) { - struct ina2xx_platform_data *pdata = dev_get_platdata(&client->dev); u32 shunt; int reg; @@ -501,12 +498,8 @@ static int ina209_init_client(struct i2c_client *client, return reg; data->config_orig = reg; - if (pdata) { - if (pdata->shunt_uohms <= 0) - return -EINVAL; - shunt = pdata->shunt_uohms; - } else if (!of_property_read_u32(client->dev.of_node, "shunt-resistor", - &shunt)) { + if (!of_property_read_u32(client->dev.of_node, "shunt-resistor", + &shunt)) { if (shunt == 0) return -EINVAL; } else { |
