summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Endriss <o.endriss@gmx.de>2007-07-23 18:59:55 +0200
committerOliver Endriss <o.endriss@gmx.de>2007-07-23 18:59:55 +0200
commitf3f02f5343b042a516acb67637a00ee26ca06d79 (patch)
tree03fa67891f17941bcc5dc802068e0d76f6b45f55
parent056321ad6ae880ef351ccdf1180598cdeee63895 (diff)
downloadmediapointer-dvb-s2-f3f02f5343b042a516acb67637a00ee26ca06d79.tar.gz
mediapointer-dvb-s2-f3f02f5343b042a516acb67637a00ee26ca06d79.tar.bz2
dvb-ttpci/saa7146: Replace saa7146_i2c_transfer by generic i2c_transfer
From: Oliver Endriss <o.endriss@gmx.de> 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>
-rw-r--r--linux/drivers/media/common/saa7146_core.c1
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c2
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_v4l.c6
-rw-r--r--linux/include/media/saa7146.h1
4 files changed, 5 insertions, 5 deletions
diff --git a/linux/drivers/media/common/saa7146_core.c b/linux/drivers/media/common/saa7146_core.c
index a2ca9f1b8..ecb9d5da4 100644
--- a/linux/drivers/media/common/saa7146_core.c
+++ b/linux/drivers/media/common/saa7146_core.c
@@ -552,7 +552,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);
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index 3ae8660be..55e0598a0 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -278,7 +278,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;
diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
index 87afaebc0..76cca0032 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -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;
}
diff --git a/linux/include/media/saa7146.h b/linux/include/media/saa7146.h
index ffc67e4b8..825865d64 100644
--- a/linux/include/media/saa7146.h
+++ b/linux/include/media/saa7146.h
@@ -166,7 +166,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;