aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJeremy Fitzhardinge <jeremy@goop.org>2011-11-30 08:42:04 -0500
committerJiri Kosina <jkosina@suse.cz>2011-11-30 08:42:08 -0500
commit672007957846c3d556165bab635a9c9b855261fa (patch)
tree215c74047de4165e4c5a4e344a68d2e289576565 /drivers
parent4f5ca836bef3dd3eb602152d5d712a513998264e (diff)
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: Jeremy Fitzhardinge <jeremy@goop.org> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hid/hid-input.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 2d96b782b203..b9b8c75a6f9a 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -861,13 +861,14 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
861 861
862 input = field->hidinput->input; 862 input = field->hidinput->input;
863 863
864#ifdef CONFIG_HID_BATTERY_STRENGTH
864 if (usage->hid == HID_DC_BATTERYSTRENGTH) { 865 if (usage->hid == HID_DC_BATTERYSTRENGTH) {
865 hid->battery_val = value; 866 hid->battery_val = value;
866 hid_dbg(hid, "battery value is %d (range %d-%d)\n", 867 hid_dbg(hid, "battery value is %d (range %d-%d)\n",
867 value, hid->battery_min, hid->battery_max); 868 value, hid->battery_min, hid->battery_max);
868 return; 869 return;
869 } 870 }
870 871#endif
871 if (!usage->type) 872 if (!usage->type)
872 return; 873 return;
873 874