equal
deleted
inserted
replaced
535 unsigned long arg /**< Userspace address to store the results. */ |
535 unsigned long arg /**< Userspace address to store the results. */ |
536 ) |
536 ) |
537 { |
537 { |
538 ec_ioctl_domain_t data; |
538 ec_ioctl_domain_t data; |
539 const ec_domain_t *domain; |
539 const ec_domain_t *domain; |
|
540 unsigned int dev_idx; |
540 |
541 |
541 if (copy_from_user(&data, (void __user *) arg, sizeof(data))) { |
542 if (copy_from_user(&data, (void __user *) arg, sizeof(data))) { |
542 return -EFAULT; |
543 return -EFAULT; |
543 } |
544 } |
544 |
545 |
551 return -EINVAL; |
552 return -EINVAL; |
552 } |
553 } |
553 |
554 |
554 data.data_size = domain->data_size; |
555 data.data_size = domain->data_size; |
555 data.logical_base_address = domain->logical_base_address; |
556 data.logical_base_address = domain->logical_base_address; |
556 data.working_counter = |
557 for (dev_idx = 0; dev_idx < EC_NUM_DEVICES; dev_idx++) { |
557 domain->working_counter[EC_DEVICE_MAIN] |
558 data.working_counter[dev_idx] = domain->working_counter[dev_idx]; |
558 + domain->working_counter[EC_DEVICE_BACKUP]; |
559 } |
559 data.expected_working_counter = domain->expected_working_counter; |
560 data.expected_working_counter = domain->expected_working_counter; |
560 data.fmmu_count = ec_domain_fmmu_count(domain); |
561 data.fmmu_count = ec_domain_fmmu_count(domain); |
561 |
562 |
562 up(&master->master_sem); |
563 up(&master->master_sem); |
563 |
564 |