public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Media controller: Define media_entity_init() and media_entity_cleanup() conditionally
@ 2011-08-17 10:34 Deepthy Ravi
  2011-08-17 10:53 ` Andy Shevchenko
  2011-08-17 15:30 ` Hiremath, Vaibhav
  0 siblings, 2 replies; 5+ messages in thread
From: Deepthy Ravi @ 2011-08-17 10:34 UTC (permalink / raw)
  To: mchehab, linux-media, linux-kernel
  Cc: linux-omap, Vaibhav Hiremath, Deepthy Ravi

From: Vaibhav Hiremath <hvaibhav@ti.com>

Defines the two functions only when CONFIG_MEDIA_CONTROLLER
is enabled.

Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Deepthy Ravi <deepthy.ravi@ti.com>
---
 include/media/media-entity.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/media/media-entity.h b/include/media/media-entity.h
index cd8bca6..c90916e 100644
--- a/include/media/media-entity.h
+++ b/include/media/media-entity.h
@@ -121,9 +121,18 @@ struct media_entity_graph {
 	int top;
 };
 
+#ifdef CONFIG_MEDIA_CONTROLLER
 int media_entity_init(struct media_entity *entity, u16 num_pads,
 		struct media_pad *pads, u16 extra_links);
 void media_entity_cleanup(struct media_entity *entity);
+#else
+static inline int media_entity_init(struct media_entity *entity, u16 num_pads,
+		struct media_pad *pads, u16 extra_links)
+{
+	return 0;
+}
+static inline void media_entity_cleanup(struct media_entity *entity) {}
+#endif
 
 int media_entity_create_link(struct media_entity *source, u16 source_pad,
 		struct media_entity *sink, u16 sink_pad, u32 flags);
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-08-18 10:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-17 10:34 [PATCH] Media controller: Define media_entity_init() and media_entity_cleanup() conditionally Deepthy Ravi
2011-08-17 10:53 ` Andy Shevchenko
2011-08-18  9:03   ` Laurent Pinchart
2011-08-17 15:30 ` Hiremath, Vaibhav
2011-08-18 10:09   ` Ravi, Deepthy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox