diff mbox

mt9m111: Call icl->reset() on mt9m111_reset().

Message ID 20090217112339.f959035b.ospite@studenti.unina.it (mailing list archive)
State Accepted
Headers show

Commit Message

Antonio Ospite Feb. 17, 2009, 10:23 a.m. UTC
Call icl->reset() on mt9m111_reset().

Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Robert Jarzmik Feb. 17, 2009, 5:17 p.m. UTC | #1
Antonio Ospite <ospite@studenti.unina.it> writes:

> Call icl->reset() on mt9m111_reset().
>
> Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
>
> diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
> index c043f62..92dd7f3 100644
> --- a/drivers/media/video/mt9m111.c
> +++ b/drivers/media/video/mt9m111.c
> @@ -393,6 +393,8 @@ static int mt9m111_disable(struct soc_camera_device *icd)
>  
>  static int mt9m111_reset(struct soc_camera_device *icd)
>  {
> +	struct mt9m111 *mt9m111 = container_of(icd, struct mt9m111, icd);
> +	struct soc_camera_link *icl = mt9m111->client->dev.platform_data;
>  	int ret;
>  
>  	ret = reg_set(RESET, MT9M111_RESET_RESET_MODE);
> @@ -401,6 +403,10 @@ static int mt9m111_reset(struct soc_camera_device *icd)
>  	if (!ret)
>  		ret = reg_clear(RESET, MT9M111_RESET_RESET_MODE
>  				| MT9M111_RESET_RESET_SOC);
> +
> +	if (icl->reset)
> +		icl->reset(&mt9m111->client->dev);
> +
>  	return ret;
>  }
>  

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>

Guennadi, would you queue that up for next, please ?

Cheers.

--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Guennadi Liakhovetski Feb. 17, 2009, 6:05 p.m. UTC | #2
On Tue, 17 Feb 2009, Robert Jarzmik wrote:

> Antonio Ospite <ospite@studenti.unina.it> writes:
> 
> > Call icl->reset() on mt9m111_reset().
> >
> > Signed-off-by: Antonio Ospite <ospite@studenti.unina.it>
> >
> > diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
> > index c043f62..92dd7f3 100644
> > --- a/drivers/media/video/mt9m111.c
> > +++ b/drivers/media/video/mt9m111.c
> > @@ -393,6 +393,8 @@ static int mt9m111_disable(struct soc_camera_device *icd)
> >  
> >  static int mt9m111_reset(struct soc_camera_device *icd)
> >  {
> > +	struct mt9m111 *mt9m111 = container_of(icd, struct mt9m111, icd);
> > +	struct soc_camera_link *icl = mt9m111->client->dev.platform_data;
> >  	int ret;
> >  
> >  	ret = reg_set(RESET, MT9M111_RESET_RESET_MODE);
> > @@ -401,6 +403,10 @@ static int mt9m111_reset(struct soc_camera_device *icd)
> >  	if (!ret)
> >  		ret = reg_clear(RESET, MT9M111_RESET_RESET_MODE
> >  				| MT9M111_RESET_RESET_SOC);
> > +
> > +	if (icl->reset)
> > +		icl->reset(&mt9m111->client->dev);
> > +
> >  	return ret;
> >  }
> >  
> 
> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
> 
> Guennadi, would you queue that up for next, please ?

Queued.

Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/media/video/mt9m111.c b/drivers/media/video/mt9m111.c
index c043f62..92dd7f3 100644
--- a/drivers/media/video/mt9m111.c
+++ b/drivers/media/video/mt9m111.c
@@ -393,6 +393,8 @@  static int mt9m111_disable(struct soc_camera_device *icd)
 
 static int mt9m111_reset(struct soc_camera_device *icd)
 {
+	struct mt9m111 *mt9m111 = container_of(icd, struct mt9m111, icd);
+	struct soc_camera_link *icl = mt9m111->client->dev.platform_data;
 	int ret;
 
 	ret = reg_set(RESET, MT9M111_RESET_RESET_MODE);
@@ -401,6 +403,10 @@  static int mt9m111_reset(struct soc_camera_device *icd)
 	if (!ret)
 		ret = reg_clear(RESET, MT9M111_RESET_RESET_MODE
 				| MT9M111_RESET_RESET_SOC);
+
+	if (icl->reset)
+		icl->reset(&mt9m111->client->dev);
+
 	return ret;
 }