@@ -322,17 +322,10 @@ static void isp_subdev_propagate(struct v4l2_subdev *sd,
322322 r .width = ffmt [pad ]-> width ;
323323 r .height = ffmt [pad ]-> height ;
324324
325- #ifndef ISP2401
326- atomisp_subdev_set_selection (sd , cfg , which , pad , target , flags ,
327- & r );
325+ atomisp_subdev_set_selection (sd , cfg , which , pad ,
326+ target , flags , & r );
328327 break ;
329328 }
330- #else
331- atomisp_subdev_set_selection (sd , cfg , which , pad ,
332- target , flags , & r );
333- break ;
334- }
335- #endif
336329 }
337330}
338331
@@ -444,19 +437,10 @@ int atomisp_subdev_set_selection(struct v4l2_subdev *sd,
444437 i < ATOMISP_SUBDEV_PADS_NUM ; i ++ ) {
445438 struct v4l2_rect tmp = * crop [pad ];
446439
447- #ifndef ISP2401
448440 atomisp_subdev_set_selection (
449441 sd , cfg , which , i , V4L2_SEL_TGT_COMPOSE ,
450442 flags , & tmp );
451443 }
452- #else
453- atomisp_subdev_set_selection (sd , cfg ,
454- which , i ,
455- V4L2_SEL_TGT_COMPOSE ,
456- flags ,
457- & tmp );
458- }
459- #endif
460444 }
461445
462446 if (which == V4L2_SUBDEV_FORMAT_TRY )
@@ -611,24 +595,14 @@ static int atomisp_get_sensor_bin_factor(struct atomisp_sub_device *asd)
611595 return hbin ;
612596}
613597
614- #ifndef ISP2401
615- void atomisp_subdev_set_ffmt (struct v4l2_subdev * sd , struct v4l2_subdev_pad_config * cfg ,
616- uint32_t which , uint32_t pad ,
617- struct v4l2_mbus_framefmt * ffmt )
618- #else
619598void atomisp_subdev_set_ffmt (struct v4l2_subdev * sd ,
620599 struct v4l2_subdev_pad_config * cfg , uint32_t which ,
621600 uint32_t pad , struct v4l2_mbus_framefmt * ffmt )
622- #endif
623601{
624602 struct atomisp_sub_device * isp_sd = v4l2_get_subdevdata (sd );
625603 struct atomisp_device * isp = isp_sd -> isp ;
626604 struct v4l2_mbus_framefmt * __ffmt =
627- #ifndef ISP2401
628605 atomisp_subdev_get_ffmt (sd , cfg , which , pad );
629- #else
630- atomisp_subdev_get_ffmt (sd , cfg , which , pad );
631- #endif
632606 uint16_t vdev_pad = atomisp_subdev_source_pad (sd -> devnode );
633607 enum atomisp_input_stream_id stream_id ;
634608
@@ -692,12 +666,8 @@ void atomisp_subdev_set_ffmt(struct v4l2_subdev *sd,
692666 * to the format type.
693667 */
694668static int isp_subdev_get_format (struct v4l2_subdev * sd ,
695- #ifndef ISP2401
696- struct v4l2_subdev_pad_config * cfg , struct v4l2_subdev_format * fmt )
697- #else
698669 struct v4l2_subdev_pad_config * cfg ,
699670 struct v4l2_subdev_format * fmt )
700- #endif
701671{
702672 fmt -> format = * atomisp_subdev_get_ffmt (sd , cfg , fmt -> which , fmt -> pad );
703673
@@ -715,12 +685,8 @@ static int isp_subdev_get_format(struct v4l2_subdev *sd,
715685 * to the format type.
716686 */
717687static int isp_subdev_set_format (struct v4l2_subdev * sd ,
718- #ifndef ISP2401
719- struct v4l2_subdev_pad_config * cfg , struct v4l2_subdev_format * fmt )
720- #else
721688 struct v4l2_subdev_pad_config * cfg ,
722689 struct v4l2_subdev_format * fmt )
723- #endif
724690{
725691 atomisp_subdev_set_ffmt (sd , cfg , fmt -> which , fmt -> pad , & fmt -> format );
726692
@@ -736,30 +702,18 @@ static const struct v4l2_subdev_core_ops isp_subdev_v4l2_core_ops = {
736702
737703/* V4L2 subdev pad operations */
738704static const struct v4l2_subdev_pad_ops isp_subdev_v4l2_pad_ops = {
739- #ifndef ISP2401
740- .enum_mbus_code = isp_subdev_enum_mbus_code ,
741- .get_fmt = isp_subdev_get_format , .set_fmt = isp_subdev_set_format ,
742- .get_selection = isp_subdev_get_selection ,
743- .set_selection = isp_subdev_set_selection ,
744- .link_validate = v4l2_subdev_link_validate_default ,
745- #else
746705 .enum_mbus_code = isp_subdev_enum_mbus_code ,
747706 .get_fmt = isp_subdev_get_format ,
748707 .set_fmt = isp_subdev_set_format ,
749708 .get_selection = isp_subdev_get_selection ,
750709 .set_selection = isp_subdev_set_selection ,
751710 .link_validate = v4l2_subdev_link_validate_default ,
752- #endif
753711};
754712
755713/* V4L2 subdev operations */
756714static const struct v4l2_subdev_ops isp_subdev_v4l2_ops = {
757- #ifndef ISP2401
758- .core = & isp_subdev_v4l2_core_ops , .pad = & isp_subdev_v4l2_pad_ops ,
759- #else
760715 .core = & isp_subdev_v4l2_core_ops ,
761716 .pad = & isp_subdev_v4l2_pad_ops ,
762- #endif
763717};
764718
765719static void isp_subdev_init_params (struct atomisp_sub_device * asd )
@@ -1187,12 +1141,8 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
11871141 pads [ATOMISP_SUBDEV_PAD_SOURCE_CAPTURE ].flags = MEDIA_PAD_FL_SOURCE ;
11881142 pads [ATOMISP_SUBDEV_PAD_SOURCE_VIDEO ].flags = MEDIA_PAD_FL_SOURCE ;
11891143
1190- #ifndef ISP2401
11911144 asd -> fmt [ATOMISP_SUBDEV_PAD_SINK ].fmt .code =
11921145 MEDIA_BUS_FMT_SBGGR10_1X10 ;
1193- #else
1194- asd -> fmt [ATOMISP_SUBDEV_PAD_SINK ].fmt .code = MEDIA_BUS_FMT_SBGGR10_1X10 ;
1195- #endif
11961146 asd -> fmt [ATOMISP_SUBDEV_PAD_SOURCE_PREVIEW ].fmt .code =
11971147 MEDIA_BUS_FMT_SBGGR10_1X10 ;
11981148 asd -> fmt [ATOMISP_SUBDEV_PAD_SOURCE_VF ].fmt .code =
@@ -1209,39 +1159,19 @@ static int isp_subdev_init_entities(struct atomisp_sub_device *asd)
12091159 return ret ;
12101160
12111161 atomisp_init_subdev_pipe (asd , & asd -> video_in ,
1212- #ifndef ISP2401
1213- V4L2_BUF_TYPE_VIDEO_OUTPUT );
1214- #else
12151162 V4L2_BUF_TYPE_VIDEO_OUTPUT );
1216- #endif
12171163
12181164 atomisp_init_subdev_pipe (asd , & asd -> video_out_preview ,
1219- #ifndef ISP2401
1220- V4L2_BUF_TYPE_VIDEO_CAPTURE );
1221- #else
12221165 V4L2_BUF_TYPE_VIDEO_CAPTURE );
1223- #endif
12241166
12251167 atomisp_init_subdev_pipe (asd , & asd -> video_out_vf ,
1226- #ifndef ISP2401
1227- V4L2_BUF_TYPE_VIDEO_CAPTURE );
1228- #else
12291168 V4L2_BUF_TYPE_VIDEO_CAPTURE );
1230- #endif
12311169
12321170 atomisp_init_subdev_pipe (asd , & asd -> video_out_capture ,
1233- #ifndef ISP2401
1234- V4L2_BUF_TYPE_VIDEO_CAPTURE );
1235- #else
12361171 V4L2_BUF_TYPE_VIDEO_CAPTURE );
1237- #endif
12381172
12391173 atomisp_init_subdev_pipe (asd , & asd -> video_out_video_capture ,
1240- #ifndef ISP2401
1241- V4L2_BUF_TYPE_VIDEO_CAPTURE );
1242- #else
12431174 V4L2_BUF_TYPE_VIDEO_CAPTURE );
1244- #endif
12451175
12461176 atomisp_init_acc_pipe (asd , & asd -> video_acc );
12471177
@@ -1401,11 +1331,7 @@ void atomisp_subdev_cleanup_pending_events(struct atomisp_sub_device *asd)
14011331 unsigned int i , pending_event ;
14021332
14031333 list_for_each_entry_safe (fh , fh_tmp ,
1404- #ifndef ISP2401
14051334 & asd -> subdev .devnode -> fh_list , list ) {
1406- #else
1407- & asd -> subdev .devnode -> fh_list , list ) {
1408- #endif
14091335 pending_event = v4l2_event_pending (fh );
14101336 for (i = 0 ; i < pending_event ; i ++ )
14111337 v4l2_event_dequeue (fh , & event , 1 );
@@ -1471,9 +1397,6 @@ int atomisp_subdev_register_entities(struct atomisp_sub_device *asd,
14711397 return ret ;
14721398}
14731399
1474- #ifndef ISP2401
1475-
1476- #endif
14771400/*
14781401 * atomisp_subdev_init - ISP Subdevice initialization.
14791402 * @dev: Device pointer specific to the ATOM ISP.
0 commit comments