@@ -2871,16 +2871,6 @@ struct comedi32_insnlist_struct {
2871
2871
compat_uptr_t insns ; /* 32-bit 'struct comedi_insn *' */
2872
2872
};
2873
2873
2874
- /* Handle translated ioctl. */
2875
- static int translated_ioctl (struct file * file , unsigned int cmd ,
2876
- unsigned long arg )
2877
- {
2878
- if (file -> f_op -> unlocked_ioctl )
2879
- return file -> f_op -> unlocked_ioctl (file , cmd , arg );
2880
-
2881
- return - ENOTTY ;
2882
- }
2883
-
2884
2874
/* Handle 32-bit COMEDI_CHANINFO ioctl. */
2885
2875
static int compat_chaninfo (struct file * file , unsigned long arg )
2886
2876
{
@@ -2912,7 +2902,7 @@ static int compat_chaninfo(struct file *file, unsigned long arg)
2912
2902
if (err )
2913
2903
return - EFAULT ;
2914
2904
2915
- return translated_ioctl (file , COMEDI_CHANINFO , (unsigned long )chaninfo );
2905
+ return comedi_unlocked_ioctl (file , COMEDI_CHANINFO , (unsigned long )chaninfo );
2916
2906
}
2917
2907
2918
2908
/* Handle 32-bit COMEDI_RANGEINFO ioctl. */
@@ -2942,7 +2932,7 @@ static int compat_rangeinfo(struct file *file, unsigned long arg)
2942
2932
if (err )
2943
2933
return - EFAULT ;
2944
2934
2945
- return translated_ioctl (file , COMEDI_RANGEINFO ,
2935
+ return comedi_unlocked_ioctl (file , COMEDI_RANGEINFO ,
2946
2936
(unsigned long )rangeinfo );
2947
2937
}
2948
2938
@@ -3063,7 +3053,7 @@ static int compat_cmd(struct file *file, unsigned long arg)
3063
3053
if (rc )
3064
3054
return rc ;
3065
3055
3066
- rc = translated_ioctl (file , COMEDI_CMD , (unsigned long )cmd );
3056
+ rc = comedi_unlocked_ioctl (file , COMEDI_CMD , (unsigned long )cmd );
3067
3057
if (rc == - EAGAIN ) {
3068
3058
/* Special case: copy cmd back to user. */
3069
3059
err = put_compat_cmd (cmd32 , cmd );
@@ -3088,7 +3078,7 @@ static int compat_cmdtest(struct file *file, unsigned long arg)
3088
3078
if (rc )
3089
3079
return rc ;
3090
3080
3091
- rc = translated_ioctl (file , COMEDI_CMDTEST , (unsigned long )cmd );
3081
+ rc = comedi_unlocked_ioctl (file , COMEDI_CMDTEST , (unsigned long )cmd );
3092
3082
if (rc < 0 )
3093
3083
return rc ;
3094
3084
@@ -3174,7 +3164,7 @@ static int compat_insnlist(struct file *file, unsigned long arg)
3174
3164
return rc ;
3175
3165
}
3176
3166
3177
- return translated_ioctl (file , COMEDI_INSNLIST ,
3167
+ return comedi_unlocked_ioctl (file , COMEDI_INSNLIST ,
3178
3168
(unsigned long )& s -> insnlist );
3179
3169
}
3180
3170
@@ -3192,7 +3182,7 @@ static int compat_insn(struct file *file, unsigned long arg)
3192
3182
if (rc )
3193
3183
return rc ;
3194
3184
3195
- return translated_ioctl (file , COMEDI_INSN , (unsigned long )insn );
3185
+ return comedi_unlocked_ioctl (file , COMEDI_INSN , (unsigned long )insn );
3196
3186
}
3197
3187
3198
3188
/*
@@ -3212,7 +3202,7 @@ static long comedi_compat_ioctl(struct file *file, unsigned int cmd, unsigned lo
3212
3202
case COMEDI_BUFINFO :
3213
3203
/* Just need to translate the pointer argument. */
3214
3204
arg = (unsigned long )compat_ptr (arg );
3215
- rc = translated_ioctl (file , cmd , arg );
3205
+ rc = comedi_unlocked_ioctl (file , cmd , arg );
3216
3206
break ;
3217
3207
case COMEDI_LOCK :
3218
3208
case COMEDI_UNLOCK :
@@ -3221,7 +3211,7 @@ static long comedi_compat_ioctl(struct file *file, unsigned int cmd, unsigned lo
3221
3211
case COMEDI_SETRSUBD :
3222
3212
case COMEDI_SETWSUBD :
3223
3213
/* No translation needed. */
3224
- rc = translated_ioctl (file , cmd , arg );
3214
+ rc = comedi_unlocked_ioctl (file , cmd , arg );
3225
3215
break ;
3226
3216
case COMEDI32_CHANINFO :
3227
3217
rc = compat_chaninfo (file , arg );
0 commit comments