Re: [RFC/PATCH 05/10] media: Reference count and power handling

2010-07-20 Thread Laurent Pinchart
Hi Sakari, On Monday 19 July 2010 13:20:33 Sakari Ailus wrote: Hans Verkuil wrote: +/* + * Apply use count change to an entity and change power state based on + * new use count. + */ +static int media_entity_power_apply_one(struct media_entity *entity, int change) +{ +int

Re: [RFC/PATCH 05/10] media: Reference count and power handling

2010-07-20 Thread Sakari Ailus
Laurent Pinchart wrote: Hi Sakari, Heippa, ... To summarize the discussion, what should I change here ? Just remove the ret = in the second set_power call ? Yes, and also return 0 instead of ret, which is always zero at that point. -- Sakari Ailus sakari.ai...@maxwell.research.nokia.com

Re: [RFC/PATCH 05/10] media: Reference count and power handling

2010-07-19 Thread Sakari Ailus
Hi Hans, And thanks for the comments! Hans Verkuil wrote: ... +/* + * Apply use count change to an entity and change power state based on + * new use count. + */ +static int media_entity_power_apply_one(struct media_entity *entity, int change) +{ +int ret = 0; + +if

Re: [RFC/PATCH 05/10] media: Reference count and power handling

2010-07-19 Thread Hans Verkuil
Hi Hans, And thanks for the comments! Hans Verkuil wrote: ... +/* + * Apply use count change to an entity and change power state based on + * new use count. + */ +static int media_entity_power_apply_one(struct media_entity *entity, int change) +{ + int ret = 0; + + if

Re: [RFC/PATCH 05/10] media: Reference count and power handling

2010-07-19 Thread Sakari Ailus
Hans Verkuil wrote: Hi Hans, And thanks for the comments! Hans Verkuil wrote: ... +/* + * Apply use count change to an entity and change power state based on + * new use count. + */ +static int media_entity_power_apply_one(struct media_entity *entity, int change) +{ + int ret = 0;

Re: [RFC/PATCH 05/10] media: Reference count and power handling

2010-07-18 Thread Hans Verkuil
On Wednesday 14 July 2010 15:30:14 Laurent Pinchart wrote: From: Sakari Ailus sakari.ai...@maxwell.research.nokia.com Basically these are the interface functions: media_entity_get() - acquire entity media_entity_put() - release entity If the entity is of node type, the power

[RFC/PATCH 05/10] media: Reference count and power handling

2010-07-14 Thread Laurent Pinchart
From: Sakari Ailus sakari.ai...@maxwell.research.nokia.com Basically these are the interface functions: media_entity_get() - acquire entity media_entity_put() - release entity If the entity is of node type, the power change is distributed to all connected entities. For non-nodes