Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
media-device.h File Reference
#include <linux/list.h>
#include <linux/mutex.h>
#include <linux/spinlock.h>
#include <media/media-devnode.h>
#include <media/media-entity.h>

Go to the source code of this file.

Data Structures

struct  media_device
 

Macros

#define to_media_device(node)   container_of(node, struct media_device, devnode)
 
#define media_device_for_each_entity(entity, mdev)   list_for_each_entry(entity, &(mdev)->entities, list)
 

Functions

int __must_check media_device_register (struct media_device *mdev)
 
void media_device_unregister (struct media_device *mdev)
 
int __must_check media_device_register_entity (struct media_device *mdev, struct media_entity *entity)
 
void media_device_unregister_entity (struct media_entity *entity)
 

Macro Definition Documentation

#define media_device_for_each_entity (   entity,
  mdev 
)    list_for_each_entry(entity, &(mdev)->entities, list)

Definition at line 93 of file media-device.h.

#define to_media_device (   node)    container_of(node, struct media_device, devnode)

Definition at line 83 of file media-device.h.

Function Documentation

int __must_check media_device_register ( struct media_device mdev)

media_device_register - register a media device : The media device

The caller is responsible for initializing the media device before registration. The following fields must be set:

  • dev must point to the parent device
  • model must be filled with the device model name

Definition at line 293 of file media-device.c.

int __must_check media_device_register_entity ( struct media_device mdev,
struct media_entity entity 
)

media_device_register_entity - Register an entity with a media device : The media device : The entity

Definition at line 346 of file media-device.c.

void media_device_unregister ( struct media_device mdev)

media_device_unregister - unregister a media device : The media device

Definition at line 328 of file media-device.c.

void media_device_unregister_entity ( struct media_entity entity)

media_device_unregister_entity - Unregister an entity : The entity

If the entity has never been registered this function will return immediately.

Definition at line 372 of file media-device.c.