Skip to content

Commit 621c625

Browse files
spandruvadajic23
authored andcommitted
iio: hid-sensor-als: Return 0 for HID_USAGE_SENSOR_TIME_TIMESTAMP
When als_capture_sample() is called with usage ID HID_USAGE_SENSOR_TIME_TIMESTAMP, return 0. The HID sensor core ignores the return value for capture_sample() callback, so return value doesn't make difference. But correct the return value to return success instead of -EINVAL. Signed-off-by: Srinivas Pandruvada <[email protected]> Link: https://lore.kernel.org/r/[email protected] Cc: <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 6f6c72a commit 621c625

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

drivers/iio/light/hid-sensor-als.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ static int als_capture_sample(struct hid_sensor_hub_device *hsdev,
226226
case HID_USAGE_SENSOR_TIME_TIMESTAMP:
227227
als_state->timestamp = hid_sensor_convert_timestamp(&als_state->common_attributes,
228228
*(s64 *)raw_data);
229+
ret = 0;
229230
break;
230231
default:
231232
break;

0 commit comments

Comments
 (0)