diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2011-12-03 00:57:50 -0500 |
---|---|---|
committer | Jeremy Fitzhardinge <jeremy@goop.org> | 2012-01-08 02:31:18 -0500 |
commit | ce63920b395f1476e2d28cca16a56919289f0b62 (patch) | |
tree | 58105d4d6ee351b1e35df4ed027ba5deb3f07b96 | |
parent | b3ca3839f344aa469e6f53c8bbb633e5ab9b96c8 (diff) |
hid-input/battery: remove battery_val
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>
-rw-r--r-- | drivers/hid/hid-input.c | 8 | ||||
-rw-r--r-- | include/linux/hid.h | 1 |
2 files changed, 0 insertions, 9 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index ceade58b8027..48785db10e87 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -917,14 +917,6 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct | |||
917 | 917 | ||
918 | input = field->hidinput->input; | 918 | input = field->hidinput->input; |
919 | 919 | ||
920 | #ifdef CONFIG_HID_BATTERY_STRENGTH | ||
921 | if (usage->hid == HID_DC_BATTERYSTRENGTH) { | ||
922 | hid->battery_val = value; | ||
923 | hid_dbg(hid, "battery value is %d (range %d-%d)\n", | ||
924 | value, hid->battery_min, hid->battery_max); | ||
925 | return; | ||
926 | } | ||
927 | #endif | ||
928 | if (!usage->type) | 920 | if (!usage->type) |
929 | return; | 921 | return; |
930 | 922 | ||
diff --git a/include/linux/hid.h b/include/linux/hid.h index 9351d3d1d089..0e76f0ca110a 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h | |||
@@ -495,7 +495,6 @@ struct hid_device { /* device report descriptor */ | |||
495 | struct power_supply battery; | 495 | struct power_supply battery; |
496 | __s32 battery_min; | 496 | __s32 battery_min; |
497 | __s32 battery_max; | 497 | __s32 battery_max; |
498 | __s32 battery_val; | ||
499 | __s32 battery_report_type; | 498 | __s32 battery_report_type; |
500 | __s32 battery_report_id; | 499 | __s32 battery_report_id; |
501 | #endif | 500 | #endif |