Commit c98de39f authored by Michael Hunold's avatar Michael Hunold Committed by Linus Torvalds

[PATCH] V4L: follow changes in saa7146

- [V4L] mxb, dpc7146, hexium_orion, hexium_gemini: follow latest changes in
  saa7146 driver
Signed-off-by: default avatarMichael Hunold <hunold@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 779e52df
...@@ -79,8 +79,8 @@ static struct saa7146_extension_ioctls ioctls[] = { ...@@ -79,8 +79,8 @@ static struct saa7146_extension_ioctls ioctls[] = {
struct dpc struct dpc
{ {
struct video_device video_dev; struct video_device *video_dev;
struct video_device vbi_dev; struct video_device *vbi_dev;
struct i2c_adapter i2c_adapter; struct i2c_adapter i2c_adapter;
struct i2c_client *saa7111a; struct i2c_client *saa7111a;
...@@ -106,7 +106,11 @@ static int dpc_probe(struct saa7146_dev* dev) ...@@ -106,7 +106,11 @@ static int dpc_probe(struct saa7146_dev* dev)
video port pins should be enabled here ?! */ video port pins should be enabled here ?! */
saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26)); 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) { if(i2c_add_adapter(&dpc->i2c_adapter) < 0) {
DEB_S(("cannot register i2c-device. skipping.\n")); DEB_S(("cannot register i2c-device. skipping.\n"));
kfree(dpc); kfree(dpc);
......
...@@ -78,7 +78,8 @@ static struct v4l2_queryctrl hexium_controls[] = { ...@@ -78,7 +78,8 @@ static struct v4l2_queryctrl hexium_controls[] = {
struct hexium struct hexium
{ {
int type; int type;
struct video_device video_dev;
struct video_device *video_dev;
struct i2c_adapter i2c_adapter; struct i2c_adapter i2c_adapter;
int cur_input; /* current input */ int cur_input; /* current input */
...@@ -250,7 +251,11 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d ...@@ -250,7 +251,11 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d
/* enable i2c-port pins */ /* enable i2c-port pins */
saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26)); 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) { if (i2c_add_adapter(&hexium->i2c_adapter) < 0) {
DEB_S(("cannot register i2c-device. skipping.\n")); DEB_S(("cannot register i2c-device. skipping.\n"));
kfree(hexium); kfree(hexium);
......
...@@ -68,8 +68,9 @@ static struct saa7146_extension_ioctls ioctls[] = { ...@@ -68,8 +68,9 @@ static struct saa7146_extension_ioctls ioctls[] = {
struct hexium struct hexium
{ {
int type; int type;
struct video_device video_dev; struct video_device *video_dev;
struct i2c_adapter i2c_adapter; struct i2c_adapter i2c_adapter;
int cur_input; /* current input */ int cur_input; /* current input */
}; };
...@@ -237,7 +238,11 @@ static int hexium_probe(struct saa7146_dev *dev) ...@@ -237,7 +238,11 @@ static int hexium_probe(struct saa7146_dev *dev)
saa7146_write(dev, DD1_STREAM_B, 0x00000000); saa7146_write(dev, DD1_STREAM_B, 0x00000000);
saa7146_write(dev, MC2, (MASK_09 | MASK_25 | MASK_10 | MASK_26)); 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) { if (i2c_add_adapter(&hexium->i2c_adapter) < 0) {
DEB_S(("cannot register i2c-device. skipping.\n")); DEB_S(("cannot register i2c-device. skipping.\n"));
kfree(hexium); kfree(hexium);
......
...@@ -128,8 +128,8 @@ static struct saa7146_extension_ioctls ioctls[] = { ...@@ -128,8 +128,8 @@ static struct saa7146_extension_ioctls ioctls[] = {
struct mxb struct mxb
{ {
struct video_device video_dev; struct video_device *video_dev;
struct video_device vbi_dev; struct video_device *vbi_dev;
struct i2c_adapter i2c_adapter; struct i2c_adapter i2c_adapter;
...@@ -183,7 +183,12 @@ static int mxb_probe(struct saa7146_dev* dev) ...@@ -183,7 +183,12 @@ static int mxb_probe(struct saa7146_dev* dev)
} }
memset(mxb, 0x0, sizeof(struct mxb)); 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) { if(i2c_add_adapter(&mxb->i2c_adapter) < 0) {
DEB_S(("cannot register i2c-device. skipping.\n")); DEB_S(("cannot register i2c-device. skipping.\n"));
kfree(mxb); kfree(mxb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment