media-entity.h (b76a2a8cb6f6d9da711305d805156b40c698e94f) media-entity.h (45b46879a785678e08953c8f97df945bf634e472)
1/*
2 * Media entity
3 *
4 * Copyright (C) 2010 Nokia Corporation
5 *
6 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 * Sakari Ailus <sakari.ailus@iki.fi>
8 *

--- 344 unchanged lines hidden (view full) ---

353
354 id = type << MEDIA_BITS_PER_ID;
355 id |= local_id & MEDIA_ID_MASK;
356
357 return id;
358}
359
360/**
1/*
2 * Media entity
3 *
4 * Copyright (C) 2010 Nokia Corporation
5 *
6 * Contacts: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
7 * Sakari Ailus <sakari.ailus@iki.fi>
8 *

--- 344 unchanged lines hidden (view full) ---

353
354 id = type << MEDIA_BITS_PER_ID;
355 id |= local_id & MEDIA_ID_MASK;
356
357 return id;
358}
359
360/**
361 * is_media_entity_v4l2_io() - Check if the entity is a video_device
361 * is_media_entity_v4l2_video_device() - Check if the entity is a video_device
362 * @entity: pointer to entity
363 *
364 * Return: true if the entity is an instance of a video_device object and can
365 * safely be cast to a struct video_device using the container_of() macro, or
366 * false otherwise.
367 */
362 * @entity: pointer to entity
363 *
364 * Return: true if the entity is an instance of a video_device object and can
365 * safely be cast to a struct video_device using the container_of() macro, or
366 * false otherwise.
367 */
368static inline bool is_media_entity_v4l2_io(struct media_entity *entity)
368static inline bool is_media_entity_v4l2_video_device(struct media_entity *entity)
369{
370 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_VIDEO_DEVICE;
371}
372
373/**
374 * is_media_entity_v4l2_subdev() - Check if the entity is a v4l2_subdev
375 * @entity: pointer to entity
376 *

--- 596 unchanged lines hidden ---
369{
370 return entity && entity->obj_type == MEDIA_ENTITY_TYPE_VIDEO_DEVICE;
371}
372
373/**
374 * is_media_entity_v4l2_subdev() - Check if the entity is a v4l2_subdev
375 * @entity: pointer to entity
376 *

--- 596 unchanged lines hidden ---