diff options
author | Shuah Khan <shuahkh@osg.samsung.com> | 2015-06-05 16:11:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2016-01-11 09:05:48 -0500 |
commit | e576d60bb21e7add884f052ff0e5c28ebf7b7461 (patch) | |
tree | 9fdca34693e5dcab450a1bdcee20817332bd5c6b /include/media | |
parent | d062f91193dbd5a0c1d8469c8517ec8dd552c3f2 (diff) |
[media] media: define Media Controller API when CONFIG_MEDIA_CONTROLLER enabled
Change to define Media Controller API when CONFIG_MEDIA_CONTROLLER
is enabled. Define stubs for CONFIG_MEDIA_CONTROLLER disabled case.
This will help avoid drivers needing to enclose Media Controller
code within ifdef CONFIG_MEDIA_CONTROLLER block.
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'include/media')
-rw-r--r-- | include/media/media-device.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/media/media-device.h b/include/media/media-device.h index 22792cd5b1d1..a44f18fdf321 100644 --- a/include/media/media-device.h +++ b/include/media/media-device.h | |||
@@ -80,6 +80,8 @@ struct media_device { | |||
80 | unsigned int notification); | 80 | unsigned int notification); |
81 | }; | 81 | }; |
82 | 82 | ||
83 | #ifdef CONFIG_MEDIA_CONTROLLER | ||
84 | |||
83 | /* Supported link_notify @notification values. */ | 85 | /* Supported link_notify @notification values. */ |
84 | #define MEDIA_DEV_NOTIFY_PRE_LINK_CH 0 | 86 | #define MEDIA_DEV_NOTIFY_PRE_LINK_CH 0 |
85 | #define MEDIA_DEV_NOTIFY_POST_LINK_CH 1 | 87 | #define MEDIA_DEV_NOTIFY_POST_LINK_CH 1 |
@@ -102,4 +104,29 @@ struct media_device *media_device_find_devres(struct device *dev); | |||
102 | #define media_device_for_each_entity(entity, mdev) \ | 104 | #define media_device_for_each_entity(entity, mdev) \ |
103 | list_for_each_entry(entity, &(mdev)->entities, list) | 105 | list_for_each_entry(entity, &(mdev)->entities, list) |
104 | 106 | ||
107 | #else | ||
108 | static inline int media_device_register(struct media_device *mdev) | ||
109 | { | ||
110 | return 0; | ||
111 | } | ||
112 | static inline void media_device_unregister(struct media_device *mdev) | ||
113 | { | ||
114 | } | ||
115 | static inline int media_device_register_entity(struct media_device *mdev, | ||
116 | struct media_entity *entity) | ||
117 | { | ||
118 | return 0; | ||
119 | } | ||
120 | static inline void media_device_unregister_entity(struct media_entity *entity) | ||
121 | { | ||
122 | } | ||
123 | static inline struct media_device *media_device_get_devres(struct device *dev) | ||
124 | { | ||
125 | return NULL; | ||
126 | } | ||
127 | static inline struct media_device *media_device_find_devres(struct device *dev) | ||
128 | { | ||
129 | return NULL; | ||
130 | } | ||
131 | #endif /* CONFIG_MEDIA_CONTROLLER */ | ||
105 | #endif | 132 | #endif |