Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 305856
b: refs/heads/master
c: 9fe789f
h: refs/heads/master
v: v3
  • Loading branch information
Kyle McMartin authored and Guenter Roeck committed May 21, 2012
1 parent 9128122 commit 0676b1a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 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: f49d6a7ed2406b0c9b1c134f2e9aa4426a5266f0
refs/heads/master: 9fe789f88ae5488d8b8af1c4c962e619ed05bb2e
11 changes: 2 additions & 9 deletions trunk/drivers/hwmon/acpi_power_meter.c
Original file line number Diff line number Diff line change
Expand Up @@ -477,16 +477,12 @@ static ssize_t show_name(struct device *dev,
}

/* Sensor descriptions. If you add a sensor, update NUM_SENSORS above! */
static struct sensor_template meter_ro_attrs[] = {
static struct sensor_template meter_attrs[] = {
RO_SENSOR_TEMPLATE(POWER_AVERAGE_NAME, show_power, 0),
RO_SENSOR_TEMPLATE("power1_accuracy", show_accuracy, 0),
RO_SENSOR_TEMPLATE("power1_average_interval_min", show_val, 0),
RO_SENSOR_TEMPLATE("power1_average_interval_max", show_val, 1),
RO_SENSOR_TEMPLATE("power1_is_battery", show_val, 5),
{},
};

static struct sensor_template meter_rw_attrs[] = {
RW_SENSOR_TEMPLATE(POWER_AVG_INTERVAL_NAME, show_avg_interval,
set_avg_interval, 0),
{},
Expand Down Expand Up @@ -689,10 +685,7 @@ static int setup_attrs(struct acpi_power_meter_resource *resource)
return res;

if (resource->caps.flags & POWER_METER_CAN_MEASURE) {
res = register_attrs(resource, meter_ro_attrs);
if (res)
goto error;
res = register_attrs(resource, meter_rw_attrs);
res = register_attrs(resource, meter_attrs);
if (res)
goto error;
}
Expand Down

0 comments on commit 0676b1a

Please sign in to comment.