Commit 142c0901 authored by Vivien Didelot's avatar Vivien Didelot Committed by Guenter Roeck

hwmon: (sht15) avoid CamelCase

This patch renames the supply_uV* variables to supply_uv* to avoid
CamelCase as warned by the checkpatch.pl script.
Signed-off-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent 949db153
...@@ -139,12 +139,12 @@ static const u8 sht15_crc8_table[] = { ...@@ -139,12 +139,12 @@ static const u8 sht15_crc8_table[] = {
* @reg: associated regulator (if specified). * @reg: associated regulator (if specified).
* @nb: notifier block to handle notifications of voltage * @nb: notifier block to handle notifications of voltage
* changes. * changes.
* @supply_uV: local copy of supply voltage used to allow use of * @supply_uv: local copy of supply voltage used to allow use of
* regulator consumer if available. * regulator consumer if available.
* @supply_uV_valid: indicates that an updated value has not yet been * @supply_uv_valid: indicates that an updated value has not yet been
* obtained from the regulator and so any calculations * obtained from the regulator and so any calculations
* based upon it will be invalid. * based upon it will be invalid.
* @update_supply_work: work struct that is used to update the supply_uV. * @update_supply_work: work struct that is used to update the supply_uv.
* @interrupt_handled: flag used to indicate a handler has been scheduled. * @interrupt_handled: flag used to indicate a handler has been scheduled.
*/ */
struct sht15_data { struct sht15_data {
...@@ -166,8 +166,8 @@ struct sht15_data { ...@@ -166,8 +166,8 @@ struct sht15_data {
struct device *hwmon_dev; struct device *hwmon_dev;
struct regulator *reg; struct regulator *reg;
struct notifier_block nb; struct notifier_block nb;
int supply_uV; int supply_uv;
bool supply_uV_valid; bool supply_uv_valid;
struct work_struct update_supply_work; struct work_struct update_supply_work;
atomic_t interrupt_handled; atomic_t interrupt_handled;
}; };
...@@ -598,8 +598,8 @@ static inline int sht15_calc_temp(struct sht15_data *data) ...@@ -598,8 +598,8 @@ static inline int sht15_calc_temp(struct sht15_data *data)
for (i = ARRAY_SIZE(temppoints) - 1; i > 0; i--) for (i = ARRAY_SIZE(temppoints) - 1; i > 0; i--)
/* Find pointer to interpolate */ /* Find pointer to interpolate */
if (data->supply_uV > temppoints[i - 1].vdd) { if (data->supply_uv > temppoints[i - 1].vdd) {
d1 = (data->supply_uV - temppoints[i - 1].vdd) d1 = (data->supply_uv - temppoints[i - 1].vdd)
* (temppoints[i].d1 - temppoints[i - 1].d1) * (temppoints[i].d1 - temppoints[i - 1].d1)
/ (temppoints[i].vdd - temppoints[i - 1].vdd) / (temppoints[i].vdd - temppoints[i - 1].vdd)
+ temppoints[i - 1].d1; + temppoints[i - 1].d1;
...@@ -859,7 +859,7 @@ static void sht15_update_voltage(struct work_struct *work_s) ...@@ -859,7 +859,7 @@ static void sht15_update_voltage(struct work_struct *work_s)
struct sht15_data *data struct sht15_data *data
= container_of(work_s, struct sht15_data, = container_of(work_s, struct sht15_data,
update_supply_work); update_supply_work);
data->supply_uV = regulator_get_voltage(data->reg); data->supply_uv = regulator_get_voltage(data->reg);
} }
/** /**
...@@ -878,7 +878,7 @@ static int sht15_invalidate_voltage(struct notifier_block *nb, ...@@ -878,7 +878,7 @@ static int sht15_invalidate_voltage(struct notifier_block *nb,
struct sht15_data *data = container_of(nb, struct sht15_data, nb); struct sht15_data *data = container_of(nb, struct sht15_data, nb);
if (event == REGULATOR_EVENT_VOLTAGE_CHANGE) if (event == REGULATOR_EVENT_VOLTAGE_CHANGE)
data->supply_uV_valid = false; data->supply_uv_valid = false;
schedule_work(&data->update_supply_work); schedule_work(&data->update_supply_work);
return NOTIFY_OK; return NOTIFY_OK;
...@@ -906,7 +906,7 @@ static int sht15_probe(struct platform_device *pdev) ...@@ -906,7 +906,7 @@ static int sht15_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
} }
data->pdata = pdev->dev.platform_data; data->pdata = pdev->dev.platform_data;
data->supply_uV = data->pdata->supply_mv * 1000; data->supply_uv = data->pdata->supply_mv * 1000;
if (data->pdata->checksum) if (data->pdata->checksum)
data->checksumming = true; data->checksumming = true;
if (data->pdata->no_otp_reload) if (data->pdata->no_otp_reload)
...@@ -924,7 +924,7 @@ static int sht15_probe(struct platform_device *pdev) ...@@ -924,7 +924,7 @@ static int sht15_probe(struct platform_device *pdev)
voltage = regulator_get_voltage(data->reg); voltage = regulator_get_voltage(data->reg);
if (voltage) if (voltage)
data->supply_uV = voltage; data->supply_uv = voltage;
regulator_enable(data->reg); regulator_enable(data->reg);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment