summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-02-23 16:54:56 -0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-02-23 16:54:56 -0200
commit2d65658078459d35572e637c8cb1b6fc3826f12a (patch)
treee18d3f1e0e68c693a727e429934e42af169a2853
parentb64c80be829fbeb8b936ca6d61a59013d8ad2bba (diff)
parentcc88074b4da7cb25b8c2bc93f41434cfc1763924 (diff)
downloadmediapointer-dvb-s2-2d65658078459d35572e637c8cb1b6fc3826f12a.tar.gz
mediapointer-dvb-s2-2d65658078459d35572e637c8cb1b6fc3826f12a.tar.bz2
merge: http://linuxtv.org/hg/~mrechberger/v4l-dvb-cx88
From: Mauro Carvalho Chehab <mchehab@infradead.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
-rw-r--r--linux/Documentation/video4linux/bttv/Insmod-options2
-rw-r--r--linux/drivers/media/common/ir-functions.c2
-rw-r--r--linux/drivers/media/common/saa7146_fops.c4
-rw-r--r--linux/drivers/media/common/saa7146_i2c.c2
-rw-r--r--linux/drivers/media/common/saa7146_vbi.c2
-rw-r--r--linux/drivers/media/common/saa7146_video.c2
-rw-r--r--linux/drivers/media/dvb/b2c2/flexcop-i2c.c1
-rw-r--r--linux/drivers/media/dvb/dvb-core/dmxdev.c1
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvb_frontend.c8
-rw-r--r--linux/drivers/media/dvb/dvb-core/dvbdev.c1
-rw-r--r--linux/drivers/media/dvb/dvb-usb/cxusb.c4
-rw-r--r--linux/drivers/media/dvb/dvb-usb/digitv.c2
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c1
-rw-r--r--linux/drivers/media/dvb/dvb-usb/gl861.c2
-rw-r--r--linux/drivers/media/dvb/frontends/dib3000mb.c2
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_av.c1
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_ca.c1
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_hw.c1
-rw-r--r--linux/drivers/media/dvb/ttpci/av7110_v4l.c1
-rw-r--r--linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c1
-rw-r--r--linux/drivers/media/radio/dsbr100.c2
-rw-r--r--linux/drivers/media/radio/miropcm20-radio.c2
-rw-r--r--linux/drivers/media/radio/miropcm20-rds.c3
-rw-r--r--linux/drivers/media/radio/radio-aimslab.c2
-rw-r--r--linux/drivers/media/radio/radio-aztech.c2
-rw-r--r--linux/drivers/media/radio/radio-cadet.c2
-rw-r--r--linux/drivers/media/radio/radio-gemtek-pci.c2
-rw-r--r--linux/drivers/media/radio/radio-gemtek.c2
-rw-r--r--linux/drivers/media/radio/radio-maestro.c3
-rw-r--r--linux/drivers/media/radio/radio-maxiradio.c3
-rw-r--r--linux/drivers/media/radio/radio-rtrack2.c2
-rw-r--r--linux/drivers/media/radio/radio-sf16fmi.c2
-rw-r--r--linux/drivers/media/radio/radio-sf16fmr2.c2
-rw-r--r--linux/drivers/media/radio/radio-terratec.c2
-rw-r--r--linux/drivers/media/radio/radio-trust.c2
-rw-r--r--linux/drivers/media/radio/radio-typhoon.c2
-rw-r--r--linux/drivers/media/radio/radio-zoltrix.c2
-rw-r--r--linux/drivers/media/video/adv7170.c1
-rw-r--r--linux/drivers/media/video/adv7175.c1
-rw-r--r--linux/drivers/media/video/arv.c2
-rw-r--r--linux/drivers/media/video/bt819.c1
-rw-r--r--linux/drivers/media/video/bt856.c1
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-driver.c4
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-gpio.c5
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-if.c59
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-vbi.c1
-rw-r--r--linux/drivers/media/video/bt8xx/bttv.h27
-rw-r--r--linux/drivers/media/video/btcx-risc.c2
-rw-r--r--linux/drivers/media/video/bw-qcam.c2
-rw-r--r--linux/drivers/media/video/c-qcam.c2
-rw-r--r--linux/drivers/media/video/cafe_ccic.c7
-rw-r--r--linux/drivers/media/video/compat_ioctl32.c2
-rw-r--r--linux/drivers/media/video/cpia.c2
-rw-r--r--linux/drivers/media/video/cpia2/cpia2_v4l.c2
-rw-r--r--linux/drivers/media/video/cs53l32a.c2
-rw-r--r--linux/drivers/media/video/cx2341x.c74
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-audio.c2
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-core.c2
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-firmware.c2
-rw-r--r--linux/drivers/media/video/cx25840/cx25840-vbi.c2
-rw-r--r--linux/drivers/media/video/cx88/cx88-blackbird.c2
-rw-r--r--linux/drivers/media/video/cx88/cx88-tvaudio.c1
-rw-r--r--linux/drivers/media/video/cx88/cx88-video.c4
-rw-r--r--linux/drivers/media/video/dabusb.c2
-rw-r--r--linux/drivers/media/video/dpc7146.c2
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-input.c1
-rw-r--r--linux/drivers/media/video/em28xx/em28xx-video.c9
-rw-r--r--linux/drivers/media/video/et61x251/et61x251_core.c2
-rw-r--r--linux/drivers/media/video/hexium_gemini.c2
-rw-r--r--linux/drivers/media/video/hexium_orion.c2
-rw-r--r--linux/drivers/media/video/indycam.c1
-rw-r--r--linux/drivers/media/video/ir-kbd-i2c.c1
-rw-r--r--linux/drivers/media/video/meye.c3
-rw-r--r--linux/drivers/media/video/msp3400-driver.c9
-rw-r--r--linux/drivers/media/video/msp3400-kthreads.c2
-rw-r--r--linux/drivers/media/video/mxb.c2
-rw-r--r--linux/drivers/media/video/ov511.c2
-rw-r--r--linux/drivers/media/video/pms.c3
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-audio.c4
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-context.c1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-context.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c3
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c4
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-io.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-main.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-std.c5
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-std.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-tuner.c2
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c4
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c3
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h1
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c3
-rw-r--r--linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h1
-rw-r--r--linux/drivers/media/video/pwc/pwc-if.c2
-rw-r--r--linux/drivers/media/video/saa5246a.c3
-rw-r--r--linux/drivers/media/video/saa5249.c2
-rw-r--r--linux/drivers/media/video/saa6588.c2
-rw-r--r--linux/drivers/media/video/saa7111.c1
-rw-r--r--linux/drivers/media/video/saa7114.c1
-rw-r--r--linux/drivers/media/video/saa7115.c2
-rw-r--r--linux/drivers/media/video/saa711x.c1
-rw-r--r--linux/drivers/media/video/saa7127.c6
-rw-r--r--linux/drivers/media/video/saa7134/saa6752hs.c1
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-alsa.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-empress.c2
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-input.c1
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-oss.c4
-rw-r--r--linux/drivers/media/video/saa7134/saa7134-video.c4
-rw-r--r--linux/drivers/media/video/saa7134/saa7134.h4
-rw-r--r--linux/drivers/media/video/saa7185.c1
-rw-r--r--linux/drivers/media/video/saa7191.c2
-rw-r--r--linux/drivers/media/video/se401.c2
-rw-r--r--linux/drivers/media/video/sn9c102/sn9c102_core.c8
-rw-r--r--linux/drivers/media/video/stradis.c2
-rw-r--r--linux/drivers/media/video/stv680.c2
-rw-r--r--linux/drivers/media/video/tda7432.c1
-rw-r--r--linux/drivers/media/video/tda9840.c2
-rw-r--r--linux/drivers/media/video/tda9875.c1
-rw-r--r--linux/drivers/media/video/tea6415c.c2
-rw-r--r--linux/drivers/media/video/tea6420.c2
-rw-r--r--linux/drivers/media/video/tlv320aic23b.c2
-rw-r--r--linux/drivers/media/video/tuner-core.c1
-rw-r--r--linux/drivers/media/video/tuner-types.c2
-rw-r--r--linux/drivers/media/video/tveeprom.c2
-rw-r--r--linux/drivers/media/video/tvmixer.c3
-rw-r--r--linux/drivers/media/video/upd64031a.c2
-rw-r--r--linux/drivers/media/video/upd64083.c2
-rw-r--r--linux/drivers/media/video/usbvideo/ibmcam.c1
-rw-r--r--linux/drivers/media/video/usbvideo/konicawc.c13
-rw-r--r--linux/drivers/media/video/usbvideo/quickcam_messenger.c12
-rw-r--r--linux/drivers/media/video/usbvideo/ultracam.c1
-rw-r--r--linux/drivers/media/video/usbvideo/usbvideo.c2
-rw-r--r--linux/drivers/media/video/usbvideo/usbvideo.h2
-rw-r--r--linux/drivers/media/video/usbvideo/vicam.c2
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-core.c1
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-i2c.c3
-rw-r--r--linux/drivers/media/video/usbvision/usbvision-video.c17
-rw-r--r--linux/drivers/media/video/v4l1-compat.c2
-rw-r--r--linux/drivers/media/video/v4l2-common.c34
-rw-r--r--linux/drivers/media/video/video-buf-dvb.c8
-rw-r--r--linux/drivers/media/video/video-buf.c2
-rw-r--r--linux/drivers/media/video/videodev.c64
-rw-r--r--linux/drivers/media/video/vino.c2
-rw-r--r--linux/drivers/media/video/vivi.c9
-rw-r--r--linux/drivers/media/video/w9966.c2
-rw-r--r--linux/drivers/media/video/w9968cf.c5
-rw-r--r--linux/drivers/media/video/wm8739.c2
-rw-r--r--linux/drivers/media/video/wm8775.c2
-rw-r--r--linux/drivers/media/video/zc0301/zc0301_core.c2
-rw-r--r--linux/drivers/media/video/zoran_card.c1
-rw-r--r--linux/drivers/media/video/zoran_driver.c2
-rw-r--r--linux/drivers/media/video/zoran_procfs.c2
-rw-r--r--linux/drivers/media/video/zr364xx.c95
-rw-r--r--linux/include/linux/i2c-id.h5
-rw-r--r--linux/include/linux/videodev2.h122
-rw-r--r--linux/include/media/cx2341x.h4
-rw-r--r--linux/include/media/v4l2-common.h8
-rw-r--r--linux/include/media/v4l2-dev.h18
-rw-r--r--linux/sound/oss/aci.c2
-rw-r--r--linux/sound/oss/btaudio.c11
-rw-r--r--v4l/Makefile4
-rw-r--r--v4l/compat.h49
-rwxr-xr-xv4l/scripts/gentree.pl461
-rw-r--r--v4l/versions.txt9
-rw-r--r--v4l2-apps/util/v4l2-ctl.cpp2
173 files changed, 718 insertions, 724 deletions
diff --git a/linux/Documentation/video4linux/bttv/Insmod-options b/linux/Documentation/video4linux/bttv/Insmod-options
index bb7c2cac7..5ef75787f 100644
--- a/linux/Documentation/video4linux/bttv/Insmod-options
+++ b/linux/Documentation/video4linux/bttv/Insmod-options
@@ -57,7 +57,7 @@ bttv.o
i2c_udelay= Allow reduce I2C speed. Default is 5 usecs
(meaning 66,67 Kbps). The default is the
maximum supported speed by kernel bitbang
- algoritm. You may use lower numbers, if I2C
+ algorithm. You may use lower numbers, if I2C
messages are lost (16 is known to work on
all supported cards).
diff --git a/linux/drivers/media/common/ir-functions.c b/linux/drivers/media/common/ir-functions.c
index 13259912f..2a05e06cc 100644
--- a/linux/drivers/media/common/ir-functions.c
+++ b/linux/drivers/media/common/ir-functions.c
@@ -20,12 +20,12 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/string.h>
#include <linux/jiffies.h>
#include <media/ir-common.h>
+#include "compat.h"
/* -------------------------------------------------------------------------- */
diff --git a/linux/drivers/media/common/saa7146_fops.c b/linux/drivers/media/common/saa7146_fops.c
index 6b429ff37..67d4d1a51 100644
--- a/linux/drivers/media/common/saa7146_fops.c
+++ b/linux/drivers/media/common/saa7146_fops.c
@@ -1,5 +1,5 @@
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
#define BOARD_CAN_DO_VBI(dev) (dev->revision != 0 && dev->vv_data->vbi_minor != -1)
@@ -417,7 +417,7 @@ static ssize_t fops_write(struct file *file, const char __user *data, size_t cou
}
}
-static struct file_operations video_fops =
+static const struct file_operations video_fops =
{
.owner = THIS_MODULE,
.open = fops_open,
diff --git a/linux/drivers/media/common/saa7146_i2c.c b/linux/drivers/media/common/saa7146_i2c.c
index dffa769ef..3ae8660be 100644
--- a/linux/drivers/media/common/saa7146_i2c.c
+++ b/linux/drivers/media/common/saa7146_i2c.c
@@ -1,5 +1,5 @@
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static u32 saa7146_i2c_func(struct i2c_adapter *adapter)
{
diff --git a/linux/drivers/media/common/saa7146_vbi.c b/linux/drivers/media/common/saa7146_vbi.c
index 510594fbd..2c63875d1 100644
--- a/linux/drivers/media/common/saa7146_vbi.c
+++ b/linux/drivers/media/common/saa7146_vbi.c
@@ -1,5 +1,5 @@
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static int vbi_pixel_to_capture = 720 * 2;
diff --git a/linux/drivers/media/common/saa7146_video.c b/linux/drivers/media/common/saa7146_video.c
index 1fb373ee2..35288c4bc 100644
--- a/linux/drivers/media/common/saa7146_video.c
+++ b/linux/drivers/media/common/saa7146_video.c
@@ -1,5 +1,5 @@
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static int max_memory = 32;
diff --git a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c
index e0bd2d8f0..5347a406f 100644
--- a/linux/drivers/media/dvb/b2c2/flexcop-i2c.c
+++ b/linux/drivers/media/dvb/b2c2/flexcop-i2c.c
@@ -190,6 +190,7 @@ int flexcop_i2c_init(struct flexcop_device *fc)
fc->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
fc->i2c_adap.algo = &flexcop_algo;
fc->i2c_adap.algo_data = NULL;
+ fc->i2c_adap.dev.parent = fc->dev;
if ((ret = i2c_add_adapter(&fc->i2c_adap)) < 0)
return ret;
diff --git a/linux/drivers/media/dvb/dvb-core/dmxdev.c b/linux/drivers/media/dvb/dvb-core/dmxdev.c
index 988499dfd..fc77de45c 100644
--- a/linux/drivers/media/dvb/dvb-core/dmxdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dmxdev.c
@@ -25,7 +25,6 @@
#include <linux/vmalloc.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
-#include <linux/sched.h>
#include <linux/poll.h>
#include <linux/ioctl.h>
#include <linux/wait.h>
diff --git a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
index f39e3504d..60c8b0da2 100644
--- a/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
+++ b/linux/drivers/media/dvb/dvb-core/dvb_frontend.c
@@ -540,14 +540,8 @@ restart:
break;
}
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
if (try_to_freeze())
goto restart;
-#else
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
if (down_interruptible(&fepriv->sem))
break;
@@ -905,7 +899,7 @@ static int dvb_frontend_ioctl(struct inode *inode, struct file *file,
fetunesettings.parameters.inversion = INVERSION_AUTO;
}
if (fe->ops.info.type == FE_OFDM) {
- /* without hierachical coding code_rate_LP is irrelevant,
+ /* without hierarchical coding code_rate_LP is irrelevant,
* so we tolerate the otherwise invalid FEC_NONE setting */
if (fepriv->parameters.u.ofdm.hierarchy_information == HIERARCHY_NONE &&
fepriv->parameters.u.ofdm.code_rate_LP == FEC_NONE)
diff --git a/linux/drivers/media/dvb/dvb-core/dvbdev.c b/linux/drivers/media/dvb/dvb-core/dvbdev.c
index 4035f8efa..5c7512a84 100644
--- a/linux/drivers/media/dvb/dvb-core/dvbdev.c
+++ b/linux/drivers/media/dvb/dvb-core/dvbdev.c
@@ -27,7 +27,6 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/init.h>
#include <linux/slab.h>
#include <linux/device.h>
diff --git a/linux/drivers/media/dvb/dvb-usb/cxusb.c b/linux/drivers/media/dvb/dvb-usb/cxusb.c
index ddfe92a94..540ba3891 100644
--- a/linux/drivers/media/dvb/dvb-usb/cxusb.c
+++ b/linux/drivers/media/dvb/dvb-usb/cxusb.c
@@ -469,9 +469,9 @@ static int bluebird_patch_dvico_firmware_download(struct usb_device *udev,
fw->data[BLUEBIRD_01_ID_OFFSET + 1] == USB_VID_DVICO >> 8) {
fw->data[BLUEBIRD_01_ID_OFFSET + 2] =
- udev->descriptor.idProduct + 1;
+ le16_to_cpu(udev->descriptor.idProduct) + 1;
fw->data[BLUEBIRD_01_ID_OFFSET + 3] =
- udev->descriptor.idProduct >> 8;
+ le16_to_cpu(udev->descriptor.idProduct) >> 8;
return usb_cypress_load_firmware(udev, fw, CYPRESS_FX2);
}
diff --git a/linux/drivers/media/dvb/dvb-usb/digitv.c b/linux/drivers/media/dvb/dvb-usb/digitv.c
index 15686a626..90830cffc 100644
--- a/linux/drivers/media/dvb/dvb-usb/digitv.c
+++ b/linux/drivers/media/dvb/dvb-usb/digitv.c
@@ -119,6 +119,8 @@ static int digitv_nxt6000_tuner_set_params(struct dvb_frontend *fe, struct dvb_f
struct dvb_usb_adapter *adap = fe->dvb->priv;
u8 b[5];
dvb_usb_tuner_calc_regs(fe,fep,b, 5);
+ if (fe->ops.i2c_gate_ctrl)
+ fe->ops.i2c_gate_ctrl(fe, 1);
return digitv_ctrl_msg(adap->dev, USB_WRITE_TUNER, 0, &b[1], 4, NULL, 0);
}
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
index 55ba02038..70df31b0a 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
@@ -27,6 +27,7 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d)
#endif
d->i2c_adap.algo = d->props.i2c_algo;
d->i2c_adap.algo_data = NULL;
+ d->i2c_adap.dev.parent = &d->udev->dev;
i2c_set_adapdata(&d->i2c_adap, d);
diff --git a/linux/drivers/media/dvb/dvb-usb/gl861.c b/linux/drivers/media/dvb/dvb-usb/gl861.c
index 30eb4586c..1e5e2c1b9 100644
--- a/linux/drivers/media/dvb/dvb-usb/gl861.c
+++ b/linux/drivers/media/dvb/dvb-usb/gl861.c
@@ -12,7 +12,7 @@
#include "qt1010.h"
/* debug */
-int dvb_usb_gl861_debug;
+static int dvb_usb_gl861_debug;
module_param_named(debug,dvb_usb_gl861_debug, int, 0644);
MODULE_PARM_DESC(debug, "set debugging level (1=rc (or-able))." DVB_USB_DEBUG_STATUS);
diff --git a/linux/drivers/media/dvb/frontends/dib3000mb.c b/linux/drivers/media/dvb/frontends/dib3000mb.c
index adbabfdb0..b6adea5ff 100644
--- a/linux/drivers/media/dvb/frontends/dib3000mb.c
+++ b/linux/drivers/media/dvb/frontends/dib3000mb.c
@@ -239,7 +239,7 @@ static int dib3000mb_set_frontend(struct dvb_frontend* fe,
default:
return -EINVAL;
}
- deb_setf("hierachy: ");
+ deb_setf("hierarchy: ");
switch (ofdm->hierarchy_information) {
case HIERARCHY_NONE:
deb_setf("none ");
diff --git a/linux/drivers/media/dvb/ttpci/av7110_av.c b/linux/drivers/media/dvb/ttpci/av7110_av.c
index c8665e590..e719af807 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_av.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_av.c
@@ -31,7 +31,6 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
-#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
diff --git a/linux/drivers/media/dvb/ttpci/av7110_ca.c b/linux/drivers/media/dvb/ttpci/av7110_ca.c
index c2b57895e..e9b4e88e7 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_ca.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_ca.c
@@ -29,7 +29,6 @@
*/
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/fs.h>
diff --git a/linux/drivers/media/dvb/ttpci/av7110_hw.c b/linux/drivers/media/dvb/ttpci/av7110_hw.c
index bfd9ad371..0cb5366dd 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_hw.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_hw.c
@@ -32,7 +32,6 @@
#include <linux/types.h>
#include <linux/kernel.h>
#include <linux/string.h>
-#include <linux/sched.h>
#include <linux/delay.h>
#include <linux/smp_lock.h>
#include <linux/fs.h>
diff --git a/linux/drivers/media/dvb/ttpci/av7110_v4l.c b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
index 3795432ad..cde5d3ae7 100644
--- a/linux/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/linux/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -26,7 +26,6 @@
*/
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include <linux/delay.h>
#include <linux/fs.h>
diff --git a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 239a48bcb..27c558559 100644
--- a/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/linux/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -1702,6 +1702,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
#endif
ttusb->i2c_adap.algo = &ttusb_dec_algo;
ttusb->i2c_adap.algo_data = NULL;
+ ttusb->i2c_adap.dev.parent = &udev->dev;
result = i2c_add_adapter(&ttusb->i2c_adap);
if (result) {
diff --git a/linux/drivers/media/radio/dsbr100.c b/linux/drivers/media/radio/dsbr100.c
index c4e67e6c8..f42ec1714 100644
--- a/linux/drivers/media/radio/dsbr100.c
+++ b/linux/drivers/media/radio/dsbr100.c
@@ -145,7 +145,7 @@ struct dsbr100_device {
/* File system interface */
-static struct file_operations usb_dsbr100_fops = {
+static const struct file_operations usb_dsbr100_fops = {
.owner = THIS_MODULE,
.open = usb_dsbr100_open,
.release = usb_dsbr100_close,
diff --git a/linux/drivers/media/radio/miropcm20-radio.c b/linux/drivers/media/radio/miropcm20-radio.c
index 9440d0b74..4220b746f 100644
--- a/linux/drivers/media/radio/miropcm20-radio.c
+++ b/linux/drivers/media/radio/miropcm20-radio.c
@@ -217,7 +217,7 @@ static struct pcm20_device pcm20_unit = {
.muted = 1,
};
-static struct file_operations pcm20_fops = {
+static const struct file_operations pcm20_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/miropcm20-rds.c b/linux/drivers/media/radio/miropcm20-rds.c
index c1b1db65e..aed114773 100644
--- a/linux/drivers/media/radio/miropcm20-rds.c
+++ b/linux/drivers/media/radio/miropcm20-rds.c
@@ -14,7 +14,6 @@
#include <linux/slab.h>
#include <linux/fs.h>
#include <linux/miscdevice.h>
-#include <linux/sched.h> /* current, TASK_*, schedule_timeout() */
#include <linux/delay.h>
#include <asm/uaccess.h>
#include "miropcm20-rds-core.h"
@@ -105,7 +104,7 @@ static ssize_t rds_f_read(struct file *file, char __user *buffer, size_t length,
}
}
-static struct file_operations rds_fops = {
+static const struct file_operations rds_fops = {
.owner = THIS_MODULE,
.read = rds_f_read,
.open = rds_f_open,
diff --git a/linux/drivers/media/radio/radio-aimslab.c b/linux/drivers/media/radio/radio-aimslab.c
index 66c0ceb16..2ec2b1401 100644
--- a/linux/drivers/media/radio/radio-aimslab.c
+++ b/linux/drivers/media/radio/radio-aimslab.c
@@ -363,7 +363,7 @@ static int rt_ioctl(struct inode *inode, struct file *file,
static struct rt_device rtrack_unit;
-static struct file_operations rtrack_fops = {
+static const struct file_operations rtrack_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-aztech.c b/linux/drivers/media/radio/radio-aztech.c
index e622f3c91..9a94677e1 100644
--- a/linux/drivers/media/radio/radio-aztech.c
+++ b/linux/drivers/media/radio/radio-aztech.c
@@ -346,7 +346,7 @@ static int vidioc_s_ctrl (struct file *file, void *priv,
static struct az_device aztech_unit;
-static struct file_operations aztech_fops = {
+static const struct file_operations aztech_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-cadet.c b/linux/drivers/media/radio/radio-cadet.c
index 6e089a100..da0a41ec3 100644
--- a/linux/drivers/media/radio/radio-cadet.c
+++ b/linux/drivers/media/radio/radio-cadet.c
@@ -537,7 +537,7 @@ cadet_poll(struct file *file, struct poll_table_struct *wait)
}
-static struct file_operations cadet_fops = {
+static const struct file_operations cadet_fops = {
.owner = THIS_MODULE,
.open = cadet_open,
.release = cadet_release,
diff --git a/linux/drivers/media/radio/radio-gemtek-pci.c b/linux/drivers/media/radio/radio-gemtek-pci.c
index 760cfebc8..98c0da421 100644
--- a/linux/drivers/media/radio/radio-gemtek-pci.c
+++ b/linux/drivers/media/radio/radio-gemtek-pci.c
@@ -339,7 +339,7 @@ MODULE_DEVICE_TABLE( pci, gemtek_pci_id );
static int mx = 1;
-static struct file_operations gemtek_pci_fops = {
+static const struct file_operations gemtek_pci_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-gemtek.c b/linux/drivers/media/radio/radio-gemtek.c
index c73f359a9..7b09b4f2a 100644
--- a/linux/drivers/media/radio/radio-gemtek.c
+++ b/linux/drivers/media/radio/radio-gemtek.c
@@ -297,7 +297,7 @@ static int gemtek_ioctl(struct inode *inode, struct file *file,
static struct gemtek_device gemtek_unit;
-static struct file_operations gemtek_fops = {
+static const struct file_operations gemtek_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-maestro.c b/linux/drivers/media/radio/radio-maestro.c
index b23151fb0..ffecdcdea 100644
--- a/linux/drivers/media/radio/radio-maestro.c
+++ b/linux/drivers/media/radio/radio-maestro.c
@@ -22,7 +22,6 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/delay.h>
-#include <linux/sched.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include "compat.h"
@@ -102,7 +101,7 @@ static struct pci_driver maestro_r_driver = {
.remove = __devexit_p(maestro_remove),
};
-static struct file_operations maestro_fops = {
+static const struct file_operations maestro_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-maxiradio.c b/linux/drivers/media/radio/radio-maxiradio.c
index 05d6aaef2..4755f8fe2 100644
--- a/linux/drivers/media/radio/radio-maxiradio.c
+++ b/linux/drivers/media/radio/radio-maxiradio.c
@@ -37,7 +37,6 @@
#include <linux/init.h>
#include <linux/ioport.h>
#include <linux/delay.h>
-#include <linux/sched.h>
#include <asm/io.h>
#include <asm/uaccess.h>
#include "compat.h"
@@ -102,7 +101,7 @@ module_param(radio_nr, int, 0);
#define BITS2FREQ(x) ((x) * FREQ_STEP - FREQ_IF)
-static struct file_operations maxiradio_fops = {
+static const struct file_operations maxiradio_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-rtrack2.c b/linux/drivers/media/radio/radio-rtrack2.c
index b67baa467..80fcbde1f 100644
--- a/linux/drivers/media/radio/radio-rtrack2.c
+++ b/linux/drivers/media/radio/radio-rtrack2.c
@@ -263,7 +263,7 @@ static int rt_ioctl(struct inode *inode, struct file *file,
static struct rt_device rtrack2_unit;
-static struct file_operations rtrack2_fops = {
+static const struct file_operations rtrack2_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-sf16fmi.c b/linux/drivers/media/radio/radio-sf16fmi.c
index d01be8852..00f9c12e7 100644
--- a/linux/drivers/media/radio/radio-sf16fmi.c
+++ b/linux/drivers/media/radio/radio-sf16fmi.c
@@ -284,7 +284,7 @@ static int fmi_ioctl(struct inode *inode, struct file *file,
static struct fmi_device fmi_unit;
-static struct file_operations fmi_fops = {
+static const struct file_operations fmi_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-sf16fmr2.c b/linux/drivers/media/radio/radio-sf16fmr2.c
index bb5ccf55d..267c3d8d4 100644
--- a/linux/drivers/media/radio/radio-sf16fmr2.c
+++ b/linux/drivers/media/radio/radio-sf16fmr2.c
@@ -427,7 +427,7 @@ static int fmr2_ioctl(struct inode *inode, struct file *file,
static struct fmr2_device fmr2_unit;
-static struct file_operations fmr2_fops = {
+static const struct file_operations fmr2_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-terratec.c b/linux/drivers/media/radio/radio-terratec.c
index 5641510ef..ffe1ffd31 100644
--- a/linux/drivers/media/radio/radio-terratec.c
+++ b/linux/drivers/media/radio/radio-terratec.c
@@ -339,7 +339,7 @@ static int tt_ioctl(struct inode *inode, struct file *file,
static struct tt_device terratec_unit;
-static struct file_operations terratec_fops = {
+static const struct file_operations terratec_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-trust.c b/linux/drivers/media/radio/radio-trust.c
index e0c13a913..ee903a52b 100644
--- a/linux/drivers/media/radio/radio-trust.c
+++ b/linux/drivers/media/radio/radio-trust.c
@@ -329,7 +329,7 @@ static int tr_ioctl(struct inode *inode, struct file *file,
return video_usercopy(inode, file, cmd, arg, tr_do_ioctl);
}
-static struct file_operations trust_fops = {
+static const struct file_operations trust_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-typhoon.c b/linux/drivers/media/radio/radio-typhoon.c
index 121acd778..66b21f2cd 100644
--- a/linux/drivers/media/radio/radio-typhoon.c
+++ b/linux/drivers/media/radio/radio-typhoon.c
@@ -323,7 +323,7 @@ static struct typhoon_device typhoon_unit =
.mutefreq = CONFIG_RADIO_TYPHOON_MUTEFREQ,
};
-static struct file_operations typhoon_fops = {
+static const struct file_operations typhoon_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/radio/radio-zoltrix.c b/linux/drivers/media/radio/radio-zoltrix.c
index db3681267..d1473bf04 100644
--- a/linux/drivers/media/radio/radio-zoltrix.c
+++ b/linux/drivers/media/radio/radio-zoltrix.c
@@ -378,7 +378,7 @@ static int zol_ioctl(struct inode *inode, struct file *file,
static struct zol_device zoltrix_unit;
-static struct file_operations zoltrix_fops =
+static const struct file_operations zoltrix_fops =
{
.owner = THIS_MODULE,
.open = video_exclusive_open,
diff --git a/linux/drivers/media/video/adv7170.c b/linux/drivers/media/video/adv7170.c
index 984ca2a30..2fca38f92 100644
--- a/linux/drivers/media/video/adv7170.c
+++ b/linux/drivers/media/video/adv7170.c
@@ -42,7 +42,6 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/page.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include "compat.h"
diff --git a/linux/drivers/media/video/adv7175.c b/linux/drivers/media/video/adv7175.c
index 052b54f83..f4047bec6 100644
--- a/linux/drivers/media/video/adv7175.c
+++ b/linux/drivers/media/video/adv7175.c
@@ -38,7 +38,6 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/page.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include "compat.h"
diff --git a/linux/drivers/media/video/arv.c b/linux/drivers/media/video/arv.c
index 11302b1d1..c37d8673b 100644
--- a/linux/drivers/media/video/arv.c
+++ b/linux/drivers/media/video/arv.c
@@ -747,7 +747,7 @@ void ar_release(struct video_device *vfd)
* Video4Linux Module functions
*
****************************************************************************/
-static struct file_operations ar_fops = {
+static const struct file_operations ar_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/video/bt819.c b/linux/drivers/media/video/bt819.c
index 570d5997c..64149b5c1 100644
--- a/linux/drivers/media/video/bt819.c
+++ b/linux/drivers/media/video/bt819.c
@@ -42,7 +42,6 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/page.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include "compat.h"
diff --git a/linux/drivers/media/video/bt856.c b/linux/drivers/media/video/bt856.c
index cb5c2160f..ae2c1bc56 100644
--- a/linux/drivers/media/video/bt856.c
+++ b/linux/drivers/media/video/bt856.c
@@ -42,7 +42,6 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/page.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include "compat.h"
diff --git a/linux/drivers/media/video/bt8xx/bttv-driver.c b/linux/drivers/media/video/bt8xx/bttv-driver.c
index 4c813a4da..25a61e379 100644
--- a/linux/drivers/media/video/bt8xx/bttv-driver.c
+++ b/linux/drivers/media/video/bt8xx/bttv-driver.c
@@ -3834,7 +3834,7 @@ bttv_mmap(struct file *file, struct vm_area_struct *vma)
return videobuf_mmap_mapper(bttv_queue(fh),vma);
}
-static struct file_operations bttv_fops =
+static const struct file_operations bttv_fops =
{
.owner = THIS_MODULE,
.open = bttv_open,
@@ -3994,7 +3994,7 @@ static unsigned int radio_poll(struct file *file, poll_table *wait)
return cmd.result;
}
-static struct file_operations radio_fops =
+static const struct file_operations radio_fops =
{
.owner = THIS_MODULE,
.open = radio_open,
diff --git a/linux/drivers/media/video/bt8xx/bttv-gpio.c b/linux/drivers/media/video/bt8xx/bttv-gpio.c
index c5ed2f567..1f31495f6 100644
--- a/linux/drivers/media/video/bt8xx/bttv-gpio.c
+++ b/linux/drivers/media/video/bt8xx/bttv-gpio.c
@@ -78,7 +78,6 @@ struct bus_type bttv_sub_bus_type = {
.remove = bttv_sub_remove,
#endif
};
-EXPORT_SYMBOL(bttv_sub_bus_type);
static void release_sub_device(struct device *dev)
{
@@ -159,7 +158,6 @@ void bttv_gpio_inout(struct bttv_core *core, u32 mask, u32 outbits)
btwrite(data,BT848_GPIO_OUT_EN);
spin_unlock_irqrestore(&btv->gpio_lock,flags);
}
-EXPORT_SYMBOL(bttv_gpio_inout);
u32 bttv_gpio_read(struct bttv_core *core)
{
@@ -169,7 +167,6 @@ u32 bttv_gpio_read(struct bttv_core *core)
value = btread(BT848_GPIO_DATA);
return value;
}
-EXPORT_SYMBOL(bttv_gpio_read);
void bttv_gpio_write(struct bttv_core *core, u32 value)
{
@@ -177,7 +174,6 @@ void bttv_gpio_write(struct bttv_core *core, u32 value)
btwrite(value,BT848_GPIO_DATA);
}
-EXPORT_SYMBOL(bttv_gpio_write);
void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits)
{
@@ -192,7 +188,6 @@ void bttv_gpio_bits(struct bttv_core *core, u32 mask, u32 bits)
btwrite(data,BT848_GPIO_DATA);
spin_unlock_irqrestore(&btv->gpio_lock,flags);
}
-EXPORT_SYMBOL(bttv_gpio_bits);
/*
* Local variables:
diff --git a/linux/drivers/media/video/bt8xx/bttv-if.c b/linux/drivers/media/video/bt8xx/bttv-if.c
index c286f5db7..ecf07988c 100644
--- a/linux/drivers/media/video/bt8xx/bttv-if.c
+++ b/linux/drivers/media/video/bt8xx/bttv-if.c
@@ -33,32 +33,16 @@
#include "bttvp.h"
-EXPORT_SYMBOL(bttv_get_cardinfo);
EXPORT_SYMBOL(bttv_get_pcidev);
-EXPORT_SYMBOL(bttv_get_id);
EXPORT_SYMBOL(bttv_gpio_enable);
EXPORT_SYMBOL(bttv_read_gpio);
EXPORT_SYMBOL(bttv_write_gpio);
-EXPORT_SYMBOL(bttv_get_gpio_queue);
-EXPORT_SYMBOL(bttv_i2c_call);
/* ----------------------------------------------------------------------- */
/* Exported functions - for other modules which want to access the */
/* gpio ports (IR for example) */
/* see bttv.h for comments */
-int bttv_get_cardinfo(unsigned int card, int *type, unsigned *cardid)
-{
- printk("The bttv_* interface is obsolete and will go away,\n"
- "please use the new, sysfs based interface instead.\n");
- if (card >= bttv_num) {
- return -1;
- }
- *type = bttvs[card].c.type;
- *cardid = bttvs[card].cardid;
- return 0;
-}
-
struct pci_dev* bttv_get_pcidev(unsigned int card)
{
if (card >= bttv_num)
@@ -66,27 +50,6 @@ struct pci_dev* bttv_get_pcidev(unsigned int card)
return bttvs[card].c.pci;
}
-int bttv_get_id(unsigned int card)
-{
- printk("The bttv_* interface is obsolete and will go away,\n"
- "please use the new, sysfs based interface instead.\n");
- if (card >= bttv_num) {
- return -1;
- }
- return bttvs[card].c.type;
-}
-
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-/* with 2.6.x not needed thanks to the driver model + sysfs */
-struct i2c_adapter *bttv_get_i2c_adap(unsigned int card)
-{
- if (card >= bttv_num) {
- return NULL;
- }
- return &bttvs[card].c.i2c_adap;
-}
-EXPORT_SYMBOL(bttv_get_i2c_adap);
-#endif
int bttv_gpio_enable(unsigned int card, unsigned long mask, unsigned long data)
{
@@ -141,28 +104,6 @@ int bttv_write_gpio(unsigned int card, unsigned long mask, unsigned long data)
return 0;
}
-wait_queue_head_t* bttv_get_gpio_queue(unsigned int card)
-{
- struct bttv *btv;
-
- if (card >= bttv_num) {
- return NULL;
- }
-
- btv = &bttvs[card];
- if (bttvs[card].shutdown) {
- return NULL;
- }
- return &btv->gpioq;
-}
-
-void bttv_i2c_call(unsigned int card, unsigned int cmd, void *arg)
-{
- if (card >= bttv_num)
- return;
- bttv_call_i2c_clients(&bttvs[card], cmd, arg);
-}
-
/*
* Local variables:
* c-basic-offset: 8
diff --git a/linux/drivers/media/video/bt8xx/bttv-vbi.c b/linux/drivers/media/video/bt8xx/bttv-vbi.c
index 689d79404..93e35de5a 100644
--- a/linux/drivers/media/video/bt8xx/bttv-vbi.c
+++ b/linux/drivers/media/video/bt8xx/bttv-vbi.c
@@ -28,7 +28,6 @@
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/kdev_t.h>
#include <asm/io.h>
diff --git a/linux/drivers/media/video/bt8xx/bttv.h b/linux/drivers/media/video/bt8xx/bttv.h
index d457a54b9..ed565fb8b 100644
--- a/linux/drivers/media/video/bt8xx/bttv.h
+++ b/linux/drivers/media/video/bt8xx/bttv.h
@@ -262,17 +262,8 @@ extern int bttv_handle_chipset(struct bttv *btv);
/* this obsolete -- please use the sysfs-based
interface below for new code */
-/* returns card type + card ID (for bt878-based ones)
- for possible values see lines below beginning with #define BTTV_BOARD_UNKNOWN
- returns negative value if error occurred
-*/
-extern int bttv_get_cardinfo(unsigned int card, int *type,
- unsigned int *cardid);
extern struct pci_dev* bttv_get_pcidev(unsigned int card);
-/* obsolete, use bttv_get_cardinfo instead */
-extern int bttv_get_id(unsigned int card);
-
/* sets GPOE register (BT848_GPIO_OUT_EN) to new value:
data | (current_GPOE_value & ~mask)
returns negative value if error occurred
@@ -292,26 +283,8 @@ extern int bttv_read_gpio(unsigned int card, unsigned long *data);
extern int bttv_write_gpio(unsigned int card,
unsigned long mask, unsigned long data);
-/* returns pointer to task queue which can be used as parameter to
- interruptible_sleep_on
- in interrupt handler if BT848_INT_GPINT bit is set - this queue is activated
- (wake_up_interruptible) and following call to the function bttv_read_gpio
- should return new value of GPDATA,
- returns NULL value if error occurred or queue is not available
- WARNING: because there is no buffer for GPIO data, one MUST
- process data ASAP
-*/
-extern wait_queue_head_t* bttv_get_gpio_queue(unsigned int card);
-
-/* call i2c clients
-*/
-extern void bttv_i2c_call(unsigned int card, unsigned int cmd, void *arg);
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
-/* with 2.6.x not needed thanks to the driver model + sysfs, see below */
-extern struct i2c_adapter *bttv_get_i2c_adap(unsigned int card);
-#endif
/* ---------------------------------------------------------- */
diff --git a/linux/drivers/media/video/btcx-risc.c b/linux/drivers/media/video/btcx-risc.c
index a3bd492eb..8950c8a8b 100644
--- a/linux/drivers/media/video/btcx-risc.c
+++ b/linux/drivers/media/video/btcx-risc.c
@@ -27,10 +27,10 @@
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/interrupt.h>
-#include "compat.h"
#include <linux/videodev2.h>
#include <asm/page.h>
#include <asm/pgtable.h>
+#include "compat.h"
#include "btcx-risc.h"
diff --git a/linux/drivers/media/video/bw-qcam.c b/linux/drivers/media/video/bw-qcam.c
index 497fc3418..a175d7810 100644
--- a/linux/drivers/media/video/bw-qcam.c
+++ b/linux/drivers/media/video/bw-qcam.c
@@ -874,7 +874,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
return len;
}
-static struct file_operations qcam_fops = {
+static const struct file_operations qcam_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/video/c-qcam.c b/linux/drivers/media/video/c-qcam.c
index f535db726..2c8fa78ee 100644
--- a/linux/drivers/media/video/c-qcam.c
+++ b/linux/drivers/media/video/c-qcam.c
@@ -691,7 +691,7 @@ static ssize_t qcam_read(struct file *file, char __user *buf,
}
/* video device template */
-static struct file_operations qcam_fops = {
+static const struct file_operations qcam_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/video/cafe_ccic.c b/linux/drivers/media/video/cafe_ccic.c
index b61a90e78..a21d1b5b7 100644
--- a/linux/drivers/media/video/cafe_ccic.c
+++ b/linux/drivers/media/video/cafe_ccic.c
@@ -556,6 +556,7 @@ static int cafe_smbus_setup(struct cafe_camera *cam)
adap->client_unregister = cafe_smbus_detach;
adap->algo = &cafe_smbus_algo;
strcpy(adap->name, "cafe_ccic");
+ adap->dev.parent = &cam->pdev->dev;
i2c_set_adapdata(adap, cam);
ret = i2c_add_adapter(adap);
if (ret)
@@ -1720,7 +1721,7 @@ static void cafe_v4l_dev_release(struct video_device *vd)
* clone it for specific real devices.
*/
-static struct file_operations cafe_v4l_fops = {
+static const struct file_operations cafe_v4l_fops = {
.owner = THIS_MODULE,
.open = cafe_v4l_open,
.release = cafe_v4l_release,
@@ -1974,7 +1975,7 @@ static ssize_t cafe_dfs_read_regs(struct file *file,
s - cafe_debug_buf);
}
-static struct file_operations cafe_dfs_reg_ops = {
+static const struct file_operations cafe_dfs_reg_ops = {
.owner = THIS_MODULE,
.read = cafe_dfs_read_regs,
.open = cafe_dfs_open
@@ -2000,7 +2001,7 @@ static ssize_t cafe_dfs_read_cam(struct file *file,
s - cafe_debug_buf);
}
-static struct file_operations cafe_dfs_cam_ops = {
+static const struct file_operations cafe_dfs_cam_ops = {
.owner = THIS_MODULE,
.read = cafe_dfs_read_cam,
.open = cafe_dfs_open
diff --git a/linux/drivers/media/video/compat_ioctl32.c b/linux/drivers/media/video/compat_ioctl32.c
index e0d6500f4..15151f56b 100644
--- a/linux/drivers/media/video/compat_ioctl32.c
+++ b/linux/drivers/media/video/compat_ioctl32.c
@@ -12,7 +12,6 @@
* ioctls.
*/
-#include "compat.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,11)
#include <linux/compat.h>
#include <linux/videodev.h>
@@ -20,6 +19,7 @@
#include <linux/module.h>
#include <linux/smp_lock.h>
#include <media/v4l2-common.h>
+#include "compat.h"
#ifdef CONFIG_COMPAT
diff --git a/linux/drivers/media/video/cpia.c b/linux/drivers/media/video/cpia.c
index 2494bb844..369e1144a 100644
--- a/linux/drivers/media/video/cpia.c
+++ b/linux/drivers/media/video/cpia.c
@@ -3793,7 +3793,7 @@ static int cpia_mmap(struct file *file, struct vm_area_struct *vma)
return 0;
}
-static struct file_operations cpia_fops = {
+static const struct file_operations cpia_fops = {
.owner = THIS_MODULE,
.open = cpia_open,
.release = cpia_close,
diff --git a/linux/drivers/media/video/cpia2/cpia2_v4l.c b/linux/drivers/media/video/cpia2/cpia2_v4l.c
index d09f49950..1bda7ad9d 100644
--- a/linux/drivers/media/video/cpia2/cpia2_v4l.c
+++ b/linux/drivers/media/video/cpia2/cpia2_v4l.c
@@ -1924,7 +1924,7 @@ static void reset_camera_struct_v4l(struct camera_data *cam)
/***
* The v4l video device structure initialized for this device
***/
-static struct file_operations fops_template = {
+static const struct file_operations fops_template = {
.owner = THIS_MODULE,
.open = cpia2_open,
.release = cpia2_close,
diff --git a/linux/drivers/media/video/cs53l32a.c b/linux/drivers/media/video/cs53l32a.c
index c6657317b..07644a97d 100644
--- a/linux/drivers/media/video/cs53l32a.c
+++ b/linux/drivers/media/video/cs53l32a.c
@@ -19,7 +19,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
@@ -33,6 +32,7 @@
#include "i2c-compat.h"
#include <linux/slab.h>
#endif
+#include "compat.h"
MODULE_DESCRIPTION("i2c device driver for cs53l32a Audio ADC");
MODULE_AUTHOR("Martin Vaughan");
diff --git a/linux/drivers/media/video/cx2341x.c b/linux/drivers/media/video/cx2341x.c
index d6e5d3560..422d2c6a4 100644
--- a/linux/drivers/media/video/cx2341x.c
+++ b/linux/drivers/media/video/cx2341x.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -35,6 +34,7 @@
#include <media/tuner.h>
#include <media/cx2341x.h>
#include <media/v4l2-common.h>
+#include "compat.h"
MODULE_DESCRIPTION("cx23415/6 driver");
MODULE_AUTHOR("Hans Verkuil");
@@ -55,6 +55,7 @@ const u32 cx2341x_mpeg_ctrls[] = {
V4L2_CID_MPEG_AUDIO_MODE_EXTENSION,
V4L2_CID_MPEG_AUDIO_EMPHASIS,
V4L2_CID_MPEG_AUDIO_CRC,
+ V4L2_CID_MPEG_AUDIO_MUTE,
V4L2_CID_MPEG_VIDEO_ENCODING,
V4L2_CID_MPEG_VIDEO_ASPECT,
V4L2_CID_MPEG_VIDEO_B_FRAMES,
@@ -64,6 +65,8 @@ const u32 cx2341x_mpeg_ctrls[] = {
V4L2_CID_MPEG_VIDEO_BITRATE,
V4L2_CID_MPEG_VIDEO_BITRATE_PEAK,
V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION,
+ V4L2_CID_MPEG_VIDEO_MUTE,
+ V4L2_CID_MPEG_VIDEO_MUTE_YUV,
V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE,
V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER,
V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_SPATIAL_FILTER_TYPE,
@@ -75,6 +78,7 @@ const u32 cx2341x_mpeg_ctrls[] = {
V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP,
V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM,
V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP,
+ V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS,
0
};
@@ -106,6 +110,9 @@ static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_AUDIO_CRC:
ctrl->value = params->audio_crc;
break;
+ case V4L2_CID_MPEG_AUDIO_MUTE:
+ ctrl->value = params->audio_mute;
+ break;
case V4L2_CID_MPEG_VIDEO_ENCODING:
ctrl->value = params->video_encoding;
break;
@@ -133,6 +140,12 @@ static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION:
ctrl->value = params->video_temporal_decimation;
break;
+ case V4L2_CID_MPEG_VIDEO_MUTE:
+ ctrl->value = params->video_mute;
+ break;
+ case V4L2_CID_MPEG_VIDEO_MUTE_YUV:
+ ctrl->value = params->video_mute_yuv;
+ break;
case V4L2_CID_MPEG_STREAM_TYPE:
ctrl->value = params->stream_type;
break;
@@ -172,6 +185,9 @@ static int cx2341x_get_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM:
ctrl->value = params->video_chroma_median_filter_bottom;
break;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ ctrl->value = params->stream_insert_nav_packets;
+ break;
default:
return -EINVAL;
}
@@ -205,6 +221,9 @@ static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_AUDIO_CRC:
params->audio_crc = ctrl->value;
break;
+ case V4L2_CID_MPEG_AUDIO_MUTE:
+ params->audio_mute = ctrl->value;
+ break;
case V4L2_CID_MPEG_VIDEO_ASPECT:
params->video_aspect = ctrl->value;
break;
@@ -247,6 +266,12 @@ static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION:
params->video_temporal_decimation = ctrl->value;
break;
+ case V4L2_CID_MPEG_VIDEO_MUTE:
+ params->video_mute = (ctrl->value != 0);
+ break;
+ case V4L2_CID_MPEG_VIDEO_MUTE_YUV:
+ params->video_mute_yuv = ctrl->value;
+ break;
case V4L2_CID_MPEG_STREAM_TYPE:
params->stream_type = ctrl->value;
params->video_encoding =
@@ -294,6 +319,9 @@ static int cx2341x_set_ctrl(struct cx2341x_mpeg_params *params,
case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM:
params->video_chroma_median_filter_bottom = ctrl->value;
break;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ params->stream_insert_nav_packets = ctrl->value;
+ break;
default:
return -EINVAL;
}
@@ -340,6 +368,9 @@ static int cx2341x_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 ma
case V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM:
name = "Median Chroma Filter Minimum";
break;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ name = "Insert Navigation Packets";
+ break;
default:
return v4l2_ctrl_query_fill(qctrl, min, max, step, def);
@@ -354,6 +385,12 @@ static int cx2341x_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 ma
min = 0;
step = 1;
break;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ qctrl->type = V4L2_CTRL_TYPE_BOOLEAN;
+ min = 0;
+ max = 1;
+ step = 1;
+ break;
default:
qctrl->type = V4L2_CTRL_TYPE_INTEGER;
break;
@@ -509,6 +546,9 @@ int cx2341x_ctrl_query(struct cx2341x_mpeg_params *params, struct v4l2_queryctrl
qctrl->flags |= V4L2_CTRL_FLAG_INACTIVE;
return 0;
+ case V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS:
+ return cx2341x_ctrl_query_fill(qctrl, 0, 1, 1, 0);
+
default:
return v4l2_ctrl_query_fill_std(qctrl);
@@ -660,6 +700,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p)
/* stream */
.stream_type = V4L2_MPEG_STREAM_TYPE_MPEG2_PS,
.stream_vbi_fmt = V4L2_MPEG_STREAM_VBI_FMT_NONE,
+ .stream_insert_nav_packets = 0,
/* audio */
.audio_sampling_freq = V4L2_MPEG_AUDIO_SAMPLING_FREQ_48000,
@@ -669,6 +710,7 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p)
.audio_mode_extension = V4L2_MPEG_AUDIO_MODE_EXTENSION_BOUND_4,
.audio_emphasis = V4L2_MPEG_AUDIO_EMPHASIS_NONE,
.audio_crc = V4L2_MPEG_AUDIO_CRC_NONE,
+ .audio_mute = 0,
/* video */
.video_encoding = V4L2_MPEG_VIDEO_ENCODING_MPEG_2,
@@ -680,6 +722,8 @@ void cx2341x_fill_defaults(struct cx2341x_mpeg_params *p)
.video_bitrate = 6000000,
.video_bitrate_peak = 8000000,
.video_temporal_decimation = 0,
+ .video_mute = 0,
+ .video_mute_yuv = 0x008080, /* YCbCr value for black */
/* encoding filters */
.video_spatial_filter_mode = V4L2_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE_MANUAL,
@@ -783,6 +827,10 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func,
err = cx2341x_api(priv, func, CX2341X_ENC_SET_AUDIO_PROPERTIES, 1, new->audio_properties);
if (err) return err;
}
+ if (old == NULL || old->audio_mute != new->audio_mute) {
+ err = cx2341x_api(priv, func, CX2341X_ENC_MUTE_AUDIO, 1, new->audio_mute);
+ if (err) return err;
+ }
if (old == NULL || old->video_bitrate_mode != new->video_bitrate_mode ||
old->video_bitrate != new->video_bitrate ||
old->video_bitrate_peak != new->video_bitrate_peak) {
@@ -830,6 +878,15 @@ int cx2341x_update(void *priv, cx2341x_mbox_func func,
new->video_temporal_decimation);
if (err) return err;
}
+ if (old == NULL || old->video_mute != new->video_mute ||
+ (new->video_mute && old->video_mute_yuv != new->video_mute_yuv)) {
+ err = cx2341x_api(priv, func, CX2341X_ENC_MUTE_VIDEO, 1, new->video_mute | (new->video_mute_yuv << 8));
+ if (err) return err;
+ }
+ if (old == NULL || old->stream_insert_nav_packets != new->stream_insert_nav_packets) {
+ err = cx2341x_api(priv, func, CX2341X_ENC_MISC, 2, 7, new->stream_insert_nav_packets);
+ if (err) return err;
+ }
return 0;
}
@@ -858,18 +915,22 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix)
int temporal = p->video_temporal_filter;
/* Stream */
- printk(KERN_INFO "%s: Stream: %s\n",
+ printk(KERN_INFO "%s: Stream: %s",
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_TYPE));
+ if (p->stream_insert_nav_packets)
+ printk(" (with navigation packets)");
+ printk("\n");
printk(KERN_INFO "%s: VBI Format: %s\n",
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_STREAM_VBI_FMT));
/* Video */
- printk(KERN_INFO "%s: Video: %dx%d, %d fps\n",
+ printk(KERN_INFO "%s: Video: %dx%d, %d fps%s\n",
prefix,
p->width / (is_mpeg1 ? 2 : 1), p->height / (is_mpeg1 ? 2 : 1),
- p->is_50hz ? 25 : 30);
+ p->is_50hz ? 25 : 30,
+ (p->video_mute) ? " (muted)" : "");
printk(KERN_INFO "%s: Video: %s, %s, %s, %d",
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_VIDEO_ENCODING),
@@ -890,12 +951,13 @@ void cx2341x_log_status(struct cx2341x_mpeg_params *p, const char *prefix)
}
/* Audio */
- printk(KERN_INFO "%s: Audio: %s, %s, %s, %s",
+ printk(KERN_INFO "%s: Audio: %s, %s, %s, %s%s",
prefix,
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_SAMPLING_FREQ),
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_ENCODING),
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_L2_BITRATE),
- cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_MODE));
+ cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_MODE),
+ p->audio_mute ? " (muted)" : "");
if (p->audio_mode == V4L2_MPEG_AUDIO_MODE_JOINT_STEREO) {
printk(", %s",
cx2341x_menu_item(p, V4L2_CID_MPEG_AUDIO_MODE_EXTENSION));
diff --git a/linux/drivers/media/video/cx25840/cx25840-audio.c b/linux/drivers/media/video/cx25840/cx25840-audio.c
index 4cdf4c60e..40d931591 100644
--- a/linux/drivers/media/video/cx25840/cx25840-audio.c
+++ b/linux/drivers/media/video/cx25840/cx25840-audio.c
@@ -15,12 +15,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/v4l2-common.h>
#include <media/cx25840.h>
+#include "compat.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
diff --git a/linux/drivers/media/video/cx25840/cx25840-core.c b/linux/drivers/media/video/cx25840/cx25840-core.c
index fc1e7da7c..75dbba700 100644
--- a/linux/drivers/media/video/cx25840/cx25840-core.c
+++ b/linux/drivers/media/video/cx25840/cx25840-core.c
@@ -28,7 +28,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/module.h>
@@ -37,6 +36,7 @@
#include <linux/i2c.h>
#include <media/v4l2-common.h>
#include <media/cx25840.h>
+#include "compat.h"
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
diff --git a/linux/drivers/media/video/cx25840/cx25840-firmware.c b/linux/drivers/media/video/cx25840/cx25840-firmware.c
index 1b730b155..e42d32829 100644
--- a/linux/drivers/media/video/cx25840/cx25840-firmware.c
+++ b/linux/drivers/media/video/cx25840/cx25840-firmware.c
@@ -15,13 +15,13 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
#include <linux/firmware.h>
#include <media/v4l2-common.h>
#include <media/cx25840.h>
+#include "compat.h"
#include "cx25840-core.h"
diff --git a/linux/drivers/media/video/cx25840/cx25840-vbi.c b/linux/drivers/media/video/cx25840/cx25840-vbi.c
index 876adbcba..8bb20bf77 100644
--- a/linux/drivers/media/video/cx25840/cx25840-vbi.c
+++ b/linux/drivers/media/video/cx25840/cx25840-vbi.c
@@ -15,12 +15,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/videodev2.h>
#include <linux/i2c.h>
#include <media/v4l2-common.h>
#include <media/cx25840.h>
+#include "compat.h"
#include "cx25840-core.h"
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c
index 3f11707b3..3eb6c8e28 100644
--- a/linux/drivers/media/video/cx88/cx88-blackbird.c
+++ b/linux/drivers/media/video/cx88/cx88-blackbird.c
@@ -1216,7 +1216,7 @@ mpeg_mmap(struct file *file, struct vm_area_struct * vma)
return videobuf_mmap_mapper(&fh->mpegq, vma);
}
-static struct file_operations mpeg_fops =
+static const struct file_operations mpeg_fops =
{
.owner = THIS_MODULE,
.open = mpeg_open,
diff --git a/linux/drivers/media/video/cx88/cx88-tvaudio.c b/linux/drivers/media/video/cx88/cx88-tvaudio.c
index 2a5ad4c9d..e65cf72af 100644
--- a/linux/drivers/media/video/cx88/cx88-tvaudio.c
+++ b/linux/drivers/media/video/cx88/cx88-tvaudio.c
@@ -51,7 +51,6 @@
#include <linux/pci.h>
#include <linux/signal.h>
#include <linux/ioport.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include <linux/interrupt.h>
#include <linux/vmalloc.h>
diff --git a/linux/drivers/media/video/cx88/cx88-video.c b/linux/drivers/media/video/cx88/cx88-video.c
index 43c89eec9..2af3f3d2c 100644
--- a/linux/drivers/media/video/cx88/cx88-video.c
+++ b/linux/drivers/media/video/cx88/cx88-video.c
@@ -1915,7 +1915,7 @@ static irqreturn_t cx8800_irq(int irq, void *dev_id)
/* ----------------------------------------------------------- */
/* exported stuff */
-static struct file_operations video_fops =
+static const struct file_operations video_fops =
{
.owner = THIS_MODULE,
.open = video_open,
@@ -1973,7 +1973,7 @@ static struct video_device cx8800_video_template =
.current_norm = V4L2_STD_NTSC_M,
};
-static struct file_operations radio_fops =
+static const struct file_operations radio_fops =
{
.owner = THIS_MODULE,
.open = video_open,
diff --git a/linux/drivers/media/video/dabusb.c b/linux/drivers/media/video/dabusb.c
index d6c001ebe..692dbd93c 100644
--- a/linux/drivers/media/video/dabusb.c
+++ b/linux/drivers/media/video/dabusb.c
@@ -703,7 +703,7 @@ static int dabusb_ioctl (struct inode *inode, struct file *file, unsigned int cm
return ret;
}
-static struct file_operations dabusb_fops =
+static const struct file_operations dabusb_fops =
{
.owner = THIS_MODULE,
.llseek = no_llseek,
diff --git a/linux/drivers/media/video/dpc7146.c b/linux/drivers/media/video/dpc7146.c
index 3ee2cc6e3..7070538c0 100644
--- a/linux/drivers/media/video/dpc7146.c
+++ b/linux/drivers/media/video/dpc7146.c
@@ -20,9 +20,9 @@
#define DEBUG_VARIABLE debug
-#include "compat.h"
#include <media/saa7146_vv.h>
#include <linux/video_decoder.h> /* for saa7111a */
+#include "compat.h"
#define I2C_SAA7111A 0x24
diff --git a/linux/drivers/media/video/em28xx/em28xx-input.c b/linux/drivers/media/video/em28xx/em28xx-input.c
index e7efd2056..d1973a669 100644
--- a/linux/drivers/media/video/em28xx/em28xx-input.c
+++ b/linux/drivers/media/video/em28xx/em28xx-input.c
@@ -25,7 +25,6 @@
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
-#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/input.h>
#include <linux/usb.h>
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c
index f03547db8..3f2ad0677 100644
--- a/linux/drivers/media/video/em28xx/em28xx-video.c
+++ b/linux/drivers/media/video/em28xx/em28xx-video.c
@@ -660,15 +660,8 @@ static int em28xx_v4l2_mmap(struct file *filp, struct vm_area_struct *vma)
pos = dev->frame[i].bufmem;
while (size > 0) { /* size is page-aligned */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
- unsigned long page = vmalloc_to_pfn(pos);
- if (remap_pfn_range(vma, start, page, PAGE_SIZE,
- vma->vm_page_prot)) {
- em28xx_videodbg("mmap: rename page map failed\n");
-#else
if (vm_insert_page(vma, start, vmalloc_to_page(pos))) {
em28xx_videodbg("mmap: vm_insert_page failed\n");
-#endif
mutex_unlock(&dev->fileop_lock);
return -EAGAIN;
}
@@ -1583,7 +1576,7 @@ static int em28xx_v4l2_ioctl(struct inode *inode, struct file *filp,
return ret;
}
-static struct file_operations em28xx_v4l_fops = {
+static const struct file_operations em28xx_v4l_fops = {
.owner = THIS_MODULE,
.open = em28xx_v4l2_open,
.release = em28xx_v4l2_close,
diff --git a/linux/drivers/media/video/et61x251/et61x251_core.c b/linux/drivers/media/video/et61x251/et61x251_core.c
index b97444495..cddb393d5 100644
--- a/linux/drivers/media/video/et61x251/et61x251_core.c
+++ b/linux/drivers/media/video/et61x251/et61x251_core.c
@@ -2498,7 +2498,7 @@ static int et61x251_ioctl(struct inode* inode, struct file* filp,
}
-static struct file_operations et61x251_fops = {
+static const struct file_operations et61x251_fops = {
.owner = THIS_MODULE,
.open = et61x251_open,
.release = et61x251_release,
diff --git a/linux/drivers/media/video/hexium_gemini.c b/linux/drivers/media/video/hexium_gemini.c
index 6cc7ca99d..d1957736b 100644
--- a/linux/drivers/media/video/hexium_gemini.c
+++ b/linux/drivers/media/video/hexium_gemini.c
@@ -23,8 +23,8 @@
#define DEBUG_VARIABLE debug
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static int debug = 0;
module_param(debug, int, 0);
diff --git a/linux/drivers/media/video/hexium_orion.c b/linux/drivers/media/video/hexium_orion.c
index 59ed0dfd2..2c9eb6923 100644
--- a/linux/drivers/media/video/hexium_orion.c
+++ b/linux/drivers/media/video/hexium_orion.c
@@ -23,8 +23,8 @@
#define DEBUG_VARIABLE debug
-#include "compat.h"
#include <media/saa7146_vv.h>
+#include "compat.h"
static int debug = 0;
module_param(debug, int, 0);
diff --git a/linux/drivers/media/video/indycam.c b/linux/drivers/media/video/indycam.c
index 7420b79e9..5c2c4029f 100644
--- a/linux/drivers/media/video/indycam.c
+++ b/linux/drivers/media/video/indycam.c
@@ -17,7 +17,6 @@
#include <linux/major.h>
#include <linux/module.h>
#include <linux/mm.h>
-#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/videodev.h>
diff --git a/linux/drivers/media/video/ir-kbd-i2c.c b/linux/drivers/media/video/ir-kbd-i2c.c
index 380766944..d20bad700 100644
--- a/linux/drivers/media/video/ir-kbd-i2c.c
+++ b/linux/drivers/media/video/ir-kbd-i2c.c
@@ -31,7 +31,6 @@
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
diff --git a/linux/drivers/media/video/meye.c b/linux/drivers/media/video/meye.c
index cec07f5e0..6499c7831 100644
--- a/linux/drivers/media/video/meye.c
+++ b/linux/drivers/media/video/meye.c
@@ -28,7 +28,6 @@
*/
#include <linux/module.h>
#include <linux/pci.h>
-#include <linux/sched.h>
#include <linux/init.h>
#include "compat.h"
#include <linux/videodev.h>
@@ -1753,7 +1752,7 @@ static int meye_mmap(struct file *file, struct vm_area_struct *vma)
return 0;
}
-static struct file_operations meye_fops = {
+static const struct file_operations meye_fops = {
.owner = THIS_MODULE,
.open = meye_open,
.release = meye_release,
diff --git a/linux/drivers/media/video/msp3400-driver.c b/linux/drivers/media/video/msp3400-driver.c
index f03cc0032..9958e2570 100644
--- a/linux/drivers/media/video/msp3400-driver.c
+++ b/linux/drivers/media/video/msp3400-driver.c
@@ -45,7 +45,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/module.h>
@@ -67,6 +66,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
+#include "compat.h"
#include "msp3400-driver.h"
/* ---------------------------------------------------------------------- */
@@ -399,16 +399,9 @@ int msp_sleep(struct msp_state *state, int timeout)
(msecs_to_jiffies(timeout));
}
}
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,12)) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
remove_wait_queue(&state->wq, &wait);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
try_to_freeze();
-#endif
return state->restart;
}
diff --git a/linux/drivers/media/video/msp3400-kthreads.c b/linux/drivers/media/video/msp3400-kthreads.c
index df95b0cfb..041ad89c6 100644
--- a/linux/drivers/media/video/msp3400-kthreads.c
+++ b/linux/drivers/media/video/msp3400-kthreads.c
@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/module.h>
@@ -35,6 +34,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
+#include "compat.h"
#include "msp3400-driver.h"
/* this one uses the automatic sound standard detection of newer msp34xx
diff --git a/linux/drivers/media/video/mxb.c b/linux/drivers/media/video/mxb.c
index 928a3ab91..0ed5c1e47 100644
--- a/linux/drivers/media/video/mxb.c
+++ b/linux/drivers/media/video/mxb.c
@@ -23,11 +23,11 @@
#define DEBUG_VARIABLE debug
-#include "compat.h"
#include <media/saa7146_vv.h>
#include <media/tuner.h>
#include <linux/video_decoder.h>
#include <media/v4l2-common.h>
+#include "compat.h"
#include "mxb.h"
#include "tea6415c.h"
diff --git a/linux/drivers/media/video/ov511.c b/linux/drivers/media/video/ov511.c
index b1fb74147..d4d3a8654 100644
--- a/linux/drivers/media/video/ov511.c
+++ b/linux/drivers/media/video/ov511.c
@@ -4657,7 +4657,7 @@ ov51x_v4l1_mmap(struct file *file, struct vm_area_struct *vma)
return 0;
}
-static struct file_operations ov511_fops = {
+static const struct file_operations ov511_fops = {
.owner = THIS_MODULE,
.open = ov51x_v4l1_open,
.release = ov51x_v4l1_close,
diff --git a/linux/drivers/media/video/pms.c b/linux/drivers/media/video/pms.c
index e13a7f8b8..8d4b18199 100644
--- a/linux/drivers/media/video/pms.c
+++ b/linux/drivers/media/video/pms.c
@@ -28,7 +28,6 @@
#include <linux/ioport.h>
#include <linux/init.h>
#include <asm/io.h>
-#include <linux/sched.h>
#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
@@ -888,7 +887,7 @@ static ssize_t pms_read(struct file *file, char __user *buf,
return len;
}
-static struct file_operations pms_fops = {
+static const struct file_operations pms_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
index 7f38dae17..3ed700041 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-audio.c
@@ -20,13 +20,13 @@
*
*/
-#include "compat.h"
#include "pvrusb2-audio.h"
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
#include <linux/videodev2.h>
#include <media/msp3400.h>
#include <media/v4l2-common.h>
+#include "compat.h"
struct pvr2_msp3400_handler {
struct pvr2_hdw *hdw;
@@ -130,7 +130,7 @@ static unsigned int pvr2_msp3400_describe(struct pvr2_msp3400_handler *ctxt,
}
-const static struct pvr2_i2c_handler_functions msp3400_funcs = {
+static const struct pvr2_i2c_handler_functions msp3400_funcs = {
.detach = (void (*)(void *))pvr2_msp3400_detach,
.check = (int (*)(void *))msp3400_check,
.update = (void (*)(void *))msp3400_update,
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
index 3103c808c..a7684d9d3 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-context.c
@@ -27,6 +27,7 @@
#include <linux/string.h>
#include <linux/slab.h>
#include <asm/semaphore.h>
+#include "compat.h"
static void pvr2_context_destroy(struct pvr2_context *mp)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-context.h b/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
index 69c1f3a92..0a05ea692 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-context.h
@@ -20,7 +20,6 @@
#ifndef __PVRUSB2_BASE_H
#define __PVRUSB2_BASE_H
-#include "compat.h"
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
#include <linux/mutex.h>
#else
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
index f44048186..c7041921a 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.c
@@ -39,6 +39,7 @@
#include <media/v4l2-common.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include "compat.h"
struct pvr2_v4l_cx2584x {
struct pvr2_i2c_handler handler;
@@ -212,7 +213,7 @@ static void decoder_reset(struct pvr2_v4l_cx2584x *ctxt)
}
-const static struct pvr2_i2c_handler_functions hfuncs = {
+static const struct pvr2_i2c_handler_functions hfuncs = {
.detach = (void (*)(void *))decoder_detach,
.check = (int (*)(void *))decoder_check,
.update = (void (*)(void *))decoder_update,
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h
index 5dea8d7b3..54b2844e7 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-cx2584x-v4l.h
@@ -33,7 +33,6 @@
*/
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c b/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c
index fb0a9ca67..a7424f847 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-encoder.c
@@ -20,7 +20,6 @@
*
*/
-#include "compat.h"
#include <linux/device.h> // for linux/firmware.h
#include <linux/firmware.h>
#include "pvrusb2-util.h"
@@ -28,6 +27,7 @@
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
#include "pvrusb2-fx2-cmd.h"
+#include "compat.h"
@@ -357,7 +357,7 @@ static int pvr2_encoder_vcmd(struct pvr2_hdw *hdw, int cmd,
/* This implements some extra setup for the encoder that seems to be
specific to the PVR USB2 hardware. */
-int pvr2_encoder_prep_config(struct pvr2_hdw *hdw)
+static int pvr2_encoder_prep_config(struct pvr2_hdw *hdw)
{
int ret = 0;
int encMisc3Arg = 0;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index 47b1365d7..db0b02f0f 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -33,7 +33,6 @@
*/
-#include "compat.h"
#include <linux/videodev2.h>
#include <linux/i2c.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
index d80136377..1f7586078 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-hdw.c
@@ -19,7 +19,6 @@
*
*/
-#include "compat.h"
#include <linux/errno.h>
#include <linux/string.h>
#include <linux/slab.h>
@@ -38,6 +37,7 @@
#include "pvrusb2-encoder.h"
#include "pvrusb2-debug.h"
#include "pvrusb2-fx2-cmd.h"
+#include "compat.h"
#define TV_MIN_FREQ 55250000L
#define TV_MAX_FREQ 850000000L
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
index 40200c79f..4b0ded374 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-chips-v4l2.c
@@ -19,7 +19,6 @@
*
*/
-#include "compat.h"
#include <linux/kernel.h>
#include "pvrusb2-i2c-core.h"
#include "pvrusb2-hdw-internal.h"
@@ -30,6 +29,7 @@
#include "pvrusb2-video-v4l.h"
#include "pvrusb2-cx2584x-v4l.h"
#include "pvrusb2-wm8775.h"
+#include "compat.h"
#define trace_i2c(...) pvr2_trace(PVR2_TRACE_I2C,__VA_ARGS__)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
index c650e02cc..7ce929be8 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.c
@@ -25,6 +25,7 @@
#include "pvrusb2-debug.h"
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
+#include "compat.h"
static void set_standard(struct pvr2_hdw *hdw)
{
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h
index 6c2379fc5..c838df616 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-cmd-v4l2.h
@@ -23,7 +23,6 @@
#ifndef __PVRUSB2_CMD_V4L2_H
#define __PVRUSB2_CMD_V4L2_H
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
extern const struct pvr2_i2c_op pvr2_i2c_op_v4l2_standard;
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
index 215fbf473..22a02dd76 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-i2c-core.c
@@ -19,11 +19,11 @@
*
*/
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
#include "pvrusb2-hdw-internal.h"
#include "pvrusb2-debug.h"
#include "pvrusb2-fx2-cmd.h"
+#include "compat.h"
#define trace_i2c(...) pvr2_trace(PVR2_TRACE_I2C,__VA_ARGS__)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
index ef7293bf1..7b3be67f5 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-io.c
@@ -19,7 +19,6 @@
*
*/
-#include "compat.h"
#include "pvrusb2-io.h"
#include "pvrusb2-debug.h"
#include <linux/errno.h>
@@ -30,6 +29,7 @@
#else
#include <asm/semaphore.h>
#endif
+#include "compat.h"
static const char *pvr2_buffer_state_decode(enum pvr2_buffer_state);
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c b/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
index c42eef3c2..aef12fecb 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-ioread.c
@@ -19,7 +19,6 @@
*
*/
-#include "compat.h"
#include "pvrusb2-ioread.h"
#include "pvrusb2-debug.h"
#include <linux/errno.h>
@@ -31,6 +30,7 @@
#include <asm/semaphore.h>
#endif
#include <asm/uaccess.h>
+#include "compat.h"
#define BUFFER_COUNT 32
#define BUFFER_SIZE PAGE_ALIGN(0x4000)
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
index 1abbaf3cc..ccf5a1ac0 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-main.c
@@ -20,7 +20,6 @@
*
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/slab.h>
@@ -37,6 +36,7 @@
#ifdef CONFIG_VIDEO_PVRUSB2_SYSFS
#include "pvrusb2-sysfs.h"
#endif /* CONFIG_VIDEO_PVRUSB2_SYSFS */
+#include "compat.h"
#define DRIVER_AUTHOR "Mike Isely <isely@pobox.com>"
#define DRIVER_DESC "Hauppauge WinTV-PVR-USB2 MPEG2 Encoder/Tuner"
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-std.c b/linux/drivers/media/video/pvrusb2/pvrusb2-std.c
index 4de535498..926b6bfca 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-std.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-std.c
@@ -23,6 +23,7 @@
#include "pvrusb2-debug.h"
#include <asm/string.h>
#include <linux/slab.h>
+#include "compat.h"
struct std_name {
const char *name;
@@ -78,14 +79,14 @@ struct std_name {
#define CSTD_ALL (CSTD_PAL|CSTD_NTSC|CSTD_SECAM)
/* Mapping of standard bits to color system */
-const static struct std_name std_groups[] = {
+static const struct std_name std_groups[] = {
{"PAL",CSTD_PAL},
{"NTSC",CSTD_NTSC},
{"SECAM",CSTD_SECAM},
};
/* Mapping of standard bits to modulation system */
-const static struct std_name std_items[] = {
+static const struct std_name std_items[] = {
{"B",TSTD_B},
{"B1",TSTD_B1},
{"D",TSTD_D},
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-std.h b/linux/drivers/media/video/pvrusb2/pvrusb2-std.h
index dc9ef5bb3..07c399375 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-std.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-std.h
@@ -21,7 +21,6 @@
#ifndef __PVRUSB2_STD_H
#define __PVRUSB2_STD_H
-#include "compat.h"
#include <linux/videodev2.h>
// Convert string describing one or more video standards into a mask of V4L
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-tuner.c b/linux/drivers/media/video/pvrusb2/pvrusb2-tuner.c
index e234cd3c9..c65dbe727 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-tuner.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-tuner.c
@@ -81,7 +81,7 @@ static unsigned int pvr2_tuner_describe(struct pvr2_tuner_handler *ctxt,char *bu
}
-const static struct pvr2_i2c_handler_functions tuner_funcs = {
+static const struct pvr2_i2c_handler_functions tuner_funcs = {
.detach = (void (*)(void *))pvr2_tuner_detach,
.check = (int (*)(void *))tuner_check,
.update = (void (*)(void *))tuner_update,
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
index 165c00f44..992269abd 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-v4l2.c
@@ -20,7 +20,6 @@
*
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/version.h>
#include "pvrusb2-context.h"
@@ -32,6 +31,7 @@
#include <linux/videodev2.h>
#include <media/v4l2-dev.h>
#include <media/v4l2-common.h>
+#include "compat.h"
struct pvr2_v4l2_dev;
struct pvr2_v4l2_fh;
@@ -1109,7 +1109,7 @@ static unsigned int pvr2_v4l2_poll(struct file *file, poll_table *wait)
}
-static struct file_operations vdev_fops = {
+static const struct file_operations vdev_fops = {
.owner = THIS_MODULE,
.open = pvr2_v4l2_open,
.release = pvr2_v4l2_release,
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
index df042509a..b063110de 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.c
@@ -39,6 +39,7 @@
#include <media/saa7115.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include "compat.h"
struct pvr2_v4l_decoder {
struct pvr2_i2c_handler handler;
@@ -189,7 +190,7 @@ static unsigned int decoder_describe(struct pvr2_v4l_decoder *ctxt,char *buf,uns
}
-const static struct pvr2_i2c_handler_functions hfuncs = {
+static const struct pvr2_i2c_handler_functions hfuncs = {
.detach = (void (*)(void *))decoder_detach,
.check = (int (*)(void *))decoder_check,
.update = (void (*)(void *))decoder_update,
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h
index 1c0c98efb..2b917fda0 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-video-v4l.h
@@ -32,7 +32,6 @@
*/
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
index 7890b45d2..d578f2491 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.c
@@ -37,6 +37,7 @@
#include <media/v4l2-common.h>
#include <linux/errno.h>
#include <linux/slab.h>
+#include "compat.h"
struct pvr2_v4l_wm8775 {
struct pvr2_i2c_handler handler;
@@ -130,7 +131,7 @@ static void wm8775_update(struct pvr2_v4l_wm8775 *ctxt)
}
-const static struct pvr2_i2c_handler_functions hfuncs = {
+static const struct pvr2_i2c_handler_functions hfuncs = {
.detach = (void (*)(void *))wm8775_detach,
.check = (int (*)(void *))wm8775_check,
.update = (void (*)(void *))wm8775_update,
diff --git a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h
index 15ee1e215..8aaeff4e1 100644
--- a/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h
+++ b/linux/drivers/media/video/pvrusb2/pvrusb2-wm8775.h
@@ -33,7 +33,6 @@
*/
-#include "compat.h"
#include "pvrusb2-i2c-core.h"
diff --git a/linux/drivers/media/video/pwc/pwc-if.c b/linux/drivers/media/video/pwc/pwc-if.c
index 444148f02..782699cf9 100644
--- a/linux/drivers/media/video/pwc/pwc-if.c
+++ b/linux/drivers/media/video/pwc/pwc-if.c
@@ -152,7 +152,7 @@ static int pwc_video_ioctl(struct inode *inode, struct file *file,
unsigned int ioctlnr, unsigned long arg);
static int pwc_video_mmap(struct file *file, struct vm_area_struct *vma);
-static struct file_operations pwc_fops = {
+static const struct file_operations pwc_fops = {
.owner = THIS_MODULE,
.open = pwc_video_open,
.release = pwc_video_close,
diff --git a/linux/drivers/media/video/saa5246a.c b/linux/drivers/media/video/saa5246a.c
index 752ab1651..d8091b18a 100644
--- a/linux/drivers/media/video/saa5246a.c
+++ b/linux/drivers/media/video/saa5246a.c
@@ -40,7 +40,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/mm.h>
#include <linux/init.h>
#include <linux/i2c.h>
@@ -827,7 +826,7 @@ static void __exit cleanup_saa_5246a (void)
module_init(init_saa_5246a);
module_exit(cleanup_saa_5246a);
-static struct file_operations saa_fops = {
+static const struct file_operations saa_fops = {
.owner = THIS_MODULE,
.open = saa5246a_open,
.release = saa5246a_release,
diff --git a/linux/drivers/media/video/saa5249.c b/linux/drivers/media/video/saa5249.c
index 040b521f0..77685ffd1 100644
--- a/linux/drivers/media/video/saa5249.c
+++ b/linux/drivers/media/video/saa5249.c
@@ -704,7 +704,7 @@ static void __exit cleanup_saa_5249 (void)
module_init(init_saa_5249);
module_exit(cleanup_saa_5249);
-static struct file_operations saa_fops = {
+static const struct file_operations saa_fops = {
.owner = THIS_MODULE,
.open = saa5249_open,
.release = saa5249_release,
diff --git a/linux/drivers/media/video/saa6588.c b/linux/drivers/media/video/saa6588.c
index ff6f29eac..f6840efa9 100644
--- a/linux/drivers/media/video/saa6588.c
+++ b/linux/drivers/media/video/saa6588.c
@@ -18,7 +18,6 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/kernel.h>
@@ -37,6 +36,7 @@
#endif
#include <media/rds.h>
+#include "compat.h"
/* Addresses to scan */
static unsigned short normal_i2c[] = {
diff --git a/linux/drivers/media/video/saa7111.c b/linux/drivers/media/video/saa7111.c
index 1fbd343c3..f6f408e2a 100644
--- a/linux/drivers/media/video/saa7111.c
+++ b/linux/drivers/media/video/saa7111.c
@@ -41,7 +41,6 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/page.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include "compat.h"
diff --git a/linux/drivers/media/video/saa7114.c b/linux/drivers/media/video/saa7114.c
index 45242ad54..3fc451ea8 100644
--- a/linux/drivers/media/video/saa7114.c
+++ b/linux/drivers/media/video/saa7114.c
@@ -44,7 +44,6 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/page.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include "compat.h"
diff --git a/linux/drivers/media/video/saa7115.c b/linux/drivers/media/video/saa7115.c
index 6163a68e3..d868920de 100644
--- a/linux/drivers/media/video/saa7115.c
+++ b/linux/drivers/media/video/saa7115.c
@@ -37,7 +37,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include "saa711x_regs.h"
#include <linux/kernel.h>
@@ -51,6 +50,7 @@
#include "i2c-compat.h"
#endif
#include <asm/div64.h>
+#include "compat.h"
#define VRES_60HZ (480+16)
diff --git a/linux/drivers/media/video/saa711x.c b/linux/drivers/media/video/saa711x.c
index 59425506e..0d23c3693 100644
--- a/linux/drivers/media/video/saa711x.c
+++ b/linux/drivers/media/video/saa711x.c
@@ -35,7 +35,6 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/page.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include <asm/uaccess.h>
#include "compat.h"
diff --git a/linux/drivers/media/video/saa7127.c b/linux/drivers/media/video/saa7127.c
index e1e697579..89a889591 100644
--- a/linux/drivers/media/video/saa7127.c
+++ b/linux/drivers/media/video/saa7127.c
@@ -47,7 +47,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/module.h>
@@ -59,6 +58,7 @@
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
#include "i2c-compat.h"
#endif
+#include "compat.h"
static int debug = 0;
static int test_image = 0;
@@ -562,12 +562,12 @@ static int saa7127_command(struct i2c_client *client,
struct v4l2_routing *route = arg;
switch (cmd) {
- case VIDIOC_S_STD:
+ case VIDIOC_INT_S_STD_OUTPUT:
if (state->std == *(v4l2_std_id *)arg)
break;
return saa7127_set_std(client, *(v4l2_std_id *)arg);
- case VIDIOC_G_STD:
+ case VIDIOC_INT_G_STD_OUTPUT:
*(v4l2_std_id *)arg = state->std;
break;
diff --git a/linux/drivers/media/video/saa7134/saa6752hs.c b/linux/drivers/media/video/saa7134/saa6752hs.c
index f89e6d070..6a94c742d 100644
--- a/linux/drivers/media/video/saa7134/saa6752hs.c
+++ b/linux/drivers/media/video/saa7134/saa6752hs.c
@@ -1,6 +1,5 @@
#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
diff --git a/linux/drivers/media/video/saa7134/saa7134-alsa.c b/linux/drivers/media/video/saa7134/saa7134-alsa.c
index 1ff1c706d..6b8e0e1f0 100644
--- a/linux/drivers/media/video/saa7134/saa7134-alsa.c
+++ b/linux/drivers/media/video/saa7134/saa7134-alsa.c
@@ -16,7 +16,6 @@
*
*/
-#include "compat.h"
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
#include <linux/init.h>
#include <linux/slab.h>
@@ -31,6 +30,7 @@
#include <sound/pcm_params.h>
#include <sound/initval.h>
#include <linux/interrupt.h>
+#include "compat.h"
#include "saa7134.h"
#include "saa7134-reg.h"
diff --git a/linux/drivers/media/video/saa7134/saa7134-empress.c b/linux/drivers/media/video/saa7134/saa7134-empress.c
index 8c12c2cc2..dc4593fdd 100644
--- a/linux/drivers/media/video/saa7134/saa7134-empress.c
+++ b/linux/drivers/media/video/saa7134/saa7134-empress.c
@@ -329,7 +329,7 @@ static int ts_ioctl(struct inode *inode, struct file *file,
return video_usercopy(inode, file, cmd, arg, ts_do_ioctl);
}
-static struct file_operations ts_fops =
+static const struct file_operations ts_fops =
{
.owner = THIS_MODULE,
.open = ts_open,
diff --git a/linux/drivers/media/video/saa7134/saa7134-input.c b/linux/drivers/media/video/saa7134/saa7134-input.c
index cb99a2a18..24d3f5088 100644
--- a/linux/drivers/media/video/saa7134/saa7134-input.c
+++ b/linux/drivers/media/video/saa7134/saa7134-input.c
@@ -22,7 +22,6 @@
#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/delay.h>
-#include <linux/sched.h>
#include <linux/interrupt.h>
#include <linux/input.h>
diff --git a/linux/drivers/media/video/saa7134/saa7134-oss.c b/linux/drivers/media/video/saa7134/saa7134-oss.c
index f8cc49af6..5ab6dc70c 100644
--- a/linux/drivers/media/video/saa7134/saa7134-oss.c
+++ b/linux/drivers/media/video/saa7134/saa7134-oss.c
@@ -581,7 +581,7 @@ static unsigned int dsp_poll(struct file *file, struct poll_table_struct *wait)
return mask;
}
-struct file_operations saa7134_dsp_fops = {
+const struct file_operations saa7134_dsp_fops = {
.owner = THIS_MODULE,
.open = dsp_open,
.release = dsp_release,
@@ -822,7 +822,7 @@ static int mixer_ioctl(struct inode *inode, struct file *file,
}
}
-struct file_operations saa7134_mixer_fops = {
+const struct file_operations saa7134_mixer_fops = {
.owner = THIS_MODULE,
.open = mixer_open,
.release = mixer_release,
diff --git a/linux/drivers/media/video/saa7134/saa7134-video.c b/linux/drivers/media/video/saa7134/saa7134-video.c
index 8f456a439..a2978ea4b 100644
--- a/linux/drivers/media/video/saa7134/saa7134-video.c
+++ b/linux/drivers/media/video/saa7134/saa7134-video.c
@@ -2344,7 +2344,7 @@ static int radio_ioctl(struct inode *inode, struct file *file,
return video_usercopy(inode, file, cmd, arg, radio_do_ioctl);
}
-static struct file_operations video_fops =
+static const struct file_operations video_fops =
{
.owner = THIS_MODULE,
.open = video_open,
@@ -2359,7 +2359,7 @@ static struct file_operations video_fops =
.llseek = no_llseek,
};
-static struct file_operations radio_fops =
+static const struct file_operations radio_fops =
{
.owner = THIS_MODULE,
.open = video_open,
diff --git a/linux/drivers/media/video/saa7134/saa7134.h b/linux/drivers/media/video/saa7134/saa7134.h
index 6ca439741..a4c8bb5aa 100644
--- a/linux/drivers/media/video/saa7134/saa7134.h
+++ b/linux/drivers/media/video/saa7134/saa7134.h
@@ -691,8 +691,8 @@ int saa_dsp_writel(struct saa7134_dev *dev, int reg, u32 value);
/* ----------------------------------------------------------- */
/* saa7134-oss.c */
-extern struct file_operations saa7134_dsp_fops;
-extern struct file_operations saa7134_mixer_fops;
+extern const struct file_operations saa7134_dsp_fops;
+extern const struct file_operations saa7134_mixer_fops;
int saa7134_oss_init1(struct saa7134_dev *dev);
int saa7134_oss_fini(struct saa7134_dev *dev);
diff --git a/linux/drivers/media/video/saa7185.c b/linux/drivers/media/video/saa7185.c
index a9b45c25a..f29e27b5b 100644
--- a/linux/drivers/media/video/saa7185.c
+++ b/linux/drivers/media/video/saa7185.c
@@ -38,7 +38,6 @@
#include <asm/io.h>
#include <asm/pgtable.h>
#include <asm/page.h>
-#include <linux/sched.h>
#include <linux/types.h>
#include "compat.h"
diff --git a/linux/drivers/media/video/saa7191.c b/linux/drivers/media/video/saa7191.c
index 746cadb8f..183d15686 100644
--- a/linux/drivers/media/video/saa7191.c
+++ b/linux/drivers/media/video/saa7191.c
@@ -17,12 +17,12 @@
#include <linux/major.h>
#include <linux/module.h>
#include <linux/mm.h>
-#include <linux/sched.h>
#include <linux/slab.h>
#include <linux/videodev.h>
#include <linux/video_decoder.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "saa7191.h"
diff --git a/linux/drivers/media/video/se401.c b/linux/drivers/media/video/se401.c
index 4d10fe563..eecb4002e 100644
--- a/linux/drivers/media/video/se401.c
+++ b/linux/drivers/media/video/se401.c
@@ -1193,7 +1193,7 @@ static int se401_mmap(struct file *file, struct vm_area_struct *vma)
return 0;
}
-static struct file_operations se401_fops = {
+static const struct file_operations se401_fops = {
.owner = THIS_MODULE,
.open = se401_open,
.release = se401_close,
diff --git a/linux/drivers/media/video/sn9c102/sn9c102_core.c b/linux/drivers/media/video/sn9c102/sn9c102_core.c
index ef431d942..a02d43ece 100644
--- a/linux/drivers/media/video/sn9c102/sn9c102_core.c
+++ b/linux/drivers/media/video/sn9c102/sn9c102_core.c
@@ -2025,13 +2025,7 @@ static int sn9c102_mmap(struct file* filp, struct vm_area_struct *vma)
pos = cam->frame[i].bufmem;
while (size > 0) { /* size is page-aligned */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
- unsigned long page = vmalloc_to_pfn(pos);
- if (remap_pfn_range(vma, start, page, PAGE_SIZE,
- vma->vm_page_prot)) {
-#else
if (vm_insert_page(vma, start, vmalloc_to_page(pos))) {
-#endif
mutex_unlock(&cam->fileop_mutex);
return -EAGAIN;
}
@@ -3131,7 +3125,7 @@ static int sn9c102_ioctl(struct inode* inode, struct file* filp,
/*****************************************************************************/
-static struct file_operations sn9c102_fops = {
+static const struct file_operations sn9c102_fops = {
.owner = THIS_MODULE,
.open = sn9c102_open,
.release = sn9c102_release,
diff --git a/linux/drivers/media/video/stradis.c b/linux/drivers/media/video/stradis.c
index a11f1cbf9..53256ea47 100644
--- a/linux/drivers/media/video/stradis.c
+++ b/linux/drivers/media/video/stradis.c
@@ -1906,7 +1906,7 @@ static int saa_release(struct inode *inode, struct file *file)
return 0;
}
-static struct file_operations saa_fops = {
+static const struct file_operations saa_fops = {
.owner = THIS_MODULE,
.open = saa_open,
.release = saa_release,
diff --git a/linux/drivers/media/video/stv680.c b/linux/drivers/media/video/stv680.c
index 5dfa8eadb..7b7783045 100644
--- a/linux/drivers/media/video/stv680.c
+++ b/linux/drivers/media/video/stv680.c
@@ -1387,7 +1387,7 @@ static ssize_t stv680_read (struct file *file, char __user *buf,
return realcount;
} /* stv680_read */
-static struct file_operations stv680_fops = {
+static const struct file_operations stv680_fops = {
.owner = THIS_MODULE,
.open = stv_open,
.release = stv_close,
diff --git a/linux/drivers/media/video/tda7432.c b/linux/drivers/media/video/tda7432.c
index 78a56f7ef..849309fff 100644
--- a/linux/drivers/media/video/tda7432.c
+++ b/linux/drivers/media/video/tda7432.c
@@ -38,7 +38,6 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
diff --git a/linux/drivers/media/video/tda9840.c b/linux/drivers/media/video/tda9840.c
index cc6de147c..d74b68ae3 100644
--- a/linux/drivers/media/video/tda9840.c
+++ b/linux/drivers/media/video/tda9840.c
@@ -24,11 +24,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "tda9840.h"
diff --git a/linux/drivers/media/video/tda9875.c b/linux/drivers/media/video/tda9875.c
index 279f1ecd7..c7fbfc1b3 100644
--- a/linux/drivers/media/video/tda9875.c
+++ b/linux/drivers/media/video/tda9875.c
@@ -19,7 +19,6 @@
#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
diff --git a/linux/drivers/media/video/tea6415c.c b/linux/drivers/media/video/tea6415c.c
index 4e6038324..03716e2c9 100644
--- a/linux/drivers/media/video/tea6415c.c
+++ b/linux/drivers/media/video/tea6415c.c
@@ -26,11 +26,11 @@
Foundation, Inc., 675 Mvss Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "tea6415c.h"
diff --git a/linux/drivers/media/video/tea6420.c b/linux/drivers/media/video/tea6420.c
index 9896661da..d8611e213 100644
--- a/linux/drivers/media/video/tea6420.c
+++ b/linux/drivers/media/video/tea6420.c
@@ -26,11 +26,11 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/ioctl.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "tea6420.h"
diff --git a/linux/drivers/media/video/tlv320aic23b.c b/linux/drivers/media/video/tlv320aic23b.c
index 4721d6f93..ee10fbeaa 100644
--- a/linux/drivers/media/video/tlv320aic23b.c
+++ b/linux/drivers/media/video/tlv320aic23b.c
@@ -23,7 +23,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
#include <linux/ioctl.h>
@@ -36,6 +35,7 @@
#include "i2c-compat.h"
#include <linux/slab.h>
#endif
+#include "compat.h"
MODULE_DESCRIPTION("tlv320aic23b driver");
MODULE_AUTHOR("Scott Alfter, Ulf Eklund, Hans Verkuil");
diff --git a/linux/drivers/media/video/tuner-core.c b/linux/drivers/media/video/tuner-core.c
index a42204b02..a22a1eb02 100644
--- a/linux/drivers/media/video/tuner-core.c
+++ b/linux/drivers/media/video/tuner-core.c
@@ -7,7 +7,6 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
diff --git a/linux/drivers/media/video/tuner-types.c b/linux/drivers/media/video/tuner-types.c
index 512b39cb9..22b159d44 100644
--- a/linux/drivers/media/video/tuner-types.c
+++ b/linux/drivers/media/video/tuner-types.c
@@ -4,10 +4,10 @@
*
*/
-#include "compat.h"
#include <linux/i2c.h>
#include <media/tuner.h>
#include <media/tuner-types.h>
+#include "compat.h"
/* ---------------------------------------------------------------------- */
diff --git a/linux/drivers/media/video/tveeprom.c b/linux/drivers/media/video/tveeprom.c
index 4b3ee1fcb..43017a006 100644
--- a/linux/drivers/media/video/tveeprom.c
+++ b/linux/drivers/media/video/tveeprom.c
@@ -28,7 +28,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -46,6 +45,7 @@
#include <media/tveeprom.h>
#include <media/v4l2-common.h>
#include <media/audiochip.h>
+#include "compat.h"
MODULE_DESCRIPTION("i2c Hauppauge eeprom decoder driver");
MODULE_AUTHOR("John Klar");
diff --git a/linux/drivers/media/video/tvmixer.c b/linux/drivers/media/video/tvmixer.c
index 4e87f5d3b..3d5a5512f 100644
--- a/linux/drivers/media/video/tvmixer.c
+++ b/linux/drivers/media/video/tvmixer.c
@@ -4,7 +4,6 @@
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/string.h>
#include <linux/timer.h>
#include <linux/delay.h>
@@ -259,7 +258,7 @@ static struct i2c_driver driver = {
.detach_client = tvmixer_clients,
};
-static struct file_operations tvmixer_fops = {
+static const struct file_operations tvmixer_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.ioctl = tvmixer_ioctl,
diff --git a/linux/drivers/media/video/upd64031a.c b/linux/drivers/media/video/upd64031a.c
index ae0a843ff..f73cb2c81 100644
--- a/linux/drivers/media/video/upd64031a.c
+++ b/linux/drivers/media/video/upd64031a.c
@@ -20,7 +20,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/version.h>
#include <linux/module.h>
@@ -29,6 +28,7 @@
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/upd64031a.h>
+#include "compat.h"
// --------------------- read registers functions define -----------------------
diff --git a/linux/drivers/media/video/upd64083.c b/linux/drivers/media/video/upd64083.c
index 61be85abd..1fdde6e06 100644
--- a/linux/drivers/media/video/upd64083.c
+++ b/linux/drivers/media/video/upd64083.c
@@ -20,7 +20,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-#include "compat.h"
#include <linux/version.h>
#include <linux/module.h>
#include <linux/kernel.h>
@@ -28,6 +27,7 @@
#include <linux/videodev2.h>
#include <media/v4l2-common.h>
#include <media/upd64083.h>
+#include "compat.h"
MODULE_DESCRIPTION("uPD64083 driver");
MODULE_AUTHOR("T. Adachi, Takeru KOMORIYA, Hans Verkuil");
diff --git a/linux/drivers/media/video/usbvideo/ibmcam.c b/linux/drivers/media/video/usbvideo/ibmcam.c
index c5c444692..cb907a45c 100644
--- a/linux/drivers/media/video/usbvideo/ibmcam.c
+++ b/linux/drivers/media/video/usbvideo/ibmcam.c
@@ -15,7 +15,6 @@
*/
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/module.h>
#include <linux/init.h>
diff --git a/linux/drivers/media/video/usbvideo/konicawc.c b/linux/drivers/media/video/usbvideo/konicawc.c
index 5ab17aaab..8ca93f248 100644
--- a/linux/drivers/media/video/usbvideo/konicawc.c
+++ b/linux/drivers/media/video/usbvideo/konicawc.c
@@ -15,15 +15,16 @@
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/init.h>
-#include "compat.h"
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
-#include <linux/input.h>
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
+#include <linux/usb/input.h>
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
#include <linux/usb_input.h>
#else
-#include <linux/usb/input.h>
+#include <linux/input.h>
#endif
#include "usbvideo.h"
+#include "compat.h"
#define MAX_BRIGHTNESS 108
#define MAX_CONTRAST 108
@@ -242,7 +243,11 @@ static void konicawc_register_input(struct konicawc *cam, struct usb_device *dev
input_dev->name = "Konicawc snapshot button";
input_dev->phys = cam->input_physname;
usb_to_input_id(dev, &input_dev->id);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &dev->dev;
+#else
+ input_dev->dev = &dev->dev;
+#endif
input_dev->evbit[0] = BIT(EV_KEY);
input_dev->keybit[LONG(BTN_0)] = BIT(BTN_0);
diff --git a/linux/drivers/media/video/usbvideo/quickcam_messenger.c b/linux/drivers/media/video/usbvideo/quickcam_messenger.c
index 614c821ed..849f94bab 100644
--- a/linux/drivers/media/video/usbvideo/quickcam_messenger.c
+++ b/linux/drivers/media/video/usbvideo/quickcam_messenger.c
@@ -33,15 +33,15 @@
#include <linux/module.h>
#include <linux/init.h>
#include <linux/input.h>
-#include "compat.h"
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,18)
-#include <linux/usb_input.h>
-#else
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,18)
#include <linux/usb/input.h>
+#elif LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
+#include <linux/usb_input.h>
#endif
#include "usbvideo.h"
#include "quickcam_messenger.h"
+#include "compat.h"
/*
* Version Information
@@ -105,7 +105,11 @@ static void qcm_register_input(struct qcm *cam, struct usb_device *dev)
input_dev->name = "QCM button";
input_dev->phys = cam->input_physname;
usb_to_input_id(dev, &input_dev->id);
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,15)
input_dev->cdev.dev = &dev->dev;
+#else
+ input_dev->dev = &dev->dev;
+#endif
input_dev->evbit[0] = BIT(EV_KEY);
input_dev->keybit[LONG(BTN_0)] = BIT(BTN_0);
diff --git a/linux/drivers/media/video/usbvideo/ultracam.c b/linux/drivers/media/video/usbvideo/ultracam.c
index 344f6cca9..9128efa71 100644
--- a/linux/drivers/media/video/usbvideo/ultracam.c
+++ b/linux/drivers/media/video/usbvideo/ultracam.c
@@ -6,7 +6,6 @@
*/
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/module.h>
#include <linux/init.h>
diff --git a/linux/drivers/media/video/usbvideo/usbvideo.c b/linux/drivers/media/video/usbvideo/usbvideo.c
index 829b2d539..bf3482f98 100644
--- a/linux/drivers/media/video/usbvideo/usbvideo.c
+++ b/linux/drivers/media/video/usbvideo/usbvideo.c
@@ -945,7 +945,7 @@ static int usbvideo_find_struct(struct usbvideo *cams)
return rv;
}
-static struct file_operations usbvideo_fops = {
+static const struct file_operations usbvideo_fops = {
.owner = THIS_MODULE,
.open = usbvideo_v4l_open,
.release =usbvideo_v4l_close,
diff --git a/linux/drivers/media/video/usbvideo/usbvideo.h b/linux/drivers/media/video/usbvideo/usbvideo.h
index aaafce2b5..c1f892825 100644
--- a/linux/drivers/media/video/usbvideo/usbvideo.h
+++ b/linux/drivers/media/video/usbvideo/usbvideo.h
@@ -16,13 +16,13 @@
#ifndef usbvideo_h
#define usbvideo_h
-#include "compat.h"
#include <linux/videodev.h>
#include <media/v4l2-common.h>
#include <linux/usb.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
#endif
+#include "compat.h"
/* Most helpful debugging aid */
#define assert(expr) ((void) ((expr) ? 0 : (err("assert failed at line %d",__LINE__))))
diff --git a/linux/drivers/media/video/usbvideo/vicam.c b/linux/drivers/media/video/usbvideo/vicam.c
index 951a636d4..6fb2c2633 100644
--- a/linux/drivers/media/video/usbvideo/vicam.c
+++ b/linux/drivers/media/video/usbvideo/vicam.c
@@ -1241,7 +1241,7 @@ static inline void vicam_create_proc_entry(struct vicam_camera *cam) { }
static inline void vicam_destroy_proc_entry(void *ptr) { }
#endif
-static struct file_operations vicam_fops = {
+static const struct file_operations vicam_fops = {
.owner = THIS_MODULE,
.open = vicam_open,
.release = vicam_close,
diff --git a/linux/drivers/media/video/usbvision/usbvision-core.c b/linux/drivers/media/video/usbvision/usbvision-core.c
index 54b9ce08e..2d8dc023d 100644
--- a/linux/drivers/media/video/usbvision/usbvision-core.c
+++ b/linux/drivers/media/video/usbvision/usbvision-core.c
@@ -24,7 +24,6 @@
*/
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/slab.h>
diff --git a/linux/drivers/media/video/usbvision/usbvision-i2c.c b/linux/drivers/media/video/usbvision/usbvision-i2c.c
index 30cb93a70..e942b1bf2 100644
--- a/linux/drivers/media/video/usbvision/usbvision-i2c.c
+++ b/linux/drivers/media/video/usbvision/usbvision-i2c.c
@@ -36,9 +36,9 @@
#include <asm/uaccess.h>
#include <linux/ioport.h>
#include <linux/errno.h>
-#include <linux/sched.h>
#include <linux/usb.h>
#include <linux/i2c.h>
+#include "compat.h"
#include "usbvision.h"
#define DBG_I2C 1<<0
@@ -281,6 +281,7 @@ int usbvision_init_i2c(struct usb_usbvision *usbvision)
sprintf(usbvision->i2c_adap.name + strlen(usbvision->i2c_adap.name),
" #%d", usbvision->vdev->minor & 0x1f);
PDEBUG(DBG_I2C,"Adaptername: %s", usbvision->i2c_adap.name);
+ usbvision->i2c_adap.dev.parent = &usbvision->dev->dev;
i2c_set_adapdata(&usbvision->i2c_adap, usbvision);
i2c_set_clientdata(&usbvision->i2c_client, usbvision);
diff --git a/linux/drivers/media/video/usbvision/usbvision-video.c b/linux/drivers/media/video/usbvision/usbvision-video.c
index 1d0d61469..a1e6b2594 100644
--- a/linux/drivers/media/video/usbvision/usbvision-video.c
+++ b/linux/drivers/media/video/usbvision/usbvision-video.c
@@ -46,7 +46,6 @@
#include <linux/version.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/list.h>
#include <linux/timer.h>
#include <linux/slab.h>
@@ -1255,21 +1254,11 @@ static int usbvision_v4l2_mmap(struct file *file, struct vm_area_struct *vma)
pos = usbvision->frame[i].data;
while (size > 0) {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15)
- unsigned long page = vmalloc_to_pfn(pos);
- if (remap_pfn_range(vma, start, page, PAGE_SIZE,
- vma->vm_page_prot)) {
- PDEBUG(DBG_MMAP, "mmap: rename page map failed");
- up(&usbvision->lock);
- return -EAGAIN;
- }
-#else
if (vm_insert_page(vma, start, vmalloc_to_page(pos))) {
PDEBUG(DBG_MMAP, "mmap: vm_insert_page failed");
up(&usbvision->lock);
return -EAGAIN;
}
-#endif
start += PAGE_SIZE;
pos += PAGE_SIZE;
size -= PAGE_SIZE;
@@ -1599,7 +1588,7 @@ static struct video_device usbvision_video_template = {
.minor = -1,
};
#else
-static struct file_operations usbvision_fops = {
+static const struct file_operations usbvision_fops = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31)
.owner = THIS_MODULE,
#endif
@@ -1640,7 +1629,7 @@ static struct video_device usbvision_radio_template=
minor: -1,
};
#else
-static struct file_operations usbvision_radio_fops = {
+static const struct file_operations usbvision_radio_fops = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31)
.owner = THIS_MODULE,
#endif
@@ -1679,7 +1668,7 @@ static struct video_device usbvision_vbi_template=
minor: -1,
};
#else
-static struct file_operations usbvision_vbi_fops = {
+static const struct file_operations usbvision_vbi_fops = {
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31)
.owner = THIS_MODULE,
#endif
diff --git a/linux/drivers/media/video/v4l1-compat.c b/linux/drivers/media/video/v4l1-compat.c
index 02c5a2f58..2e42ee3a2 100644
--- a/linux/drivers/media/video/v4l1-compat.c
+++ b/linux/drivers/media/video/v4l1-compat.c
@@ -17,7 +17,6 @@
*/
-#include "compat.h"
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -41,6 +40,7 @@
#ifdef CONFIG_KMOD
#include <linux/kmod.h>
#endif
+#include "compat.h"
static unsigned int debug = 0;
module_param(debug, int, 0644);
diff --git a/linux/drivers/media/video/v4l2-common.c b/linux/drivers/media/video/v4l2-common.c
index f31a1bb61..61cf41995 100644
--- a/linux/drivers/media/video/v4l2-common.c
+++ b/linux/drivers/media/video/v4l2-common.c
@@ -44,11 +44,9 @@
* Added Gerd Knorrs v4l1 enhancements (Justin Schoeman)
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/mm.h>
#include <linux/string.h>
@@ -75,6 +73,7 @@
#endif
#include <linux/videodev.h>
+#include "compat.h"
MODULE_AUTHOR("Bill Dirks, Justin Schoeman, Gerd Knorr");
MODULE_DESCRIPTION("misc helper functions for v4l2 device drivers");
@@ -278,6 +277,8 @@ char *v4l2_field_names[] = {
[V4L2_FIELD_SEQ_TB] = "seq-tb",
[V4L2_FIELD_SEQ_BT] = "seq-bt",
[V4L2_FIELD_ALTERNATE] = "alternate",
+ [V4L2_FIELD_INTERLACED_TB] = "interlaced-tb",
+ [V4L2_FIELD_INTERLACED_BT] = "interlaced-bt",
};
char *v4l2_type_names[] = {
@@ -287,7 +288,8 @@ char *v4l2_type_names[] = {
[V4L2_BUF_TYPE_VBI_CAPTURE] = "vbi-cap",
[V4L2_BUF_TYPE_VBI_OUTPUT] = "vbi-out",
[V4L2_BUF_TYPE_SLICED_VBI_CAPTURE] = "sliced-vbi-cap",
- [V4L2_BUF_TYPE_SLICED_VBI_OUTPUT] = "slicec-vbi-out",
+ [V4L2_BUF_TYPE_SLICED_VBI_OUTPUT] = "sliced-vbi-out",
+ [V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY] = "video-out-over",
};
#if 0
@@ -393,13 +395,18 @@ static const char *v4l2_ioctls[] = {
[_IOC_NR(VIDIOC_ENUMAUDOUT)] = "VIDIOC_ENUMAUDOUT",
[_IOC_NR(VIDIOC_G_PRIORITY)] = "VIDIOC_G_PRIORITY",
[_IOC_NR(VIDIOC_S_PRIORITY)] = "VIDIOC_S_PRIORITY",
-#if 1 /*KEEP*/
[_IOC_NR(VIDIOC_G_SLICED_VBI_CAP)] = "VIDIOC_G_SLICED_VBI_CAP",
-#endif
[_IOC_NR(VIDIOC_LOG_STATUS)] = "VIDIOC_LOG_STATUS",
[_IOC_NR(VIDIOC_G_EXT_CTRLS)] = "VIDIOC_G_EXT_CTRLS",
[_IOC_NR(VIDIOC_S_EXT_CTRLS)] = "VIDIOC_S_EXT_CTRLS",
- [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS"
+ [_IOC_NR(VIDIOC_TRY_EXT_CTRLS)] = "VIDIOC_TRY_EXT_CTRLS",
+#if 1 /*KEEP*/
+ [_IOC_NR(VIDIOC_ENUM_FRAMESIZES)] = "VIDIOC_ENUM_FRAMESIZES",
+ [_IOC_NR(VIDIOC_ENUM_FRAMEINTERVALS)] = "VIDIOC_ENUM_FRAMEINTERVALS",
+ [_IOC_NR(VIDIOC_G_ENC_INDEX)] = "VIDIOC_G_ENC_INDEX",
+ [_IOC_NR(VIDIOC_ENCODER_CMD)] = "VIDIOC_ENCODER_CMD",
+ [_IOC_NR(VIDIOC_TRY_ENCODER_CMD)] = "VIDIOC_TRY_ENCODER_CMD"
+#endif
};
#define V4L2_IOCTLS ARRAY_SIZE(v4l2_ioctls)
@@ -439,7 +446,10 @@ static const char *v4l2_int_ioctls[] = {
[_IOC_NR(VIDIOC_INT_G_AUDIO_ROUTING)] = "VIDIOC_INT_G_AUDIO_ROUTING",
[_IOC_NR(VIDIOC_INT_S_VIDEO_ROUTING)] = "VIDIOC_INT_S_VIDEO_ROUTING",
[_IOC_NR(VIDIOC_INT_G_VIDEO_ROUTING)] = "VIDIOC_INT_G_VIDEO_ROUTING",
- [_IOC_NR(VIDIOC_INT_S_CRYSTAL_FREQ)] = "VIDIOC_INT_S_CRYSTAL_FREQ"
+ [_IOC_NR(VIDIOC_INT_S_CRYSTAL_FREQ)] = "VIDIOC_INT_S_CRYSTAL_FREQ",
+ [_IOC_NR(VIDIOC_INT_INIT)] = "VIDIOC_INT_INIT",
+ [_IOC_NR(VIDIOC_INT_G_STD_OUTPUT)] = "VIDIOC_INT_G_STD_OUTPUT",
+ [_IOC_NR(VIDIOC_INT_S_STD_OUTPUT)] = "VIDIOC_INT_S_STD_OUTPUT",
};
#define V4L2_INT_IOCTLS ARRAY_SIZE(v4l2_int_ioctls)
@@ -1297,6 +1307,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
case V4L2_CID_MPEG_AUDIO_MODE_EXTENSION: name = "Audio Stereo Mode Extension"; break;
case V4L2_CID_MPEG_AUDIO_EMPHASIS: name = "Audio Emphasis"; break;
case V4L2_CID_MPEG_AUDIO_CRC: name = "Audio CRC"; break;
+ case V4L2_CID_MPEG_AUDIO_MUTE: name = "Audio Mute"; break;
case V4L2_CID_MPEG_VIDEO_ENCODING: name = "Video Encoding"; break;
case V4L2_CID_MPEG_VIDEO_ASPECT: name = "Video Aspect"; break;
case V4L2_CID_MPEG_VIDEO_B_FRAMES: name = "Video B Frames"; break;
@@ -1307,6 +1318,8 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
case V4L2_CID_MPEG_VIDEO_BITRATE: name = "Video Bitrate"; break;
case V4L2_CID_MPEG_VIDEO_BITRATE_PEAK: name = "Video Peak Bitrate"; break;
case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION: name = "Video Temporal Decimation"; break;
+ case V4L2_CID_MPEG_VIDEO_MUTE: name = "Video Mute"; break;
+ case V4L2_CID_MPEG_VIDEO_MUTE_YUV: name = "Video Mute YUV"; break;
case V4L2_CID_MPEG_STREAM_TYPE: name = "Stream Type"; break;
case V4L2_CID_MPEG_STREAM_PID_PMT: name = "Stream PMT Program ID"; break;
case V4L2_CID_MPEG_STREAM_PID_AUDIO: name = "Stream Audio Program ID"; break;
@@ -1322,6 +1335,7 @@ int v4l2_ctrl_query_fill(struct v4l2_queryctrl *qctrl, s32 min, s32 max, s32 ste
switch (qctrl->id) {
case V4L2_CID_AUDIO_MUTE:
case V4L2_CID_AUDIO_LOUDNESS:
+ case V4L2_CID_MPEG_AUDIO_MUTE:
case V4L2_CID_MPEG_VIDEO_GOP_CLOSURE:
case V4L2_CID_MPEG_VIDEO_PULLDOWN:
qctrl->type = V4L2_CTRL_TYPE_BOOLEAN;
@@ -1455,6 +1469,8 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl)
V4L2_MPEG_AUDIO_CRC_NONE,
V4L2_MPEG_AUDIO_CRC_CRC16, 1,
V4L2_MPEG_AUDIO_CRC_NONE);
+ case V4L2_CID_MPEG_AUDIO_MUTE:
+ return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 0);
case V4L2_CID_MPEG_VIDEO_ENCODING:
return v4l2_ctrl_query_fill(qctrl,
V4L2_MPEG_VIDEO_ENCODING_MPEG_1,
@@ -1484,6 +1500,10 @@ int v4l2_ctrl_query_fill_std(struct v4l2_queryctrl *qctrl)
return v4l2_ctrl_query_fill(qctrl, 0, 27000000, 1, 8000000);
case V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION:
return v4l2_ctrl_query_fill(qctrl, 0, 255, 1, 0);
+ case V4L2_CID_MPEG_VIDEO_MUTE:
+ return v4l2_ctrl_query_fill(qctrl, 0, 1, 1, 0);
+ case V4L2_CID_MPEG_VIDEO_MUTE_YUV: /* Init YUV (really YCbCr) to black */
+ return v4l2_ctrl_query_fill(qctrl, 0, 0xffffff, 1, 0x008080);
case V4L2_CID_MPEG_STREAM_TYPE:
return v4l2_ctrl_query_fill(qctrl,
V4L2_MPEG_STREAM_TYPE_MPEG2_PS,
diff --git a/linux/drivers/media/video/video-buf-dvb.c b/linux/drivers/media/video/video-buf-dvb.c
index 86993f95a..4776364a6 100644
--- a/linux/drivers/media/video/video-buf-dvb.c
+++ b/linux/drivers/media/video/video-buf-dvb.c
@@ -13,7 +13,6 @@
* (at your option) any later version.
*/
-#include "compat.h"
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,0)
#include <linux/module.h>
@@ -30,6 +29,7 @@
#include <media/video-buf.h>
#include <media/video-buf-dvb.h>
+#include "compat.h"
/* ------------------------------------------------------------------ */
@@ -68,13 +68,7 @@ static int videobuf_dvb_thread(void *data)
break;
if (kthread_should_stop())
break;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,13)
try_to_freeze();
-#else
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
/* feed buffer data to demux */
if (buf->state == STATE_DONE)
diff --git a/linux/drivers/media/video/video-buf.c b/linux/drivers/media/video/video-buf.c
index a2251c7e3..5564e20af 100644
--- a/linux/drivers/media/video/video-buf.c
+++ b/linux/drivers/media/video/video-buf.c
@@ -22,7 +22,6 @@
* (at your option) any later version.
*/
-#include "compat.h"
#include <linux/init.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
@@ -35,6 +34,7 @@
#include <asm/pgtable.h>
#include <media/video-buf.h>
+#include "compat.h"
#define MAGIC_DMABUF 0x19721112
#define MAGIC_BUFFER 0x20040302
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c
index 707757237..b1cd0bb72 100644
--- a/linux/drivers/media/video/videodev.c
+++ b/linux/drivers/media/video/videodev.c
@@ -30,7 +30,6 @@
#include <linux/module.h>
#include <linux/types.h>
#include <linux/kernel.h>
-#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <linux/mm.h>
#include <linux/string.h>
@@ -342,6 +341,7 @@ static char *v4l2_type_names_FIXME[] = {
[V4L2_BUF_TYPE_VBI_OUTPUT] = "vbi-out",
[V4L2_BUF_TYPE_SLICED_VBI_OUTPUT] = "sliced-vbi-out",
[V4L2_BUF_TYPE_SLICED_VBI_CAPTURE] = "sliced-vbi-capture",
+ [V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY] = "video-out-over",
[V4L2_BUF_TYPE_PRIVATE] = "private",
};
@@ -354,6 +354,8 @@ static char *v4l2_field_names_FIXME[] = {
[V4L2_FIELD_SEQ_TB] = "seq-tb",
[V4L2_FIELD_SEQ_BT] = "seq-bt",
[V4L2_FIELD_ALTERNATE] = "alternate",
+ [V4L2_FIELD_INTERLACED_TB] = "interlaced-tb",
+ [V4L2_FIELD_INTERLACED_BT] = "interlaced-bt",
};
#define prt_names(a,arr) (((a)>=0)&&((a)<ARRAY_SIZE(arr)))?arr[a]:"unknown"
@@ -435,6 +437,10 @@ static int check_fmt (struct video_device *vfd, enum v4l2_buf_type type)
if (vfd->vidioc_try_fmt_vbi_output)
return (0);
break;
+ case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
+ if (vfd->vidioc_try_fmt_output_overlay)
+ return (0);
+ break;
case V4L2_BUF_TYPE_PRIVATE:
if (vfd->vidioc_try_fmt_type_private)
return (0);
@@ -549,6 +555,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_enum_fmt_vbi_output(file,
fh, f);
break;
+ case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
+ if (vfd->vidioc_enum_fmt_output_overlay)
+ ret=vfd->vidioc_enum_fmt_output_overlay(file, fh, f);
+ break;
case V4L2_BUF_TYPE_PRIVATE:
if (vfd->vidioc_enum_fmt_type_private)
ret=vfd->vidioc_enum_fmt_type_private(file,
@@ -606,6 +616,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_g_fmt_video_output(file,
fh, f);
break;
+ case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
+ if (vfd->vidioc_g_fmt_output_overlay)
+ ret=vfd->vidioc_g_fmt_output_overlay(file, fh, f);
+ break;
case V4L2_BUF_TYPE_VBI_OUTPUT:
if (vfd->vidioc_g_fmt_vbi_output)
ret=vfd->vidioc_g_fmt_vbi_output(file, fh, f);
@@ -654,6 +668,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_s_fmt_video_output(file,
fh, f);
break;
+ case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
+ if (vfd->vidioc_s_fmt_output_overlay)
+ ret=vfd->vidioc_s_fmt_output_overlay(file, fh, f);
+ break;
case V4L2_BUF_TYPE_VBI_OUTPUT:
if (vfd->vidioc_s_fmt_vbi_output)
ret=vfd->vidioc_s_fmt_vbi_output(file,
@@ -704,6 +722,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_try_fmt_video_output(file,
fh, f);
break;
+ case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY:
+ if (vfd->vidioc_try_fmt_output_overlay)
+ ret=vfd->vidioc_try_fmt_output_overlay(file, fh, f);
+ break;
case V4L2_BUF_TYPE_VBI_OUTPUT:
if (vfd->vidioc_try_fmt_vbi_output)
ret=vfd->vidioc_try_fmt_vbi_output(file,
@@ -1366,6 +1388,42 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
ret=vfd->vidioc_s_jpegcomp(file, fh, p);
break;
}
+ case VIDIOC_G_ENC_INDEX:
+ {
+ struct v4l2_enc_idx *p=arg;
+
+ if (!vfd->vidioc_g_enc_index)
+ break;
+ ret=vfd->vidioc_g_enc_index(file, fh, p);
+ if (!ret)
+ dbgarg (cmd, "entries=%d, entries_cap=%d\n",
+ p->entries,p->entries_cap);
+ break;
+ }
+ case VIDIOC_ENCODER_CMD:
+ {
+ struct v4l2_encoder_cmd *p=arg;
+
+ if (!vfd->vidioc_encoder_cmd)
+ break;
+ ret=vfd->vidioc_encoder_cmd(file, fh, p);
+ if (!ret)
+ dbgarg (cmd, "cmd=%d, flags=%d\n",
+ p->cmd,p->flags);
+ break;
+ }
+ case VIDIOC_TRY_ENCODER_CMD:
+ {
+ struct v4l2_encoder_cmd *p=arg;
+
+ if (!vfd->vidioc_try_encoder_cmd)
+ break;
+ ret=vfd->vidioc_try_encoder_cmd(file, fh, p);
+ if (!ret)
+ dbgarg (cmd, "cmd=%d, flags=%d\n",
+ p->cmd,p->flags);
+ break;
+ }
case VIDIOC_G_PARM:
{
struct v4l2_streamparm *p=arg;
@@ -1604,7 +1662,7 @@ out:
}
-static struct file_operations video_fops;
+static const struct file_operations video_fops;
/**
* video_register_device - register video4linux devices
@@ -1762,7 +1820,7 @@ void video_unregister_device(struct video_device *vfd)
/*
* Video fs operations
*/
-static struct file_operations video_fops=
+static const struct file_operations video_fops=
{
.owner = THIS_MODULE,
.llseek = no_llseek,
diff --git a/linux/drivers/media/video/vino.c b/linux/drivers/media/video/vino.c
index eab2c11af..26f99cf1d 100644
--- a/linux/drivers/media/video/vino.c
+++ b/linux/drivers/media/video/vino.c
@@ -4394,7 +4394,7 @@ static int vino_ioctl(struct inode *inode, struct file *file,
// __initdata
static int vino_init_stage = 0;
-static struct file_operations vino_fops = {
+static const struct file_operations vino_fops = {
.owner = THIS_MODULE,
.open = vino_open,
.release = vino_close,
diff --git a/linux/drivers/media/video/vivi.c b/linux/drivers/media/video/vivi.c
index 798e711f4..0cea7c28b 100644
--- a/linux/drivers/media/video/vivi.c
+++ b/linux/drivers/media/video/vivi.c
@@ -586,16 +586,9 @@ static void vivi_sleep(struct vivi_dmaqueue *dma_q)
schedule_timeout_interruptible (timeout);
}
-#if (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,12)) && (LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0))
- if (current->flags & PF_FREEZE) {
- refrigerator (PF_FREEZE);
- }
-#endif
remove_wait_queue(&dma_q->wq, &wait);
-#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,12)
try_to_freeze();
-#endif
}
static int vivi_thread(void *data)
@@ -1450,7 +1443,7 @@ vivi_mmap(struct file *file, struct vm_area_struct * vma)
return ret;
}
-static struct file_operations vivi_fops = {
+static const struct file_operations vivi_fops = {
.owner = THIS_MODULE,
.open = vivi_open,
.release = vivi_release,
diff --git a/linux/drivers/media/video/w9966.c b/linux/drivers/media/video/w9966.c
index 11ae53998..7b8cbe010 100644
--- a/linux/drivers/media/video/w9966.c
+++ b/linux/drivers/media/video/w9966.c
@@ -184,7 +184,7 @@ static int w9966_v4l_ioctl(struct inode *inode, struct file *file,
static ssize_t w9966_v4l_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos);
-static struct file_operations w9966_fops = {
+static const struct file_operations w9966_fops = {
.owner = THIS_MODULE,
.open = video_exclusive_open,
.release = video_exclusive_release,
diff --git a/linux/drivers/media/video/w9968cf.c b/linux/drivers/media/video/w9968cf.c
index c165239f4..f27f8f152 100644
--- a/linux/drivers/media/video/w9968cf.c
+++ b/linux/drivers/media/video/w9968cf.c
@@ -399,7 +399,7 @@ MODULE_PARM_DESC(specific_debug,
****************************************************************************/
/* Video4linux interface */
-static struct file_operations w9968cf_fops;
+static const struct file_operations w9968cf_fops;
static int w9968cf_open(struct inode*, struct file*);
static int w9968cf_release(struct inode*, struct file*);
static int w9968cf_mmap(struct file*, struct vm_area_struct*);
@@ -1581,6 +1581,7 @@ static int w9968cf_i2c_init(struct w9968cf_device* cam)
memcpy(&cam->i2c_adapter, &adap, sizeof(struct i2c_adapter));
strcpy(cam->i2c_adapter.name, "w9968cf");
+ cam->i2c_adapter.dev.parent = &cam->usbdev->dev;
i2c_set_adapdata(&cam->i2c_adapter, cam);
DBG(6, "Registering I2C adapter with kernel...")
@@ -3474,7 +3475,7 @@ ioctl_fail:
}
-static struct file_operations w9968cf_fops = {
+static const struct file_operations w9968cf_fops = {
.owner = THIS_MODULE,
.open = w9968cf_open,
.release = w9968cf_release,
diff --git a/linux/drivers/media/video/wm8739.c b/linux/drivers/media/video/wm8739.c
index 79394f205..4b4e5277f 100644
--- a/linux/drivers/media/video/wm8739.c
+++ b/linux/drivers/media/video/wm8739.c
@@ -21,7 +21,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
#include <linux/ioctl.h>
@@ -34,6 +33,7 @@
#include "i2c-compat.h"
#include <linux/slab.h>
#endif
+#include "compat.h"
MODULE_DESCRIPTION("wm8739 driver");
MODULE_AUTHOR("T. Adachi, Hans Verkuil");
diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c
index 390d0cb29..d64f9c534 100644
--- a/linux/drivers/media/video/wm8775.c
+++ b/linux/drivers/media/video/wm8775.c
@@ -25,7 +25,6 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/types.h>
#include <linux/ioctl.h>
@@ -38,6 +37,7 @@
#include "i2c-compat.h"
#include <linux/slab.h>
#endif
+#include "compat.h"
MODULE_DESCRIPTION("wm8775 driver");
MODULE_AUTHOR("Ulf Eklund, Hans Verkuil");
diff --git a/linux/drivers/media/video/zc0301/zc0301_core.c b/linux/drivers/media/video/zc0301/zc0301_core.c
index 1da0fb0c5..290bb83c6 100644
--- a/linux/drivers/media/video/zc0301/zc0301_core.c
+++ b/linux/drivers/media/video/zc0301/zc0301_core.c
@@ -1913,7 +1913,7 @@ static int zc0301_ioctl(struct inode* inode, struct file* filp,
}
-static struct file_operations zc0301_fops = {
+static const struct file_operations zc0301_fops = {
.owner = THIS_MODULE,
.open = zc0301_open,
.release = zc0301_release,
diff --git a/linux/drivers/media/video/zoran_card.c b/linux/drivers/media/video/zoran_card.c
index f453a2b96..498e37e9f 100644
--- a/linux/drivers/media/video/zoran_card.c
+++ b/linux/drivers/media/video/zoran_card.c
@@ -846,6 +846,7 @@ zoran_register_i2c (struct zoran *zr)
sizeof(I2C_NAME(&zr->i2c_adapter)) - 1);
i2c_set_adapdata(&zr->i2c_adapter, zr);
zr->i2c_adapter.algo_data = &zr->i2c_algo;
+ zr->i2c_adapter.dev.parent = &zr->pci_dev->dev;
return i2c_bit_add_bus(&zr->i2c_adapter);
}
diff --git a/linux/drivers/media/video/zoran_driver.c b/linux/drivers/media/video/zoran_driver.c
index dfacb8fbd..4c46573c9 100644
--- a/linux/drivers/media/video/zoran_driver.c
+++ b/linux/drivers/media/video/zoran_driver.c
@@ -4682,7 +4682,7 @@ zoran_mmap (struct file *file,
return 0;
}
-static struct file_operations zoran_fops = {
+static const struct file_operations zoran_fops = {
.owner = THIS_MODULE,
.open = zoran_open,
.release = zoran_close,
diff --git a/linux/drivers/media/video/zoran_procfs.c b/linux/drivers/media/video/zoran_procfs.c
index 77cbe49c3..010842a20 100644
--- a/linux/drivers/media/video/zoran_procfs.c
+++ b/linux/drivers/media/video/zoran_procfs.c
@@ -195,7 +195,7 @@ static ssize_t zoran_write(struct file *file, const char __user *buffer,
return count;
}
-static struct file_operations zoran_operations = {
+static const struct file_operations zoran_operations = {
.open = zoran_open,
.read = seq_read,
.write = zoran_write,
diff --git a/linux/drivers/media/video/zr364xx.c b/linux/drivers/media/video/zr364xx.c
index 166dccc50..2c9ac4cd2 100644
--- a/linux/drivers/media/video/zr364xx.c
+++ b/linux/drivers/media/video/zr364xx.c
@@ -34,6 +34,7 @@
#include <linux/slab.h>
#include <linux/proc_fs.h>
#include <media/v4l2-common.h>
+#include "compat.h"
/* Version Information */
@@ -103,7 +104,11 @@ struct zr364xx_camera {
int width;
int height;
int method;
+#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
struct mutex lock;
+#else
+ struct semaphore lock;
+#endif
};
@@ -137,7 +142,7 @@ static int send_control_msg(struct usb_device *udev, u8 request, u16 value,
}
-/* Control messages sent to the camera to initialize it
+/* Control messages sent to the camera to initialize it
* and launch the capture */
typedef struct {
unsigned int value;
@@ -206,54 +211,54 @@ static message *init[3] = { m0, m1, m2 };
static unsigned char header1[] = {
0xFF, 0xD8,
/*
- 0xFF, 0xE0, 0x00, 0x10, 'J', 'F', 'I', 'F',
+ 0xFF, 0xE0, 0x00, 0x10, 'J', 'F', 'I', 'F',
0x00, 0x01, 0x01, 0x00, 0x33, 0x8A, 0x00, 0x00, 0x33, 0x88,
*/
0xFF, 0xDB, 0x00, 0x84
};
static unsigned char header2[] = {
- 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01,
- 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
- 0xFF, 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02,
- 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7D, 0x01,
- 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06,
- 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1,
- 0x08, 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, 0x24, 0x33,
- 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x25,
- 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
- 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54,
- 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67,
- 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A,
- 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94,
- 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
- 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8,
- 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA,
- 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2,
- 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF1, 0xF2, 0xF3,
- 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xC4, 0x00, 0x1F,
- 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
- 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04,
- 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5,
- 0x11, 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05,
- 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, 0x02, 0x03, 0x11,
- 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
- 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, 0xC1,
- 0x09, 0x23, 0x33, 0x52, 0xF0, 0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16,
- 0x24, 0x34, 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, 0x27,
- 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44,
- 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57,
- 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A,
- 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x82, 0x83, 0x84,
- 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96,
- 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8,
- 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA,
- 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3,
- 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE2, 0xE3, 0xE4, 0xE5,
- 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
- 0xF8, 0xF9, 0xFA, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0xF0, 0x01,
- 0x40, 0x03, 0x01, 0x21, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01,
- 0xFF, 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11,
+ 0xFF, 0xC4, 0x00, 0x1F, 0x00, 0x00, 0x01, 0x05, 0x01, 0x01, 0x01,
+ 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B,
+ 0xFF, 0xC4, 0x00, 0xB5, 0x10, 0x00, 0x02, 0x01, 0x03, 0x03, 0x02,
+ 0x04, 0x03, 0x05, 0x05, 0x04, 0x04, 0x00, 0x00, 0x01, 0x7D, 0x01,
+ 0x02, 0x03, 0x00, 0x04, 0x11, 0x05, 0x12, 0x21, 0x31, 0x41, 0x06,
+ 0x13, 0x51, 0x61, 0x07, 0x22, 0x71, 0x14, 0x32, 0x81, 0x91, 0xA1,
+ 0x08, 0x23, 0x42, 0xB1, 0xC1, 0x15, 0x52, 0xD1, 0xF0, 0x24, 0x33,
+ 0x62, 0x72, 0x82, 0x09, 0x0A, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x25,
+ 0x26, 0x27, 0x28, 0x29, 0x2A, 0x34, 0x35, 0x36, 0x37, 0x38, 0x39,
+ 0x3A, 0x43, 0x44, 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54,
+ 0x55, 0x56, 0x57, 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67,
+ 0x68, 0x69, 0x6A, 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A,
+ 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94,
+ 0x95, 0x96, 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6,
+ 0xA7, 0xA8, 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8,
+ 0xB9, 0xBA, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA,
+ 0xD2, 0xD3, 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE1, 0xE2,
+ 0xE3, 0xE4, 0xE5, 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF1, 0xF2, 0xF3,
+ 0xF4, 0xF5, 0xF6, 0xF7, 0xF8, 0xF9, 0xFA, 0xFF, 0xC4, 0x00, 0x1F,
+ 0x01, 0x00, 0x03, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
+ 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x03, 0x04,
+ 0x05, 0x06, 0x07, 0x08, 0x09, 0x0A, 0x0B, 0xFF, 0xC4, 0x00, 0xB5,
+ 0x11, 0x00, 0x02, 0x01, 0x02, 0x04, 0x04, 0x03, 0x04, 0x07, 0x05,
+ 0x04, 0x04, 0x00, 0x01, 0x02, 0x77, 0x00, 0x01, 0x02, 0x03, 0x11,
+ 0x04, 0x05, 0x21, 0x31, 0x06, 0x12, 0x41, 0x51, 0x07, 0x61, 0x71,
+ 0x13, 0x22, 0x32, 0x81, 0x08, 0x14, 0x42, 0x91, 0xA1, 0xB1, 0xC1,
+ 0x09, 0x23, 0x33, 0x52, 0xF0, 0x15, 0x62, 0x72, 0xD1, 0x0A, 0x16,
+ 0x24, 0x34, 0xE1, 0x25, 0xF1, 0x17, 0x18, 0x19, 0x1A, 0x26, 0x27,
+ 0x28, 0x29, 0x2A, 0x35, 0x36, 0x37, 0x38, 0x39, 0x3A, 0x43, 0x44,
+ 0x45, 0x46, 0x47, 0x48, 0x49, 0x4A, 0x53, 0x54, 0x55, 0x56, 0x57,
+ 0x58, 0x59, 0x5A, 0x63, 0x64, 0x65, 0x66, 0x67, 0x68, 0x69, 0x6A,
+ 0x73, 0x74, 0x75, 0x76, 0x77, 0x78, 0x79, 0x7A, 0x82, 0x83, 0x84,
+ 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x92, 0x93, 0x94, 0x95, 0x96,
+ 0x97, 0x98, 0x99, 0x9A, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8,
+ 0xA9, 0xAA, 0xB2, 0xB3, 0xB4, 0xB5, 0xB6, 0xB7, 0xB8, 0xB9, 0xBA,
+ 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xD2, 0xD3,
+ 0xD4, 0xD5, 0xD6, 0xD7, 0xD8, 0xD9, 0xDA, 0xE2, 0xE3, 0xE4, 0xE5,
+ 0xE6, 0xE7, 0xE8, 0xE9, 0xEA, 0xF2, 0xF3, 0xF4, 0xF5, 0xF6, 0xF7,
+ 0xF8, 0xF9, 0xFA, 0xFF, 0xC0, 0x00, 0x11, 0x08, 0x00, 0xF0, 0x01,
+ 0x40, 0x03, 0x01, 0x21, 0x00, 0x02, 0x11, 0x01, 0x03, 0x11, 0x01,
+ 0xFF, 0xDA, 0x00, 0x0C, 0x03, 0x01, 0x00, 0x02, 0x11, 0x03, 0x11,
0x00, 0x3F, 0x00
};
static unsigned char header3;
@@ -279,7 +284,7 @@ static int read_frame(struct zr364xx_camera *cam, int framenum)
/* during the first loop we are going to insert JPEG header */
head = 0;
- /* this is the place in memory where we are going to build
+ /* this is the place in memory where we are going to build
* the JPEG image */
jpeg = cam->framebuf + framenum * MAX_FRAME_SIZE;
/* read data... */
diff --git a/linux/include/linux/i2c-id.h b/linux/include/linux/i2c-id.h
index 6e7ec4c76..9c21dc793 100644
--- a/linux/include/linux/i2c-id.h
+++ b/linux/include/linux/i2c-id.h
@@ -232,7 +232,6 @@
#define I2C_HW_SMBUS_PIIX4 0x040000
#define I2C_HW_SMBUS_ALI15X3 0x040001
#define I2C_HW_SMBUS_VIA2 0x040002
-#define I2C_HW_SMBUS_VOODOO3 0x040003
#define I2C_HW_SMBUS_I801 0x040004
#define I2C_HW_SMBUS_AMD756 0x040005
#define I2C_HW_SMBUS_SIS5595 0x040006
@@ -248,13 +247,11 @@
#define I2C_HW_SMBUS_OV519 0x040010 /* OV519 USB 1.1 webcam IC */
#define I2C_HW_SMBUS_OVFX2 0x040011 /* Cypress/OmniVision FX2 webcam */
#define I2C_HW_SMBUS_CAFE 0x040012 /* Marvell 88ALP01 "CAFE" cam */
+#define I2C_HW_SMBUS_ALI1563 0x040013
/* --- ISA pseudo-adapter */
#define I2C_HW_ISA 0x050000
-/* --- IPMI pseudo-adapter */
-#define I2C_HW_IPMI 0x0b0000
-
/* --- IPMB adapter */
#define I2C_HW_IPMB 0x0c0000
diff --git a/linux/include/linux/videodev2.h b/linux/include/linux/videodev2.h
index fbde9f814..769b37bd3 100644
--- a/linux/include/linux/videodev2.h
+++ b/linux/include/linux/videodev2.h
@@ -96,44 +96,57 @@
* E N U M S
*/
enum v4l2_field {
- V4L2_FIELD_ANY = 0, /* driver can choose from none,
- top, bottom, interlaced
- depending on whatever it thinks
- is approximate ... */
- V4L2_FIELD_NONE = 1, /* this device has no fields ... */
- V4L2_FIELD_TOP = 2, /* top field only */
- V4L2_FIELD_BOTTOM = 3, /* bottom field only */
- V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */
- V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one
- buffer, top-bottom order */
- V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */
- V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into
- separate buffers */
+ V4L2_FIELD_ANY = 0, /* driver can choose from none,
+ top, bottom, interlaced
+ depending on whatever it thinks
+ is approximate ... */
+ V4L2_FIELD_NONE = 1, /* this device has no fields ... */
+ V4L2_FIELD_TOP = 2, /* top field only */
+ V4L2_FIELD_BOTTOM = 3, /* bottom field only */
+ V4L2_FIELD_INTERLACED = 4, /* both fields interlaced */
+ V4L2_FIELD_SEQ_TB = 5, /* both fields sequential into one
+ buffer, top-bottom order */
+ V4L2_FIELD_SEQ_BT = 6, /* same as above + bottom-top order */
+ V4L2_FIELD_ALTERNATE = 7, /* both fields alternating into
+ separate buffers */
+ V4L2_FIELD_INTERLACED_TB = 8, /* both fields interlaced, top field
+ first and the top field is
+ transmitted first */
+ V4L2_FIELD_INTERLACED_BT = 9, /* both fields interlaced, top field
+ first and the bottom field is
+ transmitted first */
};
#define V4L2_FIELD_HAS_TOP(field) \
((field) == V4L2_FIELD_TOP ||\
(field) == V4L2_FIELD_INTERLACED ||\
+ (field) == V4L2_FIELD_INTERLACED_TB ||\
+ (field) == V4L2_FIELD_INTERLACED_BT ||\
(field) == V4L2_FIELD_SEQ_TB ||\
(field) == V4L2_FIELD_SEQ_BT)
#define V4L2_FIELD_HAS_BOTTOM(field) \
((field) == V4L2_FIELD_BOTTOM ||\
(field) == V4L2_FIELD_INTERLACED ||\
+ (field) == V4L2_FIELD_INTERLACED_TB ||\
+ (field) == V4L2_FIELD_INTERLACED_BT ||\
(field) == V4L2_FIELD_SEQ_TB ||\
(field) == V4L2_FIELD_SEQ_BT)
#define V4L2_FIELD_HAS_BOTH(field) \
((field) == V4L2_FIELD_INTERLACED ||\
- (field) == V4L2_FIELD_SEQ_TB ||\
+ (field) == V4L2_FIELD_INTERLACED_TB ||\
+ (field) == V4L2_FIELD_INTERLACED_BT ||\
+ (field) == V4L2_FIELD_SEQ_TB ||\
(field) == V4L2_FIELD_SEQ_BT)
enum v4l2_buf_type {
- V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
- V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
- V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
- V4L2_BUF_TYPE_VBI_CAPTURE = 4,
- V4L2_BUF_TYPE_VBI_OUTPUT = 5,
- V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
- V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
- V4L2_BUF_TYPE_PRIVATE = 0x80,
+ V4L2_BUF_TYPE_VIDEO_CAPTURE = 1,
+ V4L2_BUF_TYPE_VIDEO_OUTPUT = 2,
+ V4L2_BUF_TYPE_VIDEO_OVERLAY = 3,
+ V4L2_BUF_TYPE_VBI_CAPTURE = 4,
+ V4L2_BUF_TYPE_VBI_OUTPUT = 5,
+ V4L2_BUF_TYPE_SLICED_VBI_CAPTURE = 6,
+ V4L2_BUF_TYPE_SLICED_VBI_OUTPUT = 7,
+ V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY = 8,
+ V4L2_BUF_TYPE_PRIVATE = 0x80,
};
enum v4l2_ctrl_type {
@@ -227,6 +240,8 @@ struct v4l2_capability
#define V4L2_CAP_SLICED_VBI_CAPTURE 0x00000040 /* Is a sliced VBI capture device */
#define V4L2_CAP_SLICED_VBI_OUTPUT 0x00000080 /* Is a sliced VBI output device */
#define V4L2_CAP_RDS_CAPTURE 0x00000100 /* RDS data capture */
+#define V4L2_CAP_VIDEO_OUTPUT_POS 0x00000200 /* Video output can have x,y coords */
+#define V4L2_CAP_VIDEO_OUTPUT_OVERLAY 0x00000400 /* Can do video output overlay */
#define V4L2_CAP_TUNER 0x00010000 /* has a tuner */
#define V4L2_CAP_AUDIO 0x00020000 /* has audio support */
@@ -249,6 +264,8 @@ struct v4l2_pix_format
__u32 sizeimage;
enum v4l2_colorspace colorspace;
__u32 priv; /* private data, depends on pixelformat */
+ __u32 x; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
+ __u32 y; /* only valid if V4L2_CAP_VIDEO_OUTPUT_POS is set */
};
/* Pixel format FOURCC depth Description */
@@ -596,10 +613,14 @@ struct v4l2_framebuffer
#define V4L2_FBUF_CAP_CHROMAKEY 0x0002
#define V4L2_FBUF_CAP_LIST_CLIPPING 0x0004
#define V4L2_FBUF_CAP_BITMAP_CLIPPING 0x0008
+#define V4L2_FBUF_CAP_LOCAL_ALPHA 0x0010
+#define V4L2_FBUF_CAP_GLOBAL_ALPHA 0x0020
/* Flags for the 'flags' field. */
#define V4L2_FBUF_FLAG_PRIMARY 0x0001
#define V4L2_FBUF_FLAG_OVERLAY 0x0002
#define V4L2_FBUF_FLAG_CHROMAKEY 0x0004
+#define V4L2_FBUF_FLAG_LOCAL_ALPHA 0x0008
+#define V4L2_FBUF_FLAG_GLOBAL_ALPHA 0x0010
struct v4l2_clip
{
@@ -615,6 +636,7 @@ struct v4l2_window
struct v4l2_clip __user *clips;
__u32 clipcount;
void __user *bitmap;
+ __u8 global_alpha;
};
/*
@@ -1037,6 +1059,7 @@ enum v4l2_mpeg_audio_crc {
V4L2_MPEG_AUDIO_CRC_NONE = 0,
V4L2_MPEG_AUDIO_CRC_CRC16 = 1,
};
+#define V4L2_CID_MPEG_AUDIO_MUTE (V4L2_CID_MPEG_BASE+109)
/* MPEG video */
#define V4L2_CID_MPEG_VIDEO_ENCODING (V4L2_CID_MPEG_BASE+200)
@@ -1063,6 +1086,8 @@ enum v4l2_mpeg_video_bitrate_mode {
#define V4L2_CID_MPEG_VIDEO_BITRATE (V4L2_CID_MPEG_BASE+207)
#define V4L2_CID_MPEG_VIDEO_BITRATE_PEAK (V4L2_CID_MPEG_BASE+208)
#define V4L2_CID_MPEG_VIDEO_TEMPORAL_DECIMATION (V4L2_CID_MPEG_BASE+209)
+#define V4L2_CID_MPEG_VIDEO_MUTE (V4L2_CID_MPEG_BASE+210)
+#define V4L2_CID_MPEG_VIDEO_MUTE_YUV (V4L2_CID_MPEG_BASE+211)
/* MPEG-class control IDs specific to the CX2584x driver as defined by V4L2 */
#define V4L2_CID_MPEG_CX2341X_BASE (V4L2_CTRL_CLASS_MPEG | 0x1000)
@@ -1103,6 +1128,7 @@ enum v4l2_mpeg_cx2341x_video_median_filter_type {
#define V4L2_CID_MPEG_CX2341X_VIDEO_LUMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+8)
#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_BOTTOM (V4L2_CID_MPEG_CX2341X_BASE+9)
#define V4L2_CID_MPEG_CX2341X_VIDEO_CHROMA_MEDIAN_FILTER_TOP (V4L2_CID_MPEG_CX2341X_BASE+10)
+#define V4L2_CID_MPEG_CX2341X_STREAM_INSERT_NAV_PACKETS (V4L2_CID_MPEG_CX2341X_BASE+11)
/*
* T U N I N G
@@ -1193,6 +1219,55 @@ struct v4l2_audioout
};
/*
+ * M P E G S E R V I C E S
+ *
+ * NOTE: EXPERIMENTAL API
+ */
+#if 1 /*KEEP*/
+#define V4L2_ENC_IDX_FRAME_I (0)
+#define V4L2_ENC_IDX_FRAME_P (1)
+#define V4L2_ENC_IDX_FRAME_B (2)
+#define V4L2_ENC_IDX_FRAME_MASK (0xf)
+
+struct v4l2_enc_idx_entry {
+ __u64 offset;
+ __u64 pts;
+ __u32 length;
+ __u32 flags;
+ __u32 reserved[2];
+};
+
+#define V4L2_ENC_IDX_ENTRIES (64)
+struct v4l2_enc_idx {
+ __u32 entries;
+ __u32 entries_cap;
+ __u32 reserved[4];
+ struct v4l2_enc_idx_entry entry[V4L2_ENC_IDX_ENTRIES];
+};
+
+
+#define V4L2_ENC_CMD_START (0)
+#define V4L2_ENC_CMD_STOP (1)
+#define V4L2_ENC_CMD_PAUSE (2)
+#define V4L2_ENC_CMD_RESUME (3)
+
+/* Flags for V4L2_ENC_CMD_STOP */
+#define V4L2_ENC_CMD_STOP_AT_GOP_END (1 << 0)
+
+struct v4l2_encoder_cmd {
+ __u32 cmd;
+ __u32 flags;
+ union {
+ struct {
+ __u32 data[8];
+ } raw;
+ };
+};
+
+#endif
+
+
+/*
* D A T A S E R V I C E S ( V B I )
*
* Data services API by Michael Schimek
@@ -1378,6 +1453,9 @@ struct v4l2_register {
#if 1 /*KEEP*/
#define VIDIOC_ENUM_FRAMESIZES _IOWR ('V', 74, struct v4l2_frmsizeenum)
#define VIDIOC_ENUM_FRAMEINTERVALS _IOWR ('V', 75, struct v4l2_frmivalenum)
+#define VIDIOC_G_ENC_INDEX _IOR ('V', 76, struct v4l2_enc_idx)
+#define VIDIOC_ENCODER_CMD _IOWR ('V', 77, struct v4l2_encoder_cmd)
+#define VIDIOC_TRY_ENCODER_CMD _IOWR ('V', 78, struct v4l2_encoder_cmd)
#endif
/* only implemented if CONFIG_VIDEO_ADV_DEBUG is defined */
#define VIDIOC_DBG_S_REGISTER _IOW ('d', 100, struct v4l2_register)
diff --git a/linux/include/media/cx2341x.h b/linux/include/media/cx2341x.h
index d758a52cf..583b0621f 100644
--- a/linux/include/media/cx2341x.h
+++ b/linux/include/media/cx2341x.h
@@ -40,6 +40,7 @@ struct cx2341x_mpeg_params {
/* stream */
enum v4l2_mpeg_stream_type stream_type;
enum v4l2_mpeg_stream_vbi_fmt stream_vbi_fmt;
+ u16 stream_insert_nav_packets;
/* audio */
enum v4l2_mpeg_audio_sampling_freq audio_sampling_freq;
@@ -50,6 +51,7 @@ struct cx2341x_mpeg_params {
enum v4l2_mpeg_audio_emphasis audio_emphasis;
enum v4l2_mpeg_audio_crc audio_crc;
u16 audio_properties;
+ u16 audio_mute;
/* video */
enum v4l2_mpeg_video_encoding video_encoding;
@@ -61,6 +63,8 @@ struct cx2341x_mpeg_params {
u32 video_bitrate;
u32 video_bitrate_peak;
u16 video_temporal_decimation;
+ u16 video_mute;
+ u32 video_mute_yuv;
/* encoding filters */
enum v4l2_mpeg_cx2341x_video_spatial_filter_mode video_spatial_filter_mode;
diff --git a/linux/include/media/v4l2-common.h b/linux/include/media/v4l2-common.h
index ef4f6cfcd..08a002966 100644
--- a/linux/include/media/v4l2-common.h
+++ b/linux/include/media/v4l2-common.h
@@ -252,4 +252,12 @@ struct v4l2_crystal_freq {
default values. */
#define VIDIOC_INT_INIT _IOW ('d', 114, u32)
+/* Set v4l2_std_id for video OUTPUT devices. This is ignored by
+ video input devices. */
+#define VIDIOC_INT_S_STD_OUTPUT _IOW ('d', 115, v4l2_std_id)
+
+/* Get v4l2_std_id for video OUTPUT devices. This is ignored by
+ video input devices. */
+#define VIDIOC_INT_G_STD_OUTPUT _IOW ('d', 116, v4l2_std_id)
+
#endif /* V4L2_COMMON_H_ */
diff --git a/linux/include/media/v4l2-dev.h b/linux/include/media/v4l2-dev.h
index 1734898b4..f3c230f3c 100644
--- a/linux/include/media/v4l2-dev.h
+++ b/linux/include/media/v4l2-dev.h
@@ -16,9 +16,11 @@
#include <linux/fs.h>
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,5,0)
#include <linux/device.h>
+#endif
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15)
#include <linux/mutex.h>
-#endif
+#else
+#include <asm/semaphore.h>
#endif
#include <linux/compiler.h> /* need __user */
#ifdef CONFIG_VIDEO_V4L1_COMPAT
@@ -137,6 +139,8 @@ struct video_device
struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_video_output)(struct file *file, void *fh,
struct v4l2_fmtdesc *f);
+ int (*vidioc_enum_fmt_output_overlay) (struct file *file, void *fh,
+ struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_vbi_output) (struct file *file, void *fh,
struct v4l2_fmtdesc *f);
int (*vidioc_enum_fmt_type_private)(struct file *file, void *fh,
@@ -155,6 +159,8 @@ struct video_device
struct v4l2_format *f);
int (*vidioc_g_fmt_video_output)(struct file *file, void *fh,
struct v4l2_format *f);
+ int (*vidioc_g_fmt_output_overlay) (struct file *file, void *fh,
+ struct v4l2_format *f);
int (*vidioc_g_fmt_type_private)(struct file *file, void *fh,
struct v4l2_format *f);
@@ -172,6 +178,8 @@ struct video_device
struct v4l2_format *f);
int (*vidioc_s_fmt_video_output)(struct file *file, void *fh,
struct v4l2_format *f);
+ int (*vidioc_s_fmt_output_overlay) (struct file *file, void *fh,
+ struct v4l2_format *f);
int (*vidioc_s_fmt_type_private)(struct file *file, void *fh,
struct v4l2_format *f);
@@ -188,6 +196,8 @@ struct video_device
struct v4l2_format *f);
int (*vidioc_try_fmt_video_output)(struct file *file, void *fh,
struct v4l2_format *f);
+ int (*vidioc_try_fmt_output_overlay)(struct file *file, void *fh,
+ struct v4l2_format *f);
int (*vidioc_try_fmt_type_private)(struct file *file, void *fh,
struct v4l2_format *f);
@@ -281,6 +291,12 @@ struct video_device
struct v4l2_jpegcompression *a);
int (*vidioc_s_jpegcomp) (struct file *file, void *fh,
struct v4l2_jpegcompression *a);
+ int (*vidioc_g_enc_index) (struct file *file, void *fh,
+ struct v4l2_enc_idx *a);
+ int (*vidioc_encoder_cmd) (struct file *file, void *fh,
+ struct v4l2_encoder_cmd *a);
+ int (*vidioc_try_encoder_cmd) (struct file *file, void *fh,
+ struct v4l2_encoder_cmd *a);
/* Stream type-dependent parameter ioctls */
int (*vidioc_g_parm) (struct file *file, void *fh,
diff --git a/linux/sound/oss/aci.c b/linux/sound/oss/aci.c
index 95405ff3c..49a89e8ed 100644
--- a/linux/sound/oss/aci.c
+++ b/linux/sound/oss/aci.c
@@ -51,7 +51,6 @@
* Get rid of check_region, .bss optimizations, use set_current_state
*/
-#include "compat.h"
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/module.h>
@@ -65,6 +64,7 @@
#include <asm/io.h>
#include <asm/uaccess.h>
+#include "compat.h"
#include "sound_config.h"
int aci_port; /* as determined by bit 4 in the OPTi 929 MC4 register */
diff --git a/linux/sound/oss/btaudio.c b/linux/sound/oss/btaudio.c
index c0231bcc9..0285a7082 100644
--- a/linux/sound/oss/btaudio.c
+++ b/linux/sound/oss/btaudio.c
@@ -19,7 +19,6 @@
*/
-#include "compat.h"
#include <linux/module.h>
#include <linux/errno.h>
#include <linux/pci.h>
@@ -41,6 +40,7 @@
#include <asm/uaccess.h>
#include <asm/io.h>
+#include "compat.h"
/* mmio access */
@@ -438,7 +438,7 @@ static int btaudio_mixer_ioctl(struct inode *inode, struct file *file,
return 0;
}
-static struct file_operations btaudio_mixer_fops = {
+static const struct file_operations btaudio_mixer_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.open = btaudio_mixer_open,
@@ -805,7 +805,7 @@ static unsigned int btaudio_dsp_poll(struct file *file, struct poll_table_struct
return mask;
}
-static struct file_operations btaudio_digital_dsp_fops = {
+static const struct file_operations btaudio_digital_dsp_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.open = btaudio_dsp_open_digital,
@@ -816,7 +816,7 @@ static struct file_operations btaudio_digital_dsp_fops = {
.poll = btaudio_dsp_poll,
};
-static struct file_operations btaudio_analog_dsp_fops = {
+static const struct file_operations btaudio_analog_dsp_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.open = btaudio_dsp_open_analog,
@@ -928,12 +928,11 @@ static int __devinit btaudio_probe(struct pci_dev *pci_dev,
return -EBUSY;
}
- bta = kmalloc(sizeof(*bta),GFP_ATOMIC);
+ bta = kzalloc(sizeof(*bta),GFP_ATOMIC);
if (!bta) {
rc = -ENOMEM;
goto fail0;
}
- memset(bta,0,sizeof(*bta));
bta->pci = pci_dev;
bta->irq = pci_dev->irq;
diff --git a/v4l/Makefile b/v4l/Makefile
index b07b592b1..f08143def 100644
--- a/v4l/Makefile
+++ b/v4l/Makefile
@@ -102,8 +102,12 @@ EXTRA_CFLAGS += -g
EXTRA_CFLAGS += $(if $(wildcard $(srctree)/.mm), -DMM_KERNEL)
+# Make sure kernel's options are overridden by v4l-dvb options
EXTRA_CFLAGS += -include $(obj)/config-compat.h
+# Allow kernel version compat tests without adding #include's
+EXTRA_CFLAGS += -include linux/version.h
+
#################################################
# Kernel 2.4/2.6 specific rules
diff --git a/v4l/compat.h b/v4l/compat.h
index 6ba49e825..2b2de93a7 100644
--- a/v4l/compat.h
+++ b/v4l/compat.h
@@ -5,23 +5,14 @@
#ifndef _COMPAT_H
#define _COMPAT_H
-#include <linux/i2c-id.h>
-#include <linux/pm.h>
-#include <linux/version.h>
-#include <linux/utsname.h>
-#include <linux/sched.h>
-
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,18)
# define minor(x) MINOR(x)
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0)
-#include <linux/delay.h>
+# include <linux/delay.h>
# define need_resched() (current->need_resched)
-
-#define work_struct tq_struct
-#else
-#include <linux/device.h>
+# define work_struct tq_struct
#endif
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,4,19)
@@ -58,6 +49,10 @@
# define PCI_D0 (0)
# define assert_spin_locked(foobar)
#endif
+
+/* Since v4l-dvb now includes it's own copy of linux/i2c-id.h these
+ are no longer necessary */
+/*
#if !defined(I2C_ALGO_SAA7134)
#define I2C_ALGO_SAA7134 I2C_HW_B_BT848
#endif
@@ -70,15 +65,21 @@
#if !defined(I2C_HW_SAA7146)
# define I2C_HW_SAA7146 I2C_ALGO_SAA7146
#endif
-
#if !defined(I2C_HW_B_EM2820)
#define I2C_HW_B_EM2820 0x99
#endif
+*/
#ifndef I2C_M_IGNORE_NAK
# define I2C_M_IGNORE_NAK 0x1000
#endif
+/* v4l-dvb uses an out of kernel copy of i2c-id.h, which does not have
+ some stuff that previous versions of i2c-id.h defined. */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) && defined(LINUX_I2C_ID_H)
+# define I2C_ALGO_BIT 0x010000
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
#define __le32 __u32
#endif
@@ -223,6 +224,16 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
#endif
+/* vm_insert_page() was added in 2.6.15 */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,15) && defined(_LINUX_MM_H)
+static inline int vm_insert_page(struct vm_area_struct *vma,
+ unsigned long addr, struct page *page)
+{
+ return remap_pfn_range(vma, addr, page_to_pfn(page), PAGE_SIZE,
+ vma->vm_page_prot);
+}
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,9)
#ifndef kcalloc
#define kcalloc(n,size,flags) \
@@ -236,6 +247,15 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
#endif
#endif
+/* try_to_freeze() lost its argument. Must appear after linux/sched.h */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(_LINUX_SCHED_H)
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
+# define try_to_freeze() try_to_freeze(PF_FREEZE)
+# else
+# define try_to_freeze() (0)
+# endif
+#endif
+
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
#ifndef kzalloc
#define kzalloc(size, flags) \
@@ -282,7 +302,7 @@ static inline unsigned long vmalloc_to_pfn(void * vmalloc_addr)
#define mutex_trylock(a) down_trylock(a)
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,14) && defined(_LINUX_SCHED_H)
static inline signed long __sched
schedule_timeout_interruptible(signed long timeout)
{
@@ -318,7 +338,8 @@ static inline void setup_timer(struct timer_list * timer,
turned on. We can not just include usb.h here, because there is a
lot of code which will not compile if it has usb.h included, due to
conflicts with symbol names. */
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && defined(__LINUX_USB_H)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,13) && \
+ defined(__LINUX_USB_H) && defined(_INPUT_H)
#include <linux/input.h>
/* Found in linux/usb_input.h in 2.6.13 */
/* Moved to linux/usb/input.h in 2.6.18 */
diff --git a/v4l/scripts/gentree.pl b/v4l/scripts/gentree.pl
index bd1ee94e2..4d27fd789 100755
--- a/v4l/scripts/gentree.pl
+++ b/v4l/scripts/gentree.pl
@@ -1,45 +1,96 @@
#!/usr/bin/perl
+#
+# Original version were part of Gerd Knorr's v4l scripts.
+#
+# Several improvements by (c) 2005-2007 Mauro Carvalho Chehab
+#
+# Largely re-written (C) 2007 Trent Piepho <xyzzy@speakeasy.org>
+#
+# Theory of Operation
+#
+# This acts as a sort of mini version of cpp, which will process
+# #if/#elif/#ifdef/etc directives to strip out code used to support
+# multiple kernel versions or otherwise not wanted to be sent upstream to
+# git.
+#
+# Conditional compilation directives fall into two catagories,
+# "processed" and "other". The "other" directives are ignored and simply
+# output as they come in without changes (see 'keep' exception). The
+# "processed" variaty are evaluated and only the lines in the 'true' part
+# are kept, like cpp would do.
+#
+# If gentree knows the result of an expression, that directive will be
+# "processed", otherwise it will be an "other". gentree knows the value
+# of LINUX_VERSION_CODE, BTTV_VERSION_CODE, the KERNEL_VERSION(x,y,z)
+# macro, numeric constants like 0 and 1, and a few defines like MM_KERNEL
+# and STV0297_CS2.
+#
+# An exception is if the comment "/*KEEP*/" appears after the expression,
+# in which case that directive will be considered an "other" and not
+# processed, other than to remove the keep comment.
+#
+# Known bugs:
+# don't specify the root directory e.g. '/' or even '////'
+# directives continued with a back-slash will always be ignored
+# you can't modify a source tree in-place, i.e. source dir == dest dir
+
use strict;
use File::Find;
use Fcntl ':mode';
-my $VER = shift;
+my $VERSION = shift;
my $SRC = shift;
my $DESTDIR = shift;
-my $extra;
-
-
-#$VER = "2.6.14" if !defined($VER);
-#$SRC = "../linux" if !defined($SRC);
-#$DESTDIR = "/tmp/linux" if !defined($DESTDIR);
if (!defined($DESTDIR)) {
print "Usage:\ngentree.pl\t<version> <source dir> <dest dir>\n\n";
exit;
}
-my ($VERSION,$CODE) = &kernel_version;
+my $BTTVCODE = KERNEL_VERSION(0,9,17);
+my ($LINUXCODE, $extra) = kernel_version($VERSION);
my $DEBUG = 0;
+my %defs = (
+ 'LINUX_VERSION_CODE' => $LINUXCODE,
+ 'BTTV_VERSION_CODE' => $BTTVCODE,
+ '_COMPAT_H' => 0,
+ 'MM_KERNEL' => ($extra =~ /-mm/)?1:0,
+ 'BROKEN_XAWTV' => 0,
+ 'STV0297_CS2' => 0,
+ 'HAVE_VIDEO_BUF_DVB' => 1,
+ 'I2C_PEC' => 1,
+ 'I2C_DF_DUMMY' => 0,
+ 'CONFIG_XC3028' => 0,
+ 'I2C_CLASS_TV_ANALOG' => 1,
+ 'I2C_CLASS_TV_DIGITAL' => 1);
#################################################################
# helpers
-sub kernel_version() {
- my ($ver,$code);
-
- $code = 0;
- $ver = $VER;
-
- $ver =~ m/(\d)\.(\d)\.([0-9]*(.*))/;
- my $v1 = $1;
- my $v2 = $2;
- my $v3 = $3;
- $extra = $4;
-
- $code = $v1*65536 + $v2*256 + $v3;
+sub kernel_version($) {
+ $_[0] =~ m/(\d+)\.(\d+)\.(\d+)(.*)/;
+ return ($1*65536 + $2*256 + $3, $4);
+}
- return ($ver,$code);
+# used in eval()
+sub KERNEL_VERSION($$$) { return $_[0]*65536 + $_[1]*256 + $_[2]; }
+
+sub evalexp($) {
+ local $_ = shift;
+ s|/\*.*?\*/||go; # delete /* */ comments
+ s|//.*$||o; # delete // comments
+ s/\bdefined\s*\(/(/go; # defined(foo) to (foo)
+ while (/\b([_A-Za-z]\w*)\b/go) {
+ if (exists $defs{$1}) {
+ my $id = $1; my $pos = $-[0];
+ s/$id/$defs{$id}/;
+ pos = $-[0];
+ } elsif ($1 ne 'KERNEL_VERSION') {
+ return(undef);
+ }
+ }
+ return(eval($_) ? 1 : 0);
}
#################################################################
@@ -47,270 +98,116 @@ sub kernel_version() {
sub filter_source ($$) {
my ($in,$out) = @_;
- my ($line,$mmkernel);
+ my $line;
my $level=0;
my %if = ();
- my %state =();
- my $print=0;
+ my %state = ();
- if ($extra =~ m/\-mm/) {
- $mmkernel = 1;
- } else {
- $mmkernel = 0;
+ my @dbgargs = \($level, %state, %if, $line);
+ sub dbgline($\@) {
+ my $level = ${$_[1][0]};
+ printf STDERR ("/* BP %4d $_[0] state=$_[1][1]->{$level} if=$_[1][2]->{$level} level=$level (${$_[1][3]}) */\n", $.) if $DEBUG;
}
- open IN, "<$in";
- open OUT, ">$out";
+ open IN, '<', $in or die "Error opening $in: $!\n";
+ open OUT, '>', $out or die "Error opening $out: $!\n";
- print STDERR "File: $in, for kernel $VERSION($CODE)/\n" if $DEBUG;
+ print STDERR "File: $in, for kernel $VERSION($LINUXCODE)/\n" if $DEBUG;
while ($line = <IN>) {
- if ($line =~ m/^#include \"compat.h\"/) {
- next;
- }
-# if ($line =~ m/[\$]Id:/) {
-# next;
-# }
- if ($line =~ /^\s*#\s*ifdef\s+MM_KERNEL/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = $mmkernel;
- print STDERR "/* BP #if MM_KERNEL state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*ifdef\s+_COMPAT_H/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 0;
- print STDERR "/* BP #if MM_KERNEL state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ m|^\s*\#if\s+0\s*\/[\*]\s*[Kk][Ee].[Pp]\s*[\*]\/(.*)|) {
- if ($1 eq ";") {
- print OUT "#if 0\n";
- } else {
- print OUT "#if 0$1\n";
- }
- chomp($line);
- $state{$level} = "ifother";
- $if{$level} = 0;
- print STDERR "/* BP #if 0 (keep) state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*ifdef\s+STV0297_CS2/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 0;
- print STDERR "/* BP #if 0 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*ifndef\s+BROKEN_XAWTV/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 1;
- print STDERR "/* BP #if 0 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*ifndef\s+STV0297_CS2/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 1;
- print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*if\s+0/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 0;
- print STDERR "/* BP #if 0 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ m|^\s*\#if\s+1\s*\/[\*]\s*[Kk][Ee].[Pp]\s*[\*]\/(.*)|) {
- print OUT "#if 1$1\n";
- $state{$level} = "ifother";
- $if{$level} = 1;
- print STDERR "/* BP #if 1 (keep) state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*if\s+1/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 1;
- print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*if.*HAVE_VIDEO_BUF_DVB/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 1;
- print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*if.*CONFIG_XC3028/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 0;
- print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*if.*I2C_CLASS_TV_ANALOG/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 1;
- print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*ifndef.\s*I2C_DF_DUMMY/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 1;
- print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*ifndef.\s*I2C_PEC/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 0;
- print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*ifdef.\s*I2C_PEC/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 1;
- print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*if.*I2C_CLASS_TV_DIGITAL/) {
- chomp($line);
- $state{$level} = "if";
- $if{$level} = 1;
- print STDERR "/* BP #if 1 state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*if.*BTTV_VERSION_CODE/) {
- chomp($line);
- $line =~ s@^#if\s*@@;
- $line =~ s@BTTV_VERSION_CODE@\$CODE@;
- $line =~ s@KERNEL_VERSION\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)@
- sprintf("%d",$1*65536 + $2*256 + $3) @eg;
- $if{$level} = eval $line;
- $state{$level} = "if";
- print STDERR "/* BP #if BTTV_VERSION_CODE state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*if.*LINUX_VERSION_CODE/) {
- chomp($line);
- $line =~ s@^#if\s*@@;
- $line =~ s@LINUX_VERSION_CODE@\$CODE@;
-print STDERR "/* BP orig: ($line) */\n" if $DEBUG;
-
- $line =~ s@KERNEL_VERSION\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)@
- sprintf("%d",$1*65536 + $2*256 + $3) @eg;
- $if{$level} = eval $line;
- $state{$level} = "if";
- print STDERR "/* BP #if LINUX_VERSION_CODE state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- next;
- }
- if ($line =~ /^\s*#\s*if\s/) {
- $state{$level} = "ifother";
- $if{$level} = 1;
- print STDERR "/* BP $line state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
- $level++;
- }
+ chomp $line;
+ next if ($line =~ m/^#include \"compat.h\"/o);
+# next if ($line =~ m/[\$]Id:/);
- if ($line =~ /^\s*#\s*ifdef/) {
+ # For "#if 0 /*KEEP*/;" the ; should be dropped too
+ if ($line =~ m@^\s*#\s*if(n?def)?\s.*?(\s*/\*\s*(?i)keep\s*\*/;?)@) {
$state{$level} = "ifother";
$if{$level} = 1;
- print STDERR "/* BP $line state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
+ dbgline "#if$1 (keep)", @dbgargs;
+ $line =~ s/\Q$2\E//;
$level++;
}
-
- if ($line =~ /^\s*#\s*ifndef/) {
+ # handle all ifdef/ifndef lines
+ elsif ($line =~ /^\s*#\s*if(n?)def\s*(\w+)/o) {
+ if (exists $defs{$2}) {
+ $state{$level} = 'if';
+ $if{$level} = ($1 eq 'n') ? !$defs{$2} : $defs{$2};
+ dbgline "#if$1def $2", @dbgargs;
+ $level++;
+ next;
+ }
$state{$level} = "ifother";
$if{$level} = 1;
- print STDERR "/* BP $line state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
+ dbgline "#if$1def (other)", @dbgargs;
$level++;
}
-
- if ($level) {
- if ($state{$level-1} eq "if" && $line =~ /^\s*#\s*else/) {
- $state{$level-1} = "else";
- print STDERR "/* BP #else state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
+ # handle all ifs
+ elsif ($line =~ /^\s*#\s*if\s+(.*)$/o) {
+ my $res = evalexp($1);
+ if (defined $res) {
+ $state{$level} = 'if';
+ $if{$level} = $res;
+ dbgline '#if '.($res?'(yes)':'(no)'), @dbgargs;
+ $level++;
next;
- }
- }
- if ($line =~ /^\s*#\s*endif/) {
- if ($level) {
- $level--;
-
- print STDERR "/* BP #endif state=$state{$level} if=$if{$level} level=$level ($line) */\n" if $DEBUG;
} else {
- die "more endifs than ifs";
+ $state{$level} = 'ifother';
+ $if{$level} = 1;
+ dbgline '#if (other)', @dbgargs;
+ $level++;
}
- if ($state{$level} ne "ifother") {
+ }
+ # handle all elifs
+ elsif ($line =~ /^\s*#\s*elif\s+(.*)$/o) {
+ my $exp = $1;
+ $level--;
+ $level < 0 and die "more elifs than ifs";
+ $state{$level} =~ /if/ or die "unmatched elif";
+
+ if ($state{$level} eq 'if' && !$if{$level}) {
+ my $res = evalexp($exp);
+ defined $res or die 'moving from if to ifother';
+ $state{$level} = 'if';
+ $if{$level} = $res;
+ dbgline '#elif1 '.($res?'(yes)':'(no)'), @dbgargs;
+ $level++;
+ next;
+ } elsif ($state{$level} ne 'ifother') {
+ $if{$level} = 0;
+ $state{$level} = 'elif';
+ dbgline '#elif0', @dbgargs;
+ $level++;
next;
}
+ $level++;
}
- if ($level == 0) {
- print OUT $line;
- } else {
- my $i=0,$print=1;
- for ($i=0;$i<$level;$i++) {
- if (!($state{$i} eq "if" && $if{$i} ||
- $state{$i} eq "else" && !$if{$i}) &&
- $state{$i} ne "ifother" ) {
- $print=0;
- chomp($line);
- print STDERR "/* BP DEL $line state=$state{$i} if=$if{$i} level=$i */\n" if $DEBUG;
- }
- }
-
- if ($print) {
- print OUT $line;
- }
+ elsif ($line =~ /^\s*#\s*else/o) {
+ $level--;
+ $level < 0 and die "more elses than ifs";
+ $state{$level} =~ /if/ or die "unmatched else";
+ $if{$level} = !$if{$level} if ($state{$level} eq 'if');
+ $state{$level} =~ s/^if/else/o; # if -> else, ifother -> elseother, elif -> elif
+ dbgline '#else', @dbgargs;
+ $level++;
+ next if $state{$level-1} !~ /other$/o;
+ }
+ elsif ($line =~ /^\s*#\s*endif/o) {
+ $level--;
+ $level < 0 and die "more endifs than ifs";
+ dbgline '#endif', @dbgargs;
+ next if $state{$level} !~ /other$/o;
}
- }
- close IN;
- close OUT;
-}
-
-sub filter_dest ($$) {
- my ($in,$out) = @_;
- my ($line,$if,$state,$mmkernel);
-
- if ($extra =~ "/\-mm/") {
- $mmkernel = 1;
- } else {
- $mmkernel = 0;
- }
-
- open IN, "<$in";
- open OUT, ">$out";
- while ($line = <IN>) {
- if ($line =~ m/[\$]Id:.*/) {
- next;
+ my $print = 1;
+ for (my $i=0;$i<$level;$i++) {
+ next if $state{$i} =~ /other$/o; # keep code in ifother/elseother blocks
+ if (!$if{$i}) {
+ $print = 0;
+ dbgline 'DEL', @{[\$i, \%state, \%if, \$line]};
+ last;
+ }
}
- print OUT $line;
+ print OUT "$line\n" if $print;
}
close IN;
close OUT;
@@ -320,54 +217,36 @@ sub filter_dest ($$) {
sub parse_dir {
my $file = $File::Find::name;
- my $srcdir=$SRC;
- if ($file =~ /CVS/) {
- return;
- }
+ return if ($file =~ /CVS/);
+ return if ($file =~ /~$/);
- if ($file =~ /\~$/) {
- return;
- }
-
- my $mode = (lstat("$file"))[2];
+ my $f2 = $file;
+ $f2 =~ s/^\Q$SRC\E/$DESTDIR/;
+ my $mode = (stat($file))[2];
if ($mode & S_IFDIR) {
+ print("mkdir -p '$f2'\n");
+ system("mkdir -p '$f2'"); # should check for error
return;
}
-
- $srcdir =~ s/(.)/\[$1\]/g;
- my $f2 = $file;
-
- $f2 =~ s,^$srcdir,$DESTDIR/,;
print "from $file to $f2\n";
- my $tmp = "/tmp/src.$$";
if ($file =~ m/.*\.[ch]$/) {
- filter_source("$file","$tmp");
+ filter_source($file, $f2);
} else {
- system("cp $file $tmp");
+ system("cp $file $f2");
}
-
- my $dir = $f2;
- $dir =~ s,(.*)[/][^/]*$,$1,;
-
- print("mkdir -p $dir\n");
- system("mkdir -p $dir\n");
- system("cp $tmp $f2");
- unlink $tmp;
}
# main
-my $patchtmploc = "/tmp/temp.patch";
+printf "kernel is %s (0x%x)\n",$VERSION,$LINUXCODE;
-printf <<EOF,$VER,$CODE;
-kernel is %s (0x%x)
-EOF
+# remove any trailing slashes from dir names. don't pass in just '/'
+$SRC =~ s|/*$||; $DESTDIR =~ s|/*$||;
print "finding files at $SRC\n";
-
-find(\&parse_dir, $SRC);
+find({wanted => \&parse_dir, no_chdir => 1}, $SRC);
diff --git a/v4l/versions.txt b/v4l/versions.txt
index e30a74e85..f29387417 100644
--- a/v4l/versions.txt
+++ b/v4l/versions.txt
@@ -36,13 +36,9 @@ TUNER_3036
# Changes to usb_input.h, struct input_dev
[2.6.15]
-USB_KONICAWC
-USB_QUICKCAM_MESSENGER
# Uses vm_insert_page()
[2.6.15]
-USB_ZC0301
-USB_ET61X251
[2.6.12]
VIDEO_VIVI
@@ -215,3 +211,8 @@ RADIO_ZOLTRIX
USB_SN9C102
VIDEO_SAA7110
SOUND_ACI_MIXER
+USB_KONICAWC
+USB_QUICKCAM_MESSENGER
+USB_ZC0301
+USB_ET61X251
+USB_ZR364XX
diff --git a/v4l2-apps/util/v4l2-ctl.cpp b/v4l2-apps/util/v4l2-ctl.cpp
index 9229732ac..11af185f7 100644
--- a/v4l2-apps/util/v4l2-ctl.cpp
+++ b/v4l2-apps/util/v4l2-ctl.cpp
@@ -1450,7 +1450,7 @@ int main(int argc, char **argv)
struct v4l2_ext_control ctrl = { 0 };
ctrl.id = ctrl_str2id[iter->first];
- ctrl.value = atol(iter->second.c_str());
+ ctrl.value = strtol(iter->second.c_str(), NULL, 0);
if (V4L2_CTRL_ID2CLASS(ctrl.id) == V4L2_CTRL_CLASS_MPEG)
mpeg_ctrls.push_back(ctrl);
else