Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 366760
b: refs/heads/master
c: 2180f92
h: refs/heads/master
v: v3
  • Loading branch information
Hans Verkuil authored and Mauro Carvalho Chehab committed Mar 24, 2013
1 parent 1420def commit 5819643
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6cd247ef22e493e1884e576c066661538b031981
refs/heads/master: 2180f92def1921397f422f278b3cc65751b749cc
13 changes: 13 additions & 0 deletions trunk/include/media/v4l2-device.h
Original file line number Diff line number Diff line change
Expand Up @@ -190,4 +190,17 @@ v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev);
##args); \
})

#define v4l2_device_has_op(v4l2_dev, o, f) \
({ \
struct v4l2_subdev *__sd; \
bool __result = false; \
list_for_each_entry(__sd, &(v4l2_dev)->subdevs, list) { \
if (v4l2_subdev_has_op(__sd, o, f)) { \
__result = true; \
break; \
} \
} \
__result; \
})

#endif
3 changes: 3 additions & 0 deletions trunk/include/media/v4l2-subdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -687,4 +687,7 @@ void v4l2_subdev_init(struct v4l2_subdev *sd,
((!(sd) || !(sd)->v4l2_dev || !(sd)->v4l2_dev->notify) ? -ENODEV : \
(sd)->v4l2_dev->notify((sd), (notification), (arg)))

#define v4l2_subdev_has_op(sd, o, f) \
((sd)->ops->o && (sd)->ops->o->f)

#endif

0 comments on commit 5819643

Please sign in to comment.