@@ -1120,7 +1120,7 @@ static int mira220_power_on(struct device *dev)
1120
1120
goto clk_off ;
1121
1121
}
1122
1122
fsleep (MIRA220_XCLR_MIN_DELAY_US );
1123
-
1123
+
1124
1124
return 0 ;
1125
1125
1126
1126
clk_off :
@@ -1426,9 +1426,8 @@ static int mira220_enum_mbus_code(struct v4l2_subdev *sd,
1426
1426
{
1427
1427
struct mira220 * mira220 = to_mira220 (sd );
1428
1428
1429
- if (code -> index >= (ARRAY_SIZE (mira220_mbus_formats ) / 4 )) {
1429
+ if (code -> index >= (ARRAY_SIZE (mira220_mbus_formats ) / 4 ))
1430
1430
return - EINVAL ;
1431
- }
1432
1431
1433
1432
code -> code = mira220_get_format_code (
1434
1433
mira220 , mira220_mbus_formats [code -> index * 4 ]);
@@ -1441,14 +1440,15 @@ static int mira220_enum_frame_size(struct v4l2_subdev *sd,
1441
1440
struct v4l2_subdev_frame_size_enum * fse )
1442
1441
{
1443
1442
struct mira220 * mira220 = to_mira220 (sd );
1443
+ u32 code ;
1444
1444
1445
- if (fse -> index >= ARRAY_SIZE (supported_modes )){
1445
+ if (fse -> index >= ARRAY_SIZE (supported_modes ))
1446
1446
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 )
1450
1450
return - EINVAL ;
1451
- }
1451
+
1452
1452
fse -> min_width = supported_modes [fse -> index ].width ;
1453
1453
fse -> max_width = fse -> min_width ;
1454
1454
fse -> min_height = supported_modes [fse -> index ].height ;
@@ -1543,7 +1543,6 @@ static int mira220_get_selection(struct v4l2_subdev *sd,
1543
1543
sel -> r .left = 0 ;
1544
1544
sel -> r .width = MIRA220_NATIVE_WIDTH ;
1545
1545
sel -> r .height = MIRA220_NATIVE_HEIGHT ;
1546
-
1547
1546
return 0 ;
1548
1547
1549
1548
case V4L2_SEL_TGT_CROP_DEFAULT :
@@ -1552,15 +1551,15 @@ static int mira220_get_selection(struct v4l2_subdev *sd,
1552
1551
sel -> r .left = MIRA220_PIXEL_ARRAY_LEFT ;
1553
1552
sel -> r .width = MIRA220_PIXEL_ARRAY_WIDTH ;
1554
1553
sel -> r .height = MIRA220_PIXEL_ARRAY_HEIGHT ;
1555
-
1556
1554
return 0 ;
1557
1555
}
1558
1556
1559
1557
return - EINVAL ;
1560
1558
}
1561
1559
1562
1560
static int mira220_start_streaming (struct mira220 * mira220 ,
1563
- struct v4l2_subdev_state * state ){
1561
+ struct v4l2_subdev_state * state )
1562
+ {
1564
1563
struct i2c_client * client = v4l2_get_subdevdata (& mira220 -> sd );
1565
1564
const struct mira220_reg_list * reg_list ;
1566
1565
int ret ;
0 commit comments