As we're getting rid of an specific number range for the V4L2 subdev, we need to replace the check for MEDIA_ENT_T_V4L2_SUBDEV by a macro.
Unified · Split
| @@ -447,8 +447,11 @@ static int ipipe_link_setup(struct media_entity *entity, · 446 unmodified lines | |||
| 447 | struct iss_ipipe_device *ipipe = v4l2_get_subdevdata(sd); | 447 | struct iss_ipipe_device *ipipe = v4l2_get_subdevdata(sd); |
| 448 | struct iss_device *iss = to_iss_device(ipipe); | 448 | struct iss_device *iss = to_iss_device(ipipe); |
| 449 | 449 | ||
| 450 | switch (local->index | media_entity_type(remote->entity)) { | 450 | if (!is_media_entity_v4l2_subdev(remote->entity)) |
| 451 | case IPIPE_PAD_SINK | MEDIA_ENT_T_V4L2_SUBDEV: | 451 | return -EINVAL; |
| 452 | |||
| 453 | switch (local->index) { | ||
| 454 | case IPIPE_PAD_SINK: | ||
| 452 | /* Read from IPIPEIF. */ | 455 | /* Read from IPIPEIF. */ |
| 453 | if (!(flags & MEDIA_LNK_FL_ENABLED)) { | 456 | if (!(flags & MEDIA_LNK_FL_ENABLED)) { |
| 454 | ipipe->input = IPIPE_INPUT_NONE; | 457 | ipipe->input = IPIPE_INPUT_NONE; |
| @@ -463,7 +466,7 @@ static int ipipe_link_setup(struct media_entity *entity, · 8 unmodified lines | |||
| 463 | 466 | ||
| 464 | break; | 467 | break; |
| 465 | 468 | ||
| 466 | case IPIPE_PAD_SOURCE_VP | MEDIA_ENT_T_V4L2_SUBDEV: | 469 | case IPIPE_PAD_SOURCE_VP: |
| 467 | /* Send to RESIZER */ | 470 | /* Send to RESIZER */ |
| 468 | if (flags & MEDIA_LNK_FL_ENABLED) { | 471 | if (flags & MEDIA_LNK_FL_ENABLED) { |
| 469 | if (ipipe->output & ~IPIPE_OUTPUT_VP) | 472 | if (ipipe->output & ~IPIPE_OUTPUT_VP) |