linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCHv2] ISP:BUILD:FIX: Move media_entity_init() and
@ 2011-08-19 13:48 Deepthy Ravi
  2011-08-24 10:17 ` Laurent Pinchart
  0 siblings, 1 reply; 16+ messages in thread
From: Deepthy Ravi @ 2011-08-19 13:48 UTC (permalink / raw)
  To: mchehab, linux-media, linux-kernel
  Cc: linux-omap, Vaibhav Hiremath, Deepthy Ravi

From: Vaibhav Hiremath <hvaibhav@ti.com>

Fix the build break caused when CONFIG_MEDIA_CONTROLLER
option is disabled and if any sensor driver has to be used
between MC and non MC framework compatible devices.

For example,if tvp514x video decoder driver migrated to
MC framework is being built without CONFIG_MEDIA_CONTROLLER
option enabled, the following error messages will result.
drivers/built-in.o: In function `tvp514x_remove':
drivers/media/video/tvp514x.c:1285: undefined reference to
`media_entity_cleanup'
drivers/built-in.o: In function `tvp514x_probe':
drivers/media/video/tvp514x.c:1237: undefined reference to
`media_entity_init'

The file containing definitions of media_entity_init and
media_entity_cleanup functions will not be built if that
config option is disabled. And this is corrected by
defining two dummy functions.

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] 16+ messages in thread

end of thread, other threads:[~2011-09-07  2:51 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-19 13:48 [PATCHv2] ISP:BUILD:FIX: Move media_entity_init() and Deepthy Ravi
2011-08-24 10:17 ` Laurent Pinchart
2011-08-24 11:21   ` Ravi, Deepthy
2011-08-24 11:29     ` Laurent Pinchart
2011-08-24 12:19       ` Hiremath, Vaibhav
2011-08-24 12:55         ` Andy Shevchenko
2011-08-24 13:19           ` Hiremath, Vaibhav
2011-08-24 13:25         ` Laurent Pinchart
2011-08-24 14:26           ` Hiremath, Vaibhav
2011-09-03 22:21           ` Mauro Carvalho Chehab
2011-09-04  9:01             ` Laurent Pinchart
2011-09-04 13:32               ` Mauro Carvalho Chehab
2011-09-05 12:49                 ` Laurent Pinchart
2011-09-06 14:12                   ` Hiremath, Vaibhav
2011-09-06 14:47                     ` Laurent Pinchart
2011-09-07  2:50                       ` Mauro Carvalho Chehab

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).