summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <devnull@localhost>2005-12-07 11:18:39 +0000
committerMauro Carvalho Chehab <devnull@localhost>2005-12-07 11:18:39 +0000
commit612cbef536b856016be222ee2da010e9a34c433b (patch)
treea0cb496321fc6a7a5478f34e071579391c6336a3 /linux
parentc8a7226f04acafa57d87b656dd841d07f747b0c1 (diff)
downloadmediapointer-dvb-s2-612cbef536b856016be222ee2da010e9a34c433b.tar.gz
mediapointer-dvb-s2-612cbef536b856016be222ee2da010e9a34c433b.tar.bz2
Syncs bttv stuff with kernel version.
kernel-sync - Syncs bttv stuff with kernel version. Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux')
-rw-r--r--linux/drivers/media/video/bttv-driver.c16
-rw-r--r--linux/drivers/media/video/bttv-i2c.c8
-rw-r--r--linux/drivers/media/video/bttvp.h6
3 files changed, 14 insertions, 16 deletions
diff --git a/linux/drivers/media/video/bttv-driver.c b/linux/drivers/media/video/bttv-driver.c
index e3d2d29fc..e0865757a 100644
--- a/linux/drivers/media/video/bttv-driver.c
+++ b/linux/drivers/media/video/bttv-driver.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-driver.c,v 1.75 2005/12/04 21:06:50 mkrufky Exp $
+ $Id: bttv-driver.c,v 1.76 2005/12/07 11:18:39 mchehab Exp $
bttv - Bt848 frame grabber driver
@@ -35,7 +35,6 @@
#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/kdev_t.h>
-#include "bttvp.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#include <linux/dma-mapping.h>
#endif
@@ -43,6 +42,7 @@
#include <asm/io.h>
#include <asm/byteorder.h>
+#include "bttvp.h"
#include "rds.h"
@@ -779,7 +779,7 @@ static void set_pll(struct bttv *btv)
/* no PLL needed */
if (btv->pll.pll_current == 0)
return;
- verbose_printk(KERN_INFO "bttv%d: PLL can sleep, using XTAL (%d).\n",
+ bttv_printk(KERN_INFO "bttv%d: PLL can sleep, using XTAL (%d).\n",
btv->c.nr,btv->pll.pll_ifreq);
btwrite(0x00,BT848_TGCTRL);
btwrite(0x00,BT848_PLL_XCI);
@@ -787,13 +787,13 @@ static void set_pll(struct bttv *btv)
return;
}
- verbose_printk(KERN_INFO "bttv%d: PLL: %d => %d ",btv->c.nr,
+ bttv_printk(KERN_INFO "bttv%d: PLL: %d => %d ",btv->c.nr,
btv->pll.pll_ifreq, btv->pll.pll_ofreq);
set_pll_freq(btv, btv->pll.pll_ifreq, btv->pll.pll_ofreq);
for (i=0; i<10; i++) {
/* Let other people run while the PLL stabilizes */
- verbose_printk(".");
+ bttv_printk(".");
msleep(10);
if (btread(BT848_DSTATUS) & BT848_DSTATUS_PLOCK) {
@@ -801,12 +801,12 @@ static void set_pll(struct bttv *btv)
} else {
btwrite(0x08,BT848_TGCTRL);
btv->pll.pll_current = btv->pll.pll_ofreq;
- verbose_printk(" ok\n");
+ bttv_printk(" ok\n");
return;
}
}
btv->pll.pll_current = -1;
- verbose_printk("failed\n");
+ bttv_printk("failed\n");
return;
}
@@ -1990,7 +1990,6 @@ static int setup_window(struct bttv_fh *fh, struct bttv *btv,
}
down(&fh->cap.lock);
- if (fh->ov.clips)
kfree(fh->ov.clips);
fh->ov.clips = clips;
fh->ov.nclips = n;
@@ -2785,7 +2784,6 @@ static int bttv_do_ioctl(struct inode *inode, struct file *file,
fh->ov.w.height = fb->fmt.height;
btv->init.ov.w.width = fb->fmt.width;
btv->init.ov.w.height = fb->fmt.height;
- if (fh->ov.clips)
kfree(fh->ov.clips);
fh->ov.clips = NULL;
fh->ov.nclips = 0;
diff --git a/linux/drivers/media/video/bttv-i2c.c b/linux/drivers/media/video/bttv-i2c.c
index cfd8250af..a917b05bf 100644
--- a/linux/drivers/media/video/bttv-i2c.c
+++ b/linux/drivers/media/video/bttv-i2c.c
@@ -1,5 +1,5 @@
/*
- $Id: bttv-i2c.c,v 1.35 2005/10/31 16:13:15 nsh Exp $
+ $Id: bttv-i2c.c,v 1.36 2005/12/07 11:18:39 mchehab Exp $
bttv-i2c.c -- all the i2c code is here
@@ -29,12 +29,12 @@
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
-#include <asm/io.h>
-
-#include "bttvp.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
#include <linux/jiffies.h>
#endif
+#include <asm/io.h>
+
+#include "bttvp.h"
static struct i2c_algo_bit_data bttv_i2c_algo_bit_template;
static struct i2c_adapter bttv_i2c_adap_sw_template;
diff --git a/linux/drivers/media/video/bttvp.h b/linux/drivers/media/video/bttvp.h
index 3aefd8f84..54c7830ba 100644
--- a/linux/drivers/media/video/bttvp.h
+++ b/linux/drivers/media/video/bttvp.h
@@ -1,5 +1,5 @@
/*
- $Id: bttvp.h,v 1.27 2005/12/04 12:21:15 hverkuil Exp $
+ $Id: bttvp.h,v 1.28 2005/12/07 11:18:39 mchehab Exp $
bttv - Bt848 frame grabber driver
@@ -27,7 +27,7 @@
#define _BTTVP_H_
#include "compat.h"
-#include <linux/utsname.h>
+#include <linux/version.h>
#define BTTV_VERSION_CODE KERNEL_VERSION(0,9,16)
#include <linux/types.h>
@@ -233,9 +233,9 @@ extern void bttv_gpio_tracking(struct bttv *btv, char *comment);
extern int init_bttv_i2c(struct bttv *btv);
extern int fini_bttv_i2c(struct bttv *btv);
+#define bttv_printk if (bttv_verbose) printk
#define dprintk if (bttv_debug >= 1) printk
#define d2printk if (bttv_debug >= 2) printk
-#define verbose_printk if (bttv_verbose) printk
#define BTTV_MAX_FBUF 0x208000
#define VBIBUF_SIZE (2048*VBI_MAXLINES*2)