Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 87497
b: refs/heads/master
c: df9cb03
h: refs/heads/master
i:
  87495: 579b382
v: v3
  • Loading branch information
Darrick J. Wong authored and Linus Torvalds committed Mar 20, 2008
1 parent 3503ca6 commit 9df8a8e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 87cb055bc10571522f953925c25bb1a0d1b17605
refs/heads/master: df9cb0339f2c213bea5480464fa669ed4add7445
11 changes: 8 additions & 3 deletions trunk/drivers/hwmon/ibmpex.c
Original file line number Diff line number Diff line change
Expand Up @@ -327,10 +327,14 @@ static int is_temp_sensor(const char *sensor_id, int len)
return 0;
}

static int power_sensor_multiplier(const char *sensor_id, int len)
static int power_sensor_multiplier(struct ibmpex_bmc_data *data,
const char *sensor_id, int len)
{
int i;

if (data->sensor_major == 2)
return 1000000;

for (i = PEX_SENSOR_TYPE_LEN; i < len - 1; i++)
if (!memcmp(&sensor_id[i], watt_sensor_sig, PEX_MULT_LEN))
return 1000000;
Expand Down Expand Up @@ -398,8 +402,9 @@ static int ibmpex_find_sensors(struct ibmpex_bmc_data *data)
num_power++;
sensor_counter = num_power;
data->sensors[i].multiplier =
power_sensor_multiplier(data->rx_msg_data,
data->rx_msg_len);
power_sensor_multiplier(data,
data->rx_msg_data,
data->rx_msg_len);
} else if (is_temp_sensor(data->rx_msg_data,
data->rx_msg_len)) {
sensor_type = TEMP_SENSOR;
Expand Down

0 comments on commit 9df8a8e

Please sign in to comment.