On Sunday 02 May 2010 22:41:29 Laurent Pinchart wrote:
> 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 <[email protected]>
> > ---
> > 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 ?
s_config is only meant for i2c drivers that have to support pre-2.6.26
kernels (only applicable for the hg tree, of course). And that is definitely
the case for cx25840.
As a side note: we could decide to ditch that backwards compatibility support
in the git tree of course, but I don't know how problematic that may turn out
to be for the hg tree maintenance. Anyway, I have too much to do already :-)
Regards,
Hans
--
Hans Verkuil - video4linux developer - sponsored by TANDBERG, part of Cisco
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html