summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/ttpci/av7110_v4l.c
diff options
context:
space:
mode:
Diffstat (limited to 'linux/drivers/media/dvb/ttpci/av7110_v4l.c')
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_v4l.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
index a70fdaa46..dac4dde47 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -38,20 +38,17 @@
#define DEBUG_VARIABLE av7110_debug
extern int av7110_debug;
-#include "dvb_i2c.h"
#include "av7110.h"
#include "av7110_hw.h"
#include "av7110_av.h"
#include "dvb_functions.h"
-
int msp_writereg(struct av7110 *av7110, u8 dev, u16 reg, u16 val)
{
u8 msg[5] = { dev, reg >> 8, reg & 0xff, val >> 8 , val & 0xff };
- struct dvb_i2c_bus *i2c = av7110->i2c_bus;
struct i2c_msg msgs = { .flags = 0, .addr = 0x40, .len = 5, .buf = msg };
- if (i2c->xfer(i2c, &msgs, 1) != 1) {
+ if (i2c_transfer(&av7110->i2c_adap, &msgs, 1) != 1) {
printk("av7110(%d): %s(%u = %u) failed\n",
av7110->dvb_adapter->num, __FUNCTION__, reg, val);
return -EIO;
@@ -63,13 +60,12 @@ int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val)
{
u8 msg1[3] = { dev, reg >> 8, reg & 0xff };
u8 msg2[2];
- struct dvb_i2c_bus *i2c = av7110->i2c_bus;
struct i2c_msg msgs[2] = {
{ .flags = 0, .addr = 0x40, .len = 3, .buf = msg1 },
{ .flags = I2C_M_RD, .addr = 0x40, .len = 2, .buf = msg2 }
};
- if (i2c->xfer(i2c, msgs, 2) != 2) {
+ if (i2c_transfer(&av7110->i2c_adap, &msgs[0], 2) != 2) {
printk("av7110(%d): %s(%u) failed\n",
av7110->dvb_adapter->num, __FUNCTION__, reg);
return -EIO;
@@ -78,8 +74,6 @@ int msp_readreg(struct av7110 *av7110, u8 dev, u16 reg, u16 *val)
return 0;
}
-
-
static struct v4l2_input inputs[2] = {
{
.index = 0,