Blackfin: abstract irq14 lowering in do_irq
[safe/jmp/linux-2.6] / drivers / acpi / battery.c
index 0f1c819..b0de631 100644 (file)
@@ -93,7 +93,7 @@ struct acpi_battery {
 #endif
        struct acpi_device *device;
        unsigned long update_time;
-       int current_now;
+       int rate_now;
        int capacity_now;
        int voltage_now;
        int design_capacity;
@@ -197,7 +197,8 @@ static int acpi_battery_get_property(struct power_supply *psy,
                val->intval = battery->voltage_now * 1000;
                break;
        case POWER_SUPPLY_PROP_CURRENT_NOW:
-               val->intval = battery->current_now * 1000;
+       case POWER_SUPPLY_PROP_POWER_NOW:
+               val->intval = battery->rate_now * 1000;
                break;
        case POWER_SUPPLY_PROP_CHARGE_FULL_DESIGN:
        case POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN:
@@ -248,6 +249,7 @@ static enum power_supply_property energy_battery_props[] = {
        POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
        POWER_SUPPLY_PROP_VOLTAGE_NOW,
        POWER_SUPPLY_PROP_CURRENT_NOW,
+       POWER_SUPPLY_PROP_POWER_NOW,
        POWER_SUPPLY_PROP_ENERGY_FULL_DESIGN,
        POWER_SUPPLY_PROP_ENERGY_FULL,
        POWER_SUPPLY_PROP_ENERGY_NOW,
@@ -274,7 +276,7 @@ struct acpi_offsets {
 
 static struct acpi_offsets state_offsets[] = {
        {offsetof(struct acpi_battery, state), 0},
-       {offsetof(struct acpi_battery, current_now), 0},
+       {offsetof(struct acpi_battery, rate_now), 0},
        {offsetof(struct acpi_battery, capacity_now), 0},
        {offsetof(struct acpi_battery, voltage_now), 0},
 };
@@ -606,11 +608,11 @@ static int acpi_battery_print_state(struct seq_file *seq, int result)
        else
                seq_printf(seq, "charging state:          charged\n");
 
-       if (battery->current_now == ACPI_BATTERY_VALUE_UNKNOWN)
+       if (battery->rate_now == ACPI_BATTERY_VALUE_UNKNOWN)
                seq_printf(seq, "present rate:            unknown\n");
        else
                seq_printf(seq, "present rate:            %d %s\n",
-                          battery->current_now, acpi_battery_units(battery));
+                          battery->rate_now, acpi_battery_units(battery));
 
        if (battery->capacity_now == ACPI_BATTERY_VALUE_UNKNOWN)
                seq_printf(seq, "remaining capacity:      unknown\n");
@@ -741,7 +743,7 @@ DECLARE_FILE_FUNCTIONS(alarm);
 static struct battery_file {
        struct file_operations ops;
        mode_t mode;
-       char *name;
+       const char *name;
 } acpi_battery_file[] = {
        FILE_DESCRIPTION_RO(info),
        FILE_DESCRIPTION_RO(state),
@@ -761,7 +763,6 @@ static int acpi_battery_add_fs(struct acpi_device *device)
                                                     acpi_battery_dir);
                if (!acpi_device_dir(device))
                        return -ENODEV;
-               acpi_device_dir(device)->owner = THIS_MODULE;
        }
 
        for (i = 0; i < ACPI_BATTERY_NUMFILES; ++i) {