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>
This commit is contained in:
@@ -917,14 +917,6 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
|
|||||||
|
|
||||||
input = field->hidinput->input;
|
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)
|
if (!usage->type)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@@ -495,7 +495,6 @@ struct hid_device { /* device report descriptor */
|
|||||||
struct power_supply battery;
|
struct power_supply battery;
|
||||||
__s32 battery_min;
|
__s32 battery_min;
|
||||||
__s32 battery_max;
|
__s32 battery_max;
|
||||||
__s32 battery_val;
|
|
||||||
__s32 battery_report_type;
|
__s32 battery_report_type;
|
||||||
__s32 battery_report_id;
|
__s32 battery_report_id;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user