diff mbox

[1/6] media: i2c: ths7303: remove init_enable option from pdata

Message ID 1368619042-28252-2-git-send-email-prabhakar.csengg@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lad, Prabhakar May 15, 2013, 11:57 a.m. UTC
From: Lad, Prabhakar <prabhakar.csengg@gmail.com>

This patch removes init_enable option from pdata, the init_enable
was intended that the device should start streaming video immediately
but ideally the bridge drivers should call s_stream explicitly for such
devices to start video.

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Sylwester Nawrocki <s.nawrocki@samsung.com>
Cc: Sakari Ailus <sakari.ailus@iki.fi>
Cc: linux-kernel@vger.kernel.org
Cc: davinci-linux-open-source@linux.davincidsp.com
---
 drivers/media/i2c/ths7303.c |    4 +---
 include/media/ths7303.h     |    2 --
 2 files changed, 1 insertions(+), 5 deletions(-)

Comments

Sakari Ailus May 16, 2013, 10:37 p.m. UTC | #1
Hi Prabhakar,

Thanks for the patch!

On Wed, May 15, 2013 at 05:27:17PM +0530, Lad Prabhakar wrote:
> diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
> index 65853ee..8cddcd0 100644
> --- a/drivers/media/i2c/ths7303.c
> +++ b/drivers/media/i2c/ths7303.c
> @@ -356,9 +356,7 @@ static int ths7303_setup(struct v4l2_subdev *sd)
>  	int ret;
>  	u8 mask;
>  
> -	state->stream_on = pdata->init_enable;
> -
> -	mask = state->stream_on ? 0xff : 0xf8;
> +	mask = 0xf8;

You can assign mask in declaration. It'd be nice to have a human-readable
name for the mask, too.
Lad, Prabhakar May 17, 2013, 4:56 a.m. UTC | #2
Hi Sakari,

Thanks for the review.

On Fri, May 17, 2013 at 4:07 AM, Sakari Ailus <sakari.ailus@iki.fi> wrote:
> Hi Prabhakar,
>
> Thanks for the patch!
>
> On Wed, May 15, 2013 at 05:27:17PM +0530, Lad Prabhakar wrote:
>> diff --git a/drivers/media/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
>> index 65853ee..8cddcd0 100644
>> --- a/drivers/media/i2c/ths7303.c
>> +++ b/drivers/media/i2c/ths7303.c
>> @@ -356,9 +356,7 @@ static int ths7303_setup(struct v4l2_subdev *sd)
>>       int ret;
>>       u8 mask;
>>
>> -     state->stream_on = pdata->init_enable;
>> -
>> -     mask = state->stream_on ? 0xff : 0xf8;
>> +     mask = 0xf8;
>
> You can assign mask in declaration. It'd be nice to have a human-readable
> name for the mask, too.
>
This function gets removed in the preceding patch of this series.

Regards,
--Prabhakar Lad
--
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/i2c/ths7303.c b/drivers/media/i2c/ths7303.c
index 65853ee..8cddcd0 100644
--- a/drivers/media/i2c/ths7303.c
+++ b/drivers/media/i2c/ths7303.c
@@ -356,9 +356,7 @@  static int ths7303_setup(struct v4l2_subdev *sd)
 	int ret;
 	u8 mask;
 
-	state->stream_on = pdata->init_enable;
-
-	mask = state->stream_on ? 0xff : 0xf8;
+	mask = 0xf8;
 
 	ret = ths7303_write(sd, THS7303_CHANNEL_1, pdata->ch_1 & mask);
 	if (ret)
diff --git a/include/media/ths7303.h b/include/media/ths7303.h
index 980ec51..a7b4929 100644
--- a/include/media/ths7303.h
+++ b/include/media/ths7303.h
@@ -30,13 +30,11 @@ 
  * @ch_1: Bias value for channel one.
  * @ch_2: Bias value for channel two.
  * @ch_3: Bias value for channel three.
- * @init_enable: initalize on init.
  */
 struct ths7303_platform_data {
 	u8 ch_1;
 	u8 ch_2;
 	u8 ch_3;
-	u8 init_enable;
 };
 
 #endif