]> err.no Git - linux-2.6/commitdiff
V4L/DVB (5934): dvb-ttpci/saa7146: Replace saa7146_i2c_transfer by generic i2c_transfer
authorOliver Endriss <o.endriss@gmx.de>
Mon, 23 Jul 2007 16:59:55 +0000 (13:59 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Wed, 10 Oct 2007 01:03:28 +0000 (22:03 -0300)
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>
drivers/media/common/saa7146_core.c
drivers/media/common/saa7146_i2c.c
drivers/media/dvb/ttpci/av7110_v4l.c
include/media/saa7146.h

index ba6701e97671ad0d37c474f5f3498f2f10b1d2b4..12cda9eebd12a83df3b0a6c89d9cbb03adb15f86 100644 (file)
@@ -548,7 +548,6 @@ EXPORT_SYMBOL_GPL(saa7146_wait_for_debi_done);
 
 EXPORT_SYMBOL_GPL(saa7146_setgpio);
 
-EXPORT_SYMBOL_GPL(saa7146_i2c_transfer);
 EXPORT_SYMBOL_GPL(saa7146_i2c_adapter_prepare);
 
 EXPORT_SYMBOL_GPL(saa7146_debug);
index 8c85efc26527fe9bf5bdd85473f014b568871876..f823286341ebd29d327fee76d122aecfd9a3cf3e 100644 (file)
@@ -277,7 +277,7 @@ static int saa7146_i2c_writeout(struct saa7146_dev *dev, u32* dword, int short_d
        return 0;
 }
 
-int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, int num, int retries)
+static int saa7146_i2c_transfer(struct saa7146_dev *dev, const struct i2c_msg *msgs, int num, int retries)
 {
        int i = 0, count = 0;
        u32* buffer = dev->d_i2c.cpu_addr;
index 87afaebc07032721ba6a70e5f41e13bfc3b318a5..76cca003252fdf6c69e5274651a0428aae4100fd 100644 (file)
@@ -129,23 +129,25 @@ static struct v4l2_input inputs[4] = {
 
 static int ves1820_writereg(struct saa7146_dev *dev, u8 addr, u8 reg, u8 data)
 {
+       struct av7110 *av7110 = dev->ext_priv;
        u8 buf[] = { 0x00, reg, data };
        struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = buf, .len = 3 };
 
        dprintk(4, "dev: %p\n", dev);
 
-       if (1 != saa7146_i2c_transfer(dev, &msg, 1, 1))
+       if (1 != i2c_transfer(&av7110->i2c_adap, &msg, 1))
                return -1;
        return 0;
 }
 
 static int tuner_write(struct saa7146_dev *dev, u8 addr, u8 data [4])
 {
+       struct av7110 *av7110 = dev->ext_priv;
        struct i2c_msg msg = { .addr = addr, .flags = 0, .buf = data, .len = 4 };
 
        dprintk(4, "dev: %p\n", dev);
 
-       if (1 != saa7146_i2c_transfer(dev, &msg, 1, 1))
+       if (1 != i2c_transfer(&av7110->i2c_adap, &msg, 1))
                return -1;
        return 0;
 }
index 67703249b2454b4adb54ed2731bfdd07a63e6462..cd3ff2c29d5e04828dc6a7d5ddb1da5f7f83fe4c 100644 (file)
@@ -146,7 +146,6 @@ struct saa7146_dev
 
 /* from saa7146_i2c.c */
 int saa7146_i2c_adapter_prepare(struct saa7146_dev *dev, struct i2c_adapter *i2c_adapter, u32 bitrate);
-int saa7146_i2c_transfer(struct saa7146_dev *saa, const struct i2c_msg *msgs, int num, int retries);
 
 /* from saa7146_core.c */
 extern struct list_head saa7146_devices;