hid-sensor-hub.c: fix wrong do_div() usage

[ Upstream commit 8d43b49e7e ]

do_div() must only be used with a u64 dividend.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
Nicolas Pitre
2015-11-03 17:01:46 -05:00
committed by Greg Kroah-Hartman
parent bdf3c006b9
commit 2aeca9a27b

View File

@@ -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,