HID: simplify implement() a bit
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Wed, 6 Apr 2016 17:19:58 +0000 (10:19 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 7 Apr 2016 13:45:09 +0000 (15:45 +0200)
commit95d1c8951e5bd50bb89654a99a7012b1e75646bd
tree80f1e3f656c80f7ef27c0159418f69cce68ce731
parent6edac6fde59e231bd297ebcbc3d1bd395006cd1d
HID: simplify implement() a bit

The 'size' variable is not really needed, and we can also shift constant
in the loop body when masking off existing bits.

Also we do not have to use 64 bit calculations if we take an extra
branch.

[jkosina@suse.cz: fix a small error in changelog]
Suggested-by: Doug Anderson <dianders@chromium.org>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-core.c