projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c2c4c4e
)
hid-sensor-hub.c: fix wrong do_div() usage
author
Nicolas Pitre
<nicolas.pitre@linaro.org>
Tue, 3 Nov 2015 22:01:46 +0000
(17:01 -0500)
committer
Guenter Roeck
<groeck@chromium.org>
Fri, 4 Mar 2016 20:38:47 +0000
(12:38 -0800)
do_div() must only be used with a u64 dividend.
Signed-off-by: Nicolas Pitre <nico@linaro.org>
(cherry picked from commit
8d43b49e7e0070f96ac46d30659a336c0224fa0b
)
Signed-off-by: Guenter Roeck <groeck@chromium.org>
drivers/hid/hid-sensor-hub.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hid/hid-sensor-hub.c
b/drivers/hid/hid-sensor-hub.c
index 92870cdb52d946a7408463a5b249129befd5e91d..8efaa88329aa3d40296fb5ff29aed1e20e2d1d37 100644
(file)
--- a/
drivers/hid/hid-sensor-hub.c
+++ b/
drivers/hid/hid-sensor-hub.c
@@
-218,7
+218,8
@@
int sensor_hub_set_feature(struct hid_sensor_hub_device *hsdev, u32 report_id,
goto done_proc;
}
- remaining_bytes = do_div(buffer_size, sizeof(__s32));
+ remaining_bytes = buffer_size % sizeof(__s32);
+ buffer_size = buffer_size / sizeof(__s32);
if (buffer_size) {
for (i = 0; i < buffer_size; ++i) {
hid_set_field(report->field[field_index], i,