@@ -1120,7 +1120,7 @@ static int mira220_power_on(struct device *dev)
11201120 goto clk_off ;
11211121 }
11221122 fsleep (MIRA220_XCLR_MIN_DELAY_US );
1123-
1123+
11241124 return 0 ;
11251125
11261126clk_off :
@@ -1426,9 +1426,8 @@ static int mira220_enum_mbus_code(struct v4l2_subdev *sd,
14261426{
14271427 struct mira220 * mira220 = to_mira220 (sd );
14281428
1429- if (code -> index >= (ARRAY_SIZE (mira220_mbus_formats ) / 4 )) {
1429+ if (code -> index >= (ARRAY_SIZE (mira220_mbus_formats ) / 4 ))
14301430 return - EINVAL ;
1431- }
14321431
14331432 code -> code = mira220_get_format_code (
14341433 mira220 , mira220_mbus_formats [code -> index * 4 ]);
@@ -1441,14 +1440,15 @@ static int mira220_enum_frame_size(struct v4l2_subdev *sd,
14411440 struct v4l2_subdev_frame_size_enum * fse )
14421441{
14431442 struct mira220 * mira220 = to_mira220 (sd );
1443+ u32 code ;
14441444
1445- if (fse -> index >= ARRAY_SIZE (supported_modes )){
1445+ if (fse -> index >= ARRAY_SIZE (supported_modes ))
14461446 return - EINVAL ;
1447- }
1448- if ( fse -> code !=
1449- mira220_get_format_code ( mira220 , fse -> code )){
1447+
1448+ code = mira220_get_format_code ( mira220 , fse -> code );
1449+ if ( fse -> code != code )
14501450 return - EINVAL ;
1451- }
1451+
14521452 fse -> min_width = supported_modes [fse -> index ].width ;
14531453 fse -> max_width = fse -> min_width ;
14541454 fse -> min_height = supported_modes [fse -> index ].height ;
@@ -1543,7 +1543,6 @@ static int mira220_get_selection(struct v4l2_subdev *sd,
15431543 sel -> r .left = 0 ;
15441544 sel -> r .width = MIRA220_NATIVE_WIDTH ;
15451545 sel -> r .height = MIRA220_NATIVE_HEIGHT ;
1546-
15471546 return 0 ;
15481547
15491548 case V4L2_SEL_TGT_CROP_DEFAULT :
@@ -1552,15 +1551,15 @@ static int mira220_get_selection(struct v4l2_subdev *sd,
15521551 sel -> r .left = MIRA220_PIXEL_ARRAY_LEFT ;
15531552 sel -> r .width = MIRA220_PIXEL_ARRAY_WIDTH ;
15541553 sel -> r .height = MIRA220_PIXEL_ARRAY_HEIGHT ;
1555-
15561554 return 0 ;
15571555 }
15581556
15591557 return - EINVAL ;
15601558}
15611559
15621560static int mira220_start_streaming (struct mira220 * mira220 ,
1563- struct v4l2_subdev_state * state ){
1561+ struct v4l2_subdev_state * state )
1562+ {
15641563 struct i2c_client * client = v4l2_get_subdevdata (& mira220 -> sd );
15651564 const struct mira220_reg_list * reg_list ;
15661565 int ret ;
0 commit comments