File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1076,10 +1076,13 @@ static ssize_t it6505_aux_do_transfer(struct it6505 *it6505,
1076
1076
size_t size , enum aux_cmd_reply * reply )
1077
1077
{
1078
1078
int i , ret_size , ret = 0 , request_size ;
1079
+ int fifo_max_size = (cmd == CMD_AUX_I2C_EDID_READ ) ? AUX_FIFO_MAX_SIZE : 4 ;
1079
1080
1080
1081
mutex_lock (& it6505 -> aux_lock );
1081
- for (i = 0 ; i < size ; i += 4 ) {
1082
- request_size = min ((int )size - i , 4 );
1082
+ i = 0 ;
1083
+ do {
1084
+ request_size = min_t (int , (int )size - i , fifo_max_size );
1085
+
1083
1086
ret_size = it6505_aux_operation (it6505 , cmd , address + i ,
1084
1087
buffer + i , request_size ,
1085
1088
reply );
@@ -1088,8 +1091,9 @@ static ssize_t it6505_aux_do_transfer(struct it6505 *it6505,
1088
1091
goto aux_op_err ;
1089
1092
}
1090
1093
1094
+ i += request_size ;
1091
1095
ret += ret_size ;
1092
- }
1096
+ } while ( i < size );
1093
1097
1094
1098
aux_op_err :
1095
1099
mutex_unlock (& it6505 -> aux_lock );
You can’t perform that action at this time.
0 commit comments