mirror of
https://github.com/armbian/linux.git
synced 2026-01-06 10:13:00 -08:00
hid-sensor-hub.c: fix wrong do_div() usage
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>
This commit is contained in:
committed by
Amit Pundir
parent
486057e233
commit
47ccdf2dba
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user