summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-cards.c
diff options
context:
space:
mode:
authorSteven Toth2008-08-05 03:18:19 +0200
committerMauro Carvalho Chehab2008-10-12 13:36:49 +0200
commit89ce2216e338f62c411bea12df37a2f54f2ce13a (patch)
tree8df317f81f8c8896dbed193cff4b9c614910ba6d /drivers/media/video/cx23885/cx23885-cards.c
parentV4L/DVB (8645): Support IR remote on FusionHDTV DVB-T Dual Express (diff)
downloadkernel-qcow2-linux-89ce2216e338f62c411bea12df37a2f54f2ce13a.tar.gz
kernel-qcow2-linux-89ce2216e338f62c411bea12df37a2f54f2ce13a.tar.xz
kernel-qcow2-linux-89ce2216e338f62c411bea12df37a2f54f2ce13a.zip
V4L/DVB (8646): cx23885: Convert framework to use a single tuner callback function.
Code reduction. Tuner callback now assumes that tsport is passed as the void arg. Signed-off-by: Steven Toth <stoth@hauppauge.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-cards.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-cards.c31
1 files changed, 8 insertions, 23 deletions
diff --git a/drivers/media/video/cx23885/cx23885-cards.c b/drivers/media/video/cx23885/cx23885-cards.c
index 46d70262107b..0daffc3dbec0 100644
--- a/drivers/media/video/cx23885/cx23885-cards.c
+++ b/drivers/media/video/cx23885/cx23885-cards.c
@@ -329,11 +329,15 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data)
dev->name, tv.model);
}
-static int cx23885_tuner_callback(struct cx23885_dev *dev, int port,
- int command, int arg)
+int cx23885_tuner_callback(void *priv, int command, int arg)
{
+ struct cx23885_tsport *port = priv;
+ struct cx23885_dev *dev = port->dev;
u32 bitmask = 0;
+ if (command == XC2028_RESET_CLK)
+ return 0;
+
if (command != 0) {
printk(KERN_ERR "%s(): Unknown command 0x%x.\n",
__func__, command);
@@ -354,9 +358,9 @@ static int cx23885_tuner_callback(struct cx23885_dev *dev, int port,
/* Two identical tuners on two different i2c buses,
* we need to reset the correct gpio. */
- if (port == 0)
+ if (port->nr == 0)
bitmask = 0x01;
- else if (port == 1)
+ else if (port->nr == 1)
bitmask = 0x04;
}
break;
@@ -372,25 +376,6 @@ static int cx23885_tuner_callback(struct cx23885_dev *dev, int port,
return 0;
}
-int cx23885_xc5000_tuner_callback(void *priv, int command, int arg)
-{
- struct cx23885_i2c *bus = priv;
- struct cx23885_dev *dev = bus->dev;
-
- return cx23885_tuner_callback(dev, bus->nr, command, arg);
-}
-
-int cx23885_xc3028_tuner_callback(void *priv, int command, int arg)
-{
- struct cx23885_tsport *port = priv;
- struct cx23885_dev *dev = port->dev;
-
- if (command == XC2028_RESET_CLK)
- return 0;
-
- return cx23885_tuner_callback(dev, port->nr, command, arg);
-}
-
void cx23885_gpio_setup(struct cx23885_dev *dev)
{
switch(dev->board) {