hid-input/battery: remove battery_val
authorJeremy Fitzhardinge <jeremy@goop.org>
Sat, 3 Dec 2011 05:57:50 +0000 (21:57 -0800)
committerJeremy Fitzhardinge <jeremy@goop.org>
Sun, 8 Jan 2012 07:31:18 +0000 (18:31 +1100)
hidinput_get_battery_property() now directly polls the device for the
current battery strength, so there's no need for battery_val, or the
code to set it on the input event path.

Signed-off-by: Jeremy Fitzhardinge <jeremy@goop.org>
drivers/hid/hid-input.c
include/linux/hid.h

index ceade58b8027e1b39ffbb6dbd12a1a2e1b623d00..48785db10e87a88f4892a16516b656aeec7e4f95 100644 (file)
@@ -917,14 +917,6 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
 
        input = field->hidinput->input;
 
-#ifdef CONFIG_HID_BATTERY_STRENGTH
-       if (usage->hid == HID_DC_BATTERYSTRENGTH) {
-               hid->battery_val = value;
-               hid_dbg(hid, "battery value is %d (range %d-%d)\n",
-                       value, hid->battery_min, hid->battery_max);
-               return;
-       }
-#endif
        if (!usage->type)
                return;
 
index 9351d3d1d0899798aaf7c10d98fa3cf6be62121f..0e76f0ca110a7606ce74c47efe6e5d545b43b66f 100644 (file)
@@ -495,7 +495,6 @@ struct hid_device {                                                 /* device report descriptor */
        struct power_supply battery;
        __s32 battery_min;
        __s32 battery_max;
-       __s32 battery_val;
        __s32 battery_report_type;
        __s32 battery_report_id;
 #endif