sizeof(compat_uptr_t);
unsigned int size, offset = 0;
void __user *user_ptr;
-#ifdef ISP2401
unsigned int stp, mtp, dcp, dscp = 0;
-#endif
if (!access_ok(VERIFY_READ, up, sizeof(struct atomisp_parameters32)))
return -EFAULT;
n--;
}
if (get_user(kp->isp_config_id, &up->isp_config_id) ||
-#ifndef ISP2401
- get_user(kp->per_frame_setting, &up->per_frame_setting))
-#else
get_user(kp->per_frame_setting, &up->per_frame_setting) ||
get_user(stp, &up->shading_table) ||
get_user(mtp, &up->morph_table) ||
get_user(dcp, &up->dvs2_coefs) ||
get_user(dscp, &up->dvs_6axis_config))
-#endif
return -EFAULT;
{
user_ptr = compat_alloc_user_space(size);
/* handle shading table */
-#ifndef ISP2401
- if (up->shading_table != 0) {
-#else
if (stp != 0) {
-#endif
if (get_atomisp_shading_table32(&karg.shading_table,
(struct atomisp_shading_table32 __user *)
-#ifndef ISP2401
- (uintptr_t)up->shading_table))
-#else
(uintptr_t)stp))
-#endif
return -EFAULT;
kp->shading_table = user_ptr + offset;
}
/* handle morph table */
-#ifndef ISP2401
- if (up->morph_table != 0) {
-#else
if (mtp != 0) {
-#endif
if (get_atomisp_morph_table32(&karg.morph_table,
(struct atomisp_morph_table32 __user *)
-#ifndef ISP2401
- (uintptr_t)up->morph_table))
-#else
(uintptr_t)mtp))
-#endif
return -EFAULT;
kp->morph_table = user_ptr + offset;
}
/* handle dvs2 coefficients */
-#ifndef ISP2401
- if (up->dvs2_coefs != 0) {
-#else
if (dcp != 0) {
-#endif
if (get_atomisp_dis_coefficients32(&karg.dvs2_coefs,
(struct atomisp_dis_coefficients32 __user *)
-#ifndef ISP2401
- (uintptr_t)up->dvs2_coefs))
-#else
(uintptr_t)dcp))
-#endif
return -EFAULT;
kp->dvs2_coefs = user_ptr + offset;
return -EFAULT;
}
/* handle dvs 6axis configuration */
-#ifndef ISP2401
- if (up->dvs_6axis_config != 0) {
-#else
if (dscp != 0) {
-#endif
if (get_atomisp_dvs_6axis_config32(&karg.dvs_6axis_config,
(struct atomisp_dvs_6axis_config32 __user *)
-#ifndef ISP2401
- (uintptr_t)up->dvs_6axis_config))
-#else
(uintptr_t)dscp))
-#endif
return -EFAULT;
kp->dvs_6axis_config = user_ptr + offset;