diff options
author | Oliver Endriss <o.endriss@gmx.de> | 2007-07-23 12:59:55 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:03:28 -0400 |
commit | 36c15f8ee41fbc3d8eaf88bba95be3d50268d5d2 (patch) | |
tree | 8af3e4297ad04213271387df9b41a0cdfc916ca2 /drivers/media/dvb/ttpci | |
parent | ac247433fe205acf460f05de64a30ee71ea307f2 (diff) |
V4L/DVB (5934): dvb-ttpci/saa7146: Replace saa7146_i2c_transfer by generic i2c_transfer
Convert av7110_v4l.c to use i2c_transfer() instead of saa7146_i2c_transfer().
Make saa7146_i2c_transfer() static.
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/dvb/ttpci')
-rw-r--r-- | drivers/media/dvb/ttpci/av7110_v4l.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c index 87afaebc0703..76cca003252f 100644 --- a/drivers/media/dvb/ttpci/av7110_v4l.c +++ b/drivers/media/dvb/ttpci/av7110_v4l.c | |||
@@ -129,23 +129,25 @@ static struct v4l2_input inputs[4] = { | |||
129 | 129 | ||
130 | static int ves1820_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data) | 130 | static int ves1820_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data) |
131 | { | 131 | { |
132 | struct av7110 *av7110 = dev->ext_priv; | ||
132 | u8 buf[] = { 0x00, reg, data }; | 133 | u8 buf[] = { 0x00, reg, data }; |
133 | struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 3 }; | 134 | struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 3 }; |
134 | 135 | ||
135 | dprintk(4, "dev: %p\n", dev); | 136 | dprintk(4, "dev: %p\n", dev); |
136 | 137 | ||
137 | if (1 != saa7146_i2c_transfer(dev, &msg, 1, 1)) | 138 | if (1 != i2c_transfer(&av7110->i2c_adap, &msg, 1)) |
138 | return -1; | 139 | return -1; |
139 | return 0; | 140 | return 0; |
140 | } | 141 | } |
141 | 142 | ||
142 | static int tuner_write(struct saa7146_dev *dev, u8 addr, u8 data [4]) | 143 | static int tuner_write(struct saa7146_dev *dev, u8 addr, u8 data [4]) |
143 | { | 144 | { |
145 | struct av7110 *av7110 = dev->ext_priv; | ||
144 | struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = data, .len = 4 }; | 146 | struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = data, .len = 4 }; |
145 | 147 | ||
146 | dprintk(4, "dev: %p\n", dev); | 148 | dprintk(4, "dev: %p\n", dev); |
147 | 149 | ||
148 | if (1 != saa7146_i2c_transfer(dev, &msg, 1, 1)) | 150 | if (1 != i2c_transfer(&av7110->i2c_adap, &msg, 1)) |
149 | return -1; | 151 | return -1; |
150 | return 0; | 152 | return 0; |
151 | } | 153 | } |