Hi Hans,

On Monday 26 April 2010 09:33:54 Hans Verkuil wrote:
> The cx25840 used a private control CX25840_CID_ENABLE_PVR150_WORKAROUND
> to be told whether to enable a workaround for certain pvr150 cards.
> 
> This is really config data that it needs to get at load time.
> 
> Implemented this in cx25840 and ivtv.
> 
> Signed-off-by: Hans Verkuil <hverk...@xs4all.nl>
> ---
>  drivers/media/video/cx25840/cx25840-core.c |   23 +++++++++++++++--------
>  drivers/media/video/cx25840/cx25840-core.h |    8 --------
>  drivers/media/video/ivtv/ivtv-driver.c     |    9 +--------
>  drivers/media/video/ivtv/ivtv-i2c.c        |    7 +++++++
>  include/media/cx25840.h                    |   11 +++++++++++
>  5 files changed, 34 insertions(+), 24 deletions(-)
> 
> diff --git a/drivers/media/video/cx25840/cx25840-core.c
> b/drivers/media/video/cx25840/cx25840-core.c index f2461cd..b8aa5d2 100644
> --- a/drivers/media/video/cx25840/cx25840-core.c
> +++ b/drivers/media/video/cx25840/cx25840-core.c

[snip]

> @@ -1601,10 +1593,25 @@ static int cx25840_log_status(struct v4l2_subdev
> *sd) return 0;
>  }
> 
> +static int cx25840_s_config(struct v4l2_subdev *sd, int irq, void
> *platform_data) +{
> +     struct cx25840_state *state = to_state(sd);
> +     struct i2c_client *client = v4l2_get_subdevdata(sd);
> +
> +     if (platform_data) {
> +             struct cx25840_platform_data *pdata = platform_data;
> +
> +             state->pvr150_workaround = pdata->pvr150_workaround;
> +             set_input(client, state->vid_input, state->aud_input);
> +     }
> +     return 0;
> +}
> +

You've told me that s_config was only meant for I2C devices in pre-2.6.26 
kernels. Shouldn't this be done in the probe function instead ?

-- 
Regards,

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

Reply via email to