summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/cx88/cx88-video.c
diff options
context:
space:
mode:
authorCatalin Climov <devnull@localhost>2005-08-16 14:49:21 +0000
committerCatalin Climov <devnull@localhost>2005-08-16 14:49:21 +0000
commitb9c8314916a547aefded0e96a6e5adfcc85a7c14 (patch)
tree5f13b42d2c8023ce45c406c02de8c2cebb4d1ef0 /linux/drivers/media/video/cx88/cx88-video.c
parent021c03d384f6c242565a43c859cd7c45defcf39c (diff)
downloadmediapointer-dvb-s2-b9c8314916a547aefded0e96a6e5adfcc85a7c14.tar.gz
mediapointer-dvb-s2-b9c8314916a547aefded0e96a6e5adfcc85a7c14.tar.bz2
Prepare for factoring out some common code (see ChangeLog for details).
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-video.c')
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index de13d398c..e2b3aa241 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1,5 +1,5 @@
/*
- * $Id: cx88-video.c,v 1.83 2005/08/10 17:00:20 mchehab Exp $
+ * $Id: cx88-video.c,v 1.84 2005/08/16 14:49:21 catalin Exp $
*
* device driver for Conexant 2388x based TV cards
* video4linux video interface
@@ -75,6 +75,8 @@ MODULE_PARM_DESC(vid_limit,"capture memory limit in megabytes");
#define dprintk(level,fmt, arg...) if (video_debug >= level) \
printk(KERN_DEBUG "%s/0: " fmt, dev->core->name , ## arg)
+#define dcprintk(level,fmt, arg...) if (video_debug >= level) \
+ printk(KERN_DEBUG "%s/0: " fmt, core->name , ## arg)
/* ------------------------------------------------------------------ */
@@ -391,11 +393,11 @@ static int video_mux(struct cx8800_dev *dev, unsigned int input)
{
struct cx88_core *core = dev->core;
- dprintk(1,"video_mux: %d [vmux=%d,gpio=0x%x,0x%x,0x%x,0x%x]\n",
+ dcprintk(1,"video_mux: %d [vmux=%d,gpio=0x%x,0x%x,0x%x,0x%x]\n",
input, INPUT(input)->vmux,
INPUT(input)->gpio0,INPUT(input)->gpio1,
INPUT(input)->gpio2,INPUT(input)->gpio3);
- dev->core->input = input;
+ core->input = input;
cx_andor(MO_INPUT_FORMAT, 0x03 << 14, INPUT(input)->vmux << 14);
cx_write(MO_GP3_IO, INPUT(input)->gpio3);
cx_write(MO_GP0_IO, INPUT(input)->gpio0);
@@ -1184,7 +1186,7 @@ static int set_control(struct cx8800_dev *dev, struct v4l2_control *ctl)
value = ((ctl->value - c->off) << c->shift) & c->mask;
break;
}
- dprintk(1,"set_control id=0x%X reg=0x%x val=0x%x%s\n",
+ dcprintk(1,"set_control id=0x%X reg=0x%x val=0x%x%s\n",
ctl->id, c->reg, value, c->sreg ? " [shadowed]" : "");
if (c->sreg) {
cx_sandor(c->sreg, c->reg, c->mask, value);
@@ -1357,7 +1359,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
struct v4l2_capability *cap = arg;
memset(cap,0,sizeof(*cap));
- strcpy(cap->driver, "cx8800");
+ strcpy(cap->driver, "cx8800");
strlcpy(cap->card, cx88_boards[core->board].name,
sizeof(cap->card));
sprintf(cap->bus_info,"PCI:%s",pci_name(dev->pci));
@@ -1411,7 +1413,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
return -EINVAL;
down(&dev->lock);
- cx88_set_tvnorm(dev->core,&tvnorms[i]);
+ cx88_set_tvnorm(core,&tvnorms[i]);
up(&dev->lock);
return 0;
}
@@ -1453,7 +1455,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
{
unsigned int *i = arg;
- *i = dev->core->input;
+ *i = core->input;
return 0;
}
case VIDIOC_S_INPUT:
@@ -1610,7 +1612,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
f->type = fh->radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV;
f->frequency = dev->freq;
- cx88_call_i2c_clients(dev->core,VIDIOC_G_FREQUENCY,f);
+ cx88_call_i2c_clients(core,VIDIOC_G_FREQUENCY,f);
return 0;
}
@@ -1629,7 +1631,7 @@ static int video_do_ioctl(struct inode *inode, struct file *file,
down(&dev->lock);
dev->freq = f->frequency;
cx88_newstation(core);
- cx88_call_i2c_clients(dev->core,VIDIOC_S_FREQUENCY,f);
+ cx88_call_i2c_clients(core,VIDIOC_S_FREQUENCY,f);
/* When changing channels it is required to reset TVAUDIO */
msleep (10);
@@ -1785,8 +1787,8 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
if (v->tuner) /* Only tuner 0 */
return -EINVAL;
- cx88_call_i2c_clients(dev->core,VIDIOCSTUNER,v);
- return 0;
+ cx88_call_i2c_clients(core,VIDIOCSTUNER,v);
+ return 0;
}
case VIDIOC_S_TUNER:
{
@@ -1795,7 +1797,7 @@ static int radio_do_ioctl(struct inode *inode, struct file *file,
if (0 != t->index)
return -EINVAL;
- cx88_call_i2c_clients(dev->core,VIDIOC_S_TUNER,t);
+ cx88_call_i2c_clients(core,VIDIOC_S_TUNER,t);
return 0;
}
@@ -2168,7 +2170,7 @@ static int __devinit cx8800_initdev(struct pci_dev *pci_dev,
/* initial device configuration */
down(&dev->lock);
init_controls(dev);
- cx88_set_tvnorm(dev->core,tvnorms);
+ cx88_set_tvnorm(core,tvnorms);
video_mux(dev,0);
up(&dev->lock);