提交 67200795 编写于 作者: J Jeremy Fitzhardinge 提交者: Jiri Kosina

HID: hid-input: fix compile for !HID_BATTERY_STRENGTH

As reported by Stephen Rothwell:
drivers/hid/hid-input.c: In function 'hidinput_hid_event':
drivers/hid/hid-input.c:865:6: error: 'struct hid_device' has no member
named 'battery_val'
drivers/hid/hid-input.c:866:3: error: 'struct hid_device' has no member
named 'battery_min'
drivers/hid/hid-input.c:866:3: error: 'struct hid_device' has no member
named 'battery_max'
Signed-off-by: NJeremy Fitzhardinge <jeremy@goop.org>
Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 4f5ca836
......@@ -861,13 +861,14 @@ 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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册