From c98de39f253978c18d6b0417c592816aa9c08e57 Mon Sep 17 00:00:00 2001 From: Michael Hunold Date: Tue, 19 Oct 2004 18:22:39 -0700 Subject: [PATCH] [PATCH] V4L: follow changes in saa7146 - [V4L] mxb, dpc7146, hexium_orion, hexium_gemini: follow latest changes in saa7146 driver Signed-off-by: Michael Hunold Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/media/video/dpc7146.c | 10 +++++++--- drivers/media/video/hexium_gemini.c | 9 +++++++-- drivers/media/video/hexium_orion.c | 9 +++++++-- drivers/media/video/mxb.c | 11 ++++++++--- 4 files changed, 29 insertions(+), 10 deletions(-) diff --git a/drivers/media/video/dpc7146.c b/drivers/media/video/dpc7146.c index d54244413805c..054708879490a 100644 --- a/drivers/media/video/dpc7146.c +++ b/drivers/media/video/dpc7146.c @@ -79,8 +79,8 @@ static struct saa7146_extension_ioctls ioctls[] = { struct dpc { - struct video_device video_dev; - struct video_device vbi_dev; + struct video_device *video_dev; + struct video_device *vbi_dev; struct i2c_adapter i2c_adapter; struct i2c_client *saa7111a; @@ -106,7 +106,11 @@ static int dpc_probe(struct saa7146_dev* dev) video port pins should be enabled here ?! */ saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26)); - saa7146_i2c_adapter_prepare(dev, &dpc->i2c_adapter, I2C_CLASS_TV_ANALOG, SAA7146_I2C_BUS_BIT_RATE_480); + dpc->i2c_adapter = (struct i2c_adapter) { + .class = I2C_CLASS_TV_ANALOG, + .name = "dpc7146", + }; + saa7146_i2c_adapter_prepare(dev, &dpc->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480); if(i2c_add_adapter(&dpc->i2c_adapter) < 0) { DEB_S(("cannot register i2c-device. skipping.\n")); kfree(dpc); diff --git a/drivers/media/video/hexium_gemini.c b/drivers/media/video/hexium_gemini.c index 885e504de0a10..50c436d036840 100644 --- a/drivers/media/video/hexium_gemini.c +++ b/drivers/media/video/hexium_gemini.c @@ -78,7 +78,8 @@ static struct v4l2_queryctrl hexium_controls[] = { struct hexium { int type; - struct video_device video_dev; + + struct video_device *video_dev; struct i2c_adapter i2c_adapter; int cur_input; /* current input */ @@ -250,7 +251,11 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d /* enable i2c-port pins */ saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26)); - saa7146_i2c_adapter_prepare(dev, &hexium->i2c_adapter, I2C_CLASS_TV_ANALOG, SAA7146_I2C_BUS_BIT_RATE_480); + hexium->i2c_adapter = (struct i2c_adapter) { + .class = I2C_CLASS_TV_ANALOG, + .name = "hexium gemini", + }; + saa7146_i2c_adapter_prepare(dev, &hexium->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480); if (i2c_add_adapter(&hexium->i2c_adapter) < 0) { DEB_S(("cannot register i2c-device. skipping.\n")); kfree(hexium); diff --git a/drivers/media/video/hexium_orion.c b/drivers/media/video/hexium_orion.c index 8a577d718b096..fba27bb4026ee 100644 --- a/drivers/media/video/hexium_orion.c +++ b/drivers/media/video/hexium_orion.c @@ -68,8 +68,9 @@ static struct saa7146_extension_ioctls ioctls[] = { struct hexium { int type; - struct video_device video_dev; + struct video_device *video_dev; struct i2c_adapter i2c_adapter; + int cur_input; /* current input */ }; @@ -237,7 +238,11 @@ static int hexium_probe(struct saa7146_dev *dev) saa7146_write(dev, DD1_STREAM_B, 0x00000000); saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); - saa7146_i2c_adapter_prepare(dev, &hexium->i2c_adapter, I2C_CLASS_TV_ANALOG, SAA7146_I2C_BUS_BIT_RATE_480); + hexium->i2c_adapter = (struct i2c_adapter) { + .class = I2C_CLASS_TV_ANALOG, + .name = "hexium orion", + }; + saa7146_i2c_adapter_prepare(dev, &hexium->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480); if (i2c_add_adapter(&hexium->i2c_adapter) < 0) { DEB_S(("cannot register i2c-device. skipping.\n")); kfree(hexium); diff --git a/drivers/media/video/mxb.c b/drivers/media/video/mxb.c index 121d626f03b66..16d0aee6b4128 100644 --- a/drivers/media/video/mxb.c +++ b/drivers/media/video/mxb.c @@ -128,8 +128,8 @@ static struct saa7146_extension_ioctls ioctls[] = { struct mxb { - struct video_device video_dev; - struct video_device vbi_dev; + struct video_device *video_dev; + struct video_device *vbi_dev; struct i2c_adapter i2c_adapter; @@ -183,7 +183,12 @@ static int mxb_probe(struct saa7146_dev* dev) } memset(mxb, 0x0, sizeof(struct mxb)); - saa7146_i2c_adapter_prepare(dev, &mxb->i2c_adapter, I2C_CLASS_TV_ANALOG, SAA7146_I2C_BUS_BIT_RATE_480); + mxb->i2c_adapter = (struct i2c_adapter) { + .class = I2C_CLASS_TV_ANALOG, + .name = "mxb", + }; + + saa7146_i2c_adapter_prepare(dev, &mxb->i2c_adapter, SAA7146_I2C_BUS_BIT_RATE_480); if(i2c_add_adapter(&mxb->i2c_adapter) < 0) { DEB_S(("cannot register i2c-device. skipping.\n")); kfree(mxb); -- 2.53.0