Media controller: Define media_entity_init() and media_entity_cleanup() conditionally
Subsystems (2)
PATCH 1/1 Media controller: Define media_entity_init() and media_entity_cleanup() conditionally
From: Vaibhav Hiremath <[email protected]>
Defines the two functions only when CONFIG_MEDIA_CONTROLLER is enabled.
--- include/media/media-entity.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)
include/media/media-entity.h +9 -0
@@ -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);
Signature · 1 line
1.7.0.4
Quoted 4 lines · Deepthy Ravi
From: Vaibhav Hiremath <[email protected]>
Defines the two functions only when
CONFIG_MEDIA_CONTROLLERis enabled.
Is it not a driver's option to be dependent on MEDIA_CONTROLLER?
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Quoted 10 lines
-----Original Message-----
From: Ravi, Deepthy
Sent: Wednesday, August 17, 2011 4:05 PM
To: [email protected]; [email protected]; linux- [email protected]
Cc: [email protected]; Hiremath, Vaibhav; Ravi, Deepthy
Subject: [PATCH] Media controller: Definemedia_entity_init()andmedia_entity_cleanup()conditionally
Quoted 4 lines
From: Vaibhav Hiremath <[email protected]>
Defines the two functions only when
CONFIG_MEDIA_CONTROLLERis enabled.
[Hiremath, Vaibhav] Deepthy,
You may want to mention about build failure without MEDIA_CONTROLLER option being enabled, especially if any sensor driver is being used between MC and non-MC framework compatible devices. For example, OMAP3 and AM3517, where TVP5146 is being used but OMAP3 is based on MC framework and AM3517 is based on simple sub-dev based interface.
Thanks,
Vaibhav
Quoted 33 lines
Signed-off-by Vaibhav Hiremath <[email protected]>Signed-off-by Deepthy Ravi <[email protected]>--- include/media/media-entity.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)include/media/media-entity.h +9
-0@@ -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, u16sink_pad, u32 flags);
--
1.7.0.4
Laurent Pinchart
maintainerQuoted 7 lines · On Wednesday 17 August 2011 12:53:46 Andy Shevchenko wrote:
Quoted 4 lines · Deepthy Ravi
From: Vaibhav Hiremath <[email protected]>
Defines the two functions only when
CONFIG_MEDIA_CONTROLLERis enabled.Is it not a driver's option to be dependent on
MEDIA_CONTROLLER?
Yes it is.
Signature · 3 lines
Regards, Laurent Pinchart
Thanks,
Deepthy Ravi.
________________________________________
From: Hiremath, Vaibhav
Sent: Wednesday, August 17, 2011 9:00 PM
To: Ravi, Deepthy; [email protected]; [email protected]; [email protected]
Cc: [email protected]
Subject: RE: [PATCH] Media controller: Define media_entity_init() and media_entity_cleanup() conditionally
Quoted 9 lines
-----Original Message-----
From: Ravi, Deepthy
Sent: Wednesday, August 17, 2011 4:05 PM
To: [email protected]; [email protected]; linux- [email protected]
Cc: [email protected]; Hiremath, Vaibhav; Ravi, Deepthy
Subject: [PATCH] Media controller: Definemedia_entity_init()andmedia_entity_cleanup()conditionally
Quoted 4 lines
From: Vaibhav Hiremath <[email protected]>
Defines the two functions only when
CONFIG_MEDIA_CONTROLLERis enabled.
[Hiremath, Vaibhav] Deepthy,
You may want to mention about build failure without MEDIA_CONTROLLER option being enabled, especially if any sensor driver is being used between MC and non-MC framework compatible devices. For example, OMAP3 and AM3517, where TVP5146 is being used but OMAP3 is based on MC framework and AM3517 is based on simple sub-dev based interface.
[Deepthy Ravi] Ok. I will change description to include that.
Thanks,
Vaibhav
Quoted 33 lines
Signed-off-by Vaibhav Hiremath <[email protected]>Signed-off-by Deepthy Ravi <[email protected]>--- include/media/media-entity.h | 9 +++++++++ 1 files changed, 9 insertions(+), 0 deletions(-)include/media/media-entity.h +9
-0@@ -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