}
static void uvc_ctrl_send_events(struct uvc_fh *handle,
- const struct v4l2_ext_control *xctrls, unsigned int xctrls_count)
+ struct uvc_entity *entity,
+ const struct v4l2_ext_control *xctrls,
+ unsigned int xctrls_count)
{
struct uvc_control_mapping *mapping;
struct uvc_control *ctrl;
u32 changes = V4L2_EVENT_CTRL_CH_VALUE;
ctrl = uvc_find_control(handle->chain, xctrls[i].id, &mapping);
+ if (ctrl->entity != entity)
+ continue;
+
if (ctrl->info.flags & UVC_CTRL_FLAG_ASYNCHRONOUS)
/* Notification will be sent from an Interrupt event. */
continue;
rollback);
if (ret < 0)
goto done;
+ else if (ret > 0 && !rollback)
+ uvc_ctrl_send_events(handle, entity, xctrls,
+ xctrls_count);
}
- if (!rollback)
- uvc_ctrl_send_events(handle, xctrls, xctrls_count);
ret = 0;
done:
mutex_unlock(&chain->ctrl_mutex);