mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
This commit is contained in:
committed by
Guenter Roeck
parent
b95ba51883
commit
331e5fd5bf
@@ -33,8 +33,6 @@
|
||||
#include <linux/sched/task.h>
|
||||
#include <linux/util_macros.h>
|
||||
|
||||
#include <linux/platform_data/ina2xx.h>
|
||||
|
||||
/* INA2XX registers definition */
|
||||
#define INA2XX_CONFIG 0x00
|
||||
#define INA2XX_SHUNT_VOLTAGE 0x01 /* readonly */
|
||||
@@ -980,16 +978,8 @@ static int ina2xx_probe(struct i2c_client *client)
|
||||
|
||||
mutex_init(&chip->state_lock);
|
||||
|
||||
if (of_property_read_u32(client->dev.of_node,
|
||||
"shunt-resistor", &val) < 0) {
|
||||
struct ina2xx_platform_data *pdata =
|
||||
dev_get_platdata(&client->dev);
|
||||
|
||||
if (pdata)
|
||||
val = pdata->shunt_uohms;
|
||||
else
|
||||
val = INA2XX_RSHUNT_DEFAULT;
|
||||
}
|
||||
if (of_property_read_u32(client->dev.of_node, "shunt-resistor", &val) < 0)
|
||||
val = INA2XX_RSHUNT_DEFAULT;
|
||||
|
||||
ret = set_shunt_resistor(chip, val);
|
||||
if (ret)
|
||||
|
||||
Reference in New Issue
Block a user