Minor fix in VoE handler.

This commit is contained in:
Florian Pose
2009-02-02 13:32:48 +00:00
parent 5ea60780a0
commit e60948f4e1
2 changed files with 2 additions and 1 deletions

View File

@@ -142,7 +142,6 @@ ec_request_state_t ecrt_voe_handler_execute(ec_voe_handler_t *voe)
data.config_index = voe->config->index;
data.voe_index = voe->index;
data.size = 0;
if (ioctl(voe->config->master->fd, EC_IOCTL_VOE_EXEC, &data) == -1) {
fprintf(stderr, "Failed to execute VoE handler: %s\n",

View File

@@ -2347,6 +2347,8 @@ int ec_cdev_ioctl_voe_exec(
data.state = ecrt_voe_handler_execute(voe);
if (data.state == EC_REQUEST_SUCCESS && voe->dir == EC_DIR_INPUT)
data.size = ecrt_voe_handler_data_size(voe);
else
data.size = 0;
if (copy_to_user((void __user *) arg, &data, sizeof(data)))
return -EFAULT;