History

[media] omap4iss: change the logic that checks if an entity is a subdev

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.

Mauro Carvalho Chehab committed 11 years ago

Commit bf4178a1 parent 14fae6f1 file · +6 −3Browse files

Unified · Split

drivers/staging/media/omap4iss/iss_ipipe.c+6−3
@@ -447,8 +447,11 @@ static int ipipe_link_setup(struct media_entity *entity, · 446 unmodified lines
447447 struct iss_ipipe_device *ipipe = v4l2_get_subdevdata(sd);
448448 struct iss_device *iss = to_iss_device(ipipe);
449449
450− switch (local->index | media_entity_type(remote->entity)) {
451− case IPIPE_PAD_SINK | MEDIA_ENT_T_V4L2_SUBDEV:
450+ if (!is_media_entity_v4l2_subdev(remote->entity))
451+ return -EINVAL;
452+
453+ switch (local->index) {
454+ case IPIPE_PAD_SINK:
452455 /* Read from IPIPEIF. */
453456 if (!(flags & MEDIA_LNK_FL_ENABLED)) {
454457 ipipe->input = IPIPE_INPUT_NONE;
@@ -463,7 +466,7 @@ static int ipipe_link_setup(struct media_entity *entity, · 8 unmodified lines
463466
464467 break;
465468
466− case IPIPE_PAD_SOURCE_VP | MEDIA_ENT_T_V4L2_SUBDEV:
469+ case IPIPE_PAD_SOURCE_VP:
467470 /* Send to RESIZER */
468471 if (flags & MEDIA_LNK_FL_ENABLED) {
469472 if (ipipe->output & ~IPIPE_OUTPUT_VP)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t