summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-05-08 23:19:22 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-05-08 23:19:22 -0300
commit4f1a121a633c3de1bd905b3becd57955b5e2b608 (patch)
tree859303f993775836463f03b441a938f9e6541be8 /linux/drivers/media/video
parent02e085b956ce32aa54ff3a2e938a0919ac75c643 (diff)
parentaca3b2a0241d96ebe7198577dd48ba46b3e8079f (diff)
downloadmediapointer-dvb-s2-4f1a121a633c3de1bd905b3becd57955b5e2b608.tar.gz
mediapointer-dvb-s2-4f1a121a633c3de1bd905b3becd57955b5e2b608.tar.bz2
merge: http://linuxtv.org/hg/~mkrufky/dvb-pll-conv
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/cx88/cx88-dvb.c13
-rw-r--r--linux/drivers/media/video/cx88/cx88-vp3054-i2c.c7
-rw-r--r--linux/drivers/media/video/cx88/cx88-vp3054-i2c.h8
-rw-r--r--linux/drivers/media/video/v4l1-compat.c2
-rw-r--r--linux/drivers/media/video/videodev.c2
5 files changed, 12 insertions, 20 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c
index 62c599bf3..f01fee80b 100644
--- a/linux/drivers/media/video/cx88/cx88-dvb.c
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c
@@ -36,9 +36,7 @@
#include "mt352.h"
#include "mt352_priv.h"
-#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
-# include "cx88-vp3054-i2c.h"
-#endif
+#include "cx88-vp3054-i2c.h"
#include "zl10353.h"
#include "cx22702.h"
#include "or51132.h"
@@ -200,7 +198,7 @@ static struct mt352_config dvico_fusionhdtv_dual = {
.demod_init = dvico_dual_demod_init,
};
-#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
+#if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE))
static int dntv_live_dvbt_pro_demod_init(struct dvb_frontend* fe)
{
static u8 clock_config [] = { 0x89, 0x38, 0x38 };
@@ -477,7 +475,7 @@ static int dvb_register(struct cx8802_dev *dev)
}
break;
case CX88_BOARD_DNTV_LIVE_DVB_T_PRO:
-#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
+#if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE))
dev->dvb.frontend = dvb_attach(mt352_attach, &dntv_live_dvbt_pro_config,
&((struct vp3054_i2c_state *)dev->card_priv)->adap);
if (dev->dvb.frontend != NULL) {
@@ -709,11 +707,10 @@ static int cx8802_dvb_probe(struct cx8802_driver *drv)
if (!(cx88_boards[core->board].mpeg & CX88_MPEG_DVB))
goto fail_core;
-#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
+ /* If vp3054 isn't enabled, a stub will just return 0 */
err = vp3054_i2c_probe(dev);
if (0 != err)
goto fail_core;
-#endif
/* dvb stuff */
printk("%s/2: cx2388x based dvb card\n", core->name);
@@ -738,9 +735,7 @@ static int cx8802_dvb_remove(struct cx8802_driver *drv)
/* dvb */
videobuf_dvb_unregister(&dev->dvb);
-#if defined(CONFIG_VIDEO_CX88_VP3054) || defined(CONFIG_VIDEO_CX88_VP3054_MODULE)
vp3054_i2c_remove(dev);
-#endif
return 0;
}
diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c
index 59802d9ee..dc97f4686 100644
--- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c
+++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c
@@ -117,10 +117,6 @@ static struct i2c_adapter vp3054_i2c_adap_template = {
.id = I2C_HW_B_CX2388x,
};
-static struct i2c_client vp3054_i2c_client_template = {
- .name = "VP-3054",
-};
-
int vp3054_i2c_probe(struct cx8802_dev *dev)
{
struct cx88_core *core = dev->core;
@@ -139,8 +135,6 @@ int vp3054_i2c_probe(struct cx8802_dev *dev)
sizeof(vp3054_i2c->adap));
memcpy(&vp3054_i2c->algo, &vp3054_i2c_algo_template,
sizeof(vp3054_i2c->algo));
- memcpy(&vp3054_i2c->client, &vp3054_i2c_client_template,
- sizeof(vp3054_i2c->client));
#ifdef I2C_CLASS_TV_DIGITAL
vp3054_i2c->adap.class |= I2C_CLASS_TV_DIGITAL;
@@ -154,7 +148,6 @@ int vp3054_i2c_probe(struct cx8802_dev *dev)
vp3054_i2c->algo.data = dev;
i2c_set_adapdata(&vp3054_i2c->adap, dev);
vp3054_i2c->adap.algo_data = &vp3054_i2c->algo;
- vp3054_i2c->client.adapter = &vp3054_i2c->adap;
vp3054_bit_setscl(dev,1);
vp3054_bit_setsda(dev,1);
diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h
index b7a0a04d2..be99c931d 100644
--- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h
+++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.h
@@ -26,10 +26,16 @@
struct vp3054_i2c_state {
struct i2c_adapter adap;
struct i2c_algo_bit_data algo;
- struct i2c_client client;
u32 state;
};
/* ----------------------------------------------------------------------- */
+#if defined(CONFIG_VIDEO_CX88_VP3054) || (defined(CONFIG_VIDEO_CX88_VP3054_MODULE) && defined(MODULE))
int vp3054_i2c_probe(struct cx8802_dev *dev);
void vp3054_i2c_remove(struct cx8802_dev *dev);
+#else
+static inline int vp3054_i2c_probe(struct cx8802_dev *dev)
+{ return 0; }
+static inline void vp3054_i2c_remove(struct cx8802_dev *dev)
+{ }
+#endif
diff --git a/linux/drivers/media/video/v4l1-compat.c b/linux/drivers/media/video/v4l1-compat.c
index 253771b0b..c52df6cae 100644
--- a/linux/drivers/media/video/v4l1-compat.c
+++ b/linux/drivers/media/video/v4l1-compat.c
@@ -684,8 +684,6 @@ v4l_compat_translate_ioctl(struct inode *inode,
if (ovl_err < 0)
dprintk("VIDIOCSPICT / VIDIOC_S_FBUF: %d\n",
ovl_err);
- if (ovl_err == -EPERM)
- ovl_err = 0;
}
if (ovl_err < 0 && mem_err < 0)
/* ioctl failed, couldn't set either parameter */
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index b8e022aed..915e12ff8 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -457,7 +457,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
int ret = -EINVAL;
if ( (vfd->debug & V4L2_DEBUG_IOCTL) &&
- !(vfd->debug | V4L2_DEBUG_IOCTL_ARG)) {
+ !(vfd->debug & V4L2_DEBUG_IOCTL_ARG)) {
v4l_print_ioctl(vfd->name, cmd);
}