dect
/
linux-2.6
Archived
13
0
Fork 0

v4l-dvb: remove legacy checks to allow support for kernels < 2.6.10

Also remove some blank lines that were used to split compat code at -devel
tree.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
Hans Verkuil 2008-07-18 00:50:58 -03:00 committed by Mauro Carvalho Chehab
parent e01117c816
commit f87086e302
58 changed files with 19 additions and 95 deletions

View File

@ -66,7 +66,6 @@ void ir_input_init(struct input_dev *dev, struct ir_input_state *ir,
if (ir_codes)
memcpy(ir->ir_codes, ir_codes, sizeof(ir->ir_codes));
dev->keycode = ir->ir_codes;
dev->keycodesize = sizeof(IR_KEYTAB_TYPE);
dev->keycodemax = IR_KEYTAB_SIZE;

View File

@ -20,11 +20,7 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d)
}
strncpy(d->i2c_adap.name, d->desc->name, sizeof(d->i2c_adap.name));
#ifdef I2C_ADAP_CLASS_TV_DIGITAL
d->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL,
#else
d->i2c_adap.class = I2C_CLASS_TV_DIGITAL,
#endif
d->i2c_adap.algo = d->props.i2c_algo;
d->i2c_adap.algo_data = NULL;
d->i2c_adap.dev.parent = &d->udev->dev;

View File

@ -2471,11 +2471,7 @@ static int __devinit av7110_attach(struct saa7146_dev* dev,
get recognized before the main driver is fully loaded */
saa7146_write(dev, GPIO_CTRL, 0x500000);
#ifdef I2C_ADAP_CLASS_TV_DIGITAL
av7110->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL;
#else
av7110->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
#endif
strlcpy(av7110->i2c_adap.name, pci_ext->ext_priv, sizeof(av7110->i2c_adap.name));
saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */

View File

@ -497,11 +497,7 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
if (bi->type != BUDGET_FS_ACTIVY)
saa7146_write(dev, GPIO_CTRL, 0x500000); /* GPIO 3 = 1 */
#ifdef I2C_ADAP_CLASS_TV_DIGITAL
budget->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL;
#else
budget->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
#endif
strlcpy(budget->i2c_adap.name, budget->card->name, sizeof(budget->i2c_adap.name));

View File

@ -1693,11 +1693,7 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
i2c_set_adapdata(&ttusb->i2c_adap, ttusb);
#ifdef I2C_ADAP_CLASS_TV_DIGITAL
ttusb->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL;
#else
ttusb->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
#endif
ttusb->i2c_adap.algo = &ttusb_dec_algo;
ttusb->i2c_adap.algo_data = NULL;
ttusb->i2c_adap.dev.parent = &udev->dev;

View File

@ -179,7 +179,6 @@ static int bt832_attach(struct i2c_adapter *adap, int addr, int kind)
v4l_info(&t->client,"chip found @ 0x%x\n", addr<<1);
if(! bt832_init(&t->client)) {
bt832_detach(&t->client);
return -1;

View File

@ -299,7 +299,6 @@ extern int bttv_write_gpio(unsigned int card,
/* ---------------------------------------------------------- */
/* sysfs/driver-moded based gpio access interface */
struct bttv_sub_device {
struct device dev;
struct bttv_core *core;

View File

@ -39,7 +39,6 @@
#include <linux/scatterlist.h>
#include <asm/io.h>
#include <media/v4l2-common.h>
#include <linux/device.h>
#include <media/videobuf-dma-sg.h>
#include <media/tveeprom.h>
@ -263,12 +262,10 @@ extern struct videobuf_queue_ops bttv_vbi_qops;
/* ---------------------------------------------------------- */
/* bttv-gpio.c */
extern struct bus_type bttv_sub_bus_type;
int bttv_sub_add_device(struct bttv_core *core, char *name);
int bttv_sub_del_devices(struct bttv_core *core);
/* ---------------------------------------------------------- */
/* bttv-driver.c */

View File

@ -173,4 +173,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.probe = cs5345_probe,
.id_table = cs5345_id,
};

View File

@ -43,7 +43,6 @@ MODULE_PARM_DESC(debug, "Debugging messages\n\t\t\t0=Off (default), 1=On");
static unsigned short normal_i2c[] = { 0x22 >> 1, I2C_CLIENT_END };
I2C_CLIENT_INSMOD;
/* ----------------------------------------------------------------------- */
@ -189,4 +188,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.probe = cs53l32a_probe,
.id_table = cs53l32a_id,
};

View File

@ -230,9 +230,7 @@ struct cx18_dvb {
struct dvb_net dvbnet;
int enabled;
int feeding;
struct mutex feedlock;
};
struct cx18; /* forward reference */

View File

@ -39,10 +39,6 @@
#define GETSCL_BIT 0x0004
#define GETSDL_BIT 0x0008
#ifndef I2C_ADAP_CLASS_TV_ANALOG
#define I2C_ADAP_CLASS_TV_ANALOG I2C_CLASS_TV_ANALOG
#endif
#define CX18_CS5345_I2C_ADDR 0x4c
/* This array should match the CX18_HW_ defines */

View File

@ -50,7 +50,6 @@ MODULE_LICENSE("GPL");
static unsigned short normal_i2c[] = { 0x88 >> 1, I2C_CLIENT_END };
int cx25840_debug;
module_param_named(debug,cx25840_debug, int, 0644);

View File

@ -82,7 +82,6 @@ typedef struct cx88_audio_dev snd_cx88_card_t;
/****************************************************************************
Module global static vars
****************************************************************************/

View File

@ -103,7 +103,6 @@ static int attach_inform(struct i2c_client *client)
dprintk(1, "%s i2c attach [addr=0x%x,client=%s]\n",
client->driver->driver.name, client->addr, client->name);
return 0;
}

View File

@ -30,7 +30,6 @@
#include "cx88.h"
#include "cx88-vp3054-i2c.h"
MODULE_DESCRIPTION("driver for cx2388x VP3054 design");
MODULE_AUTHOR("Chris Pascoe <c.pascoe@itee.uq.edu.au>");
MODULE_LICENSE("GPL");

View File

@ -432,7 +432,6 @@ static u32 functionality(struct i2c_adapter *adap)
return I2C_FUNC_SMBUS_EMUL;
}
/*
* attach_inform()
* gets called when a device attaches to the i2c bus

View File

@ -2186,3 +2186,4 @@ module_exit(sd_mod_exit);
module_param(frame_rate, int, 0644);
MODULE_PARM_DESC(frame_rate, "Frame rate (5, 10, 15, 20 or 30 fps)");

View File

@ -635,7 +635,6 @@ struct ivtv {
spinlock_t lock; /* lock access to this struct */
struct mutex serialize_lock; /* mutex used to serialize open/close/start/stop/ioctl operations */
/* Streams */
int stream_buf_size[IVTV_MAX_STREAMS]; /* stream buffer size */
struct ivtv_stream streams[IVTV_MAX_STREAMS]; /* stream data */

View File

@ -75,10 +75,6 @@
#define IVTV_REG_I2C_GETSCL_OFFSET 0x7008
#define IVTV_REG_I2C_GETSDA_OFFSET 0x700c
#ifndef I2C_ADAP_CLASS_TV_ANALOG
#define I2C_ADAP_CLASS_TV_ANALOG I2C_CLASS_TV_ANALOG
#endif /* I2C_ADAP_CLASS_TV_ANALOG */
#define IVTV_CS53L32A_I2C_ADDR 0x11
#define IVTV_M52790_I2C_ADDR 0x48
#define IVTV_CX25840_I2C_ADDR 0x44

View File

@ -171,4 +171,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.remove = m52790_remove,
.id_table = m52790_id,
};

View File

@ -110,6 +110,7 @@ MODULE_PARM_DESC(dolby, "Activates Dolby processsing");
/* Addresses to scan */
static unsigned short normal_i2c[] = { 0x80 >> 1, 0x88 >> 1, I2C_CLIENT_END };
I2C_CLIENT_INSMOD;
/* ----------------------------------------------------------------------- */
@ -333,7 +334,6 @@ void msp_set_audio(struct i2c_client *client)
/* ------------------------------------------------------------------------ */
static void msp_wake_thread(struct i2c_client *client)
{
struct msp_state *state = i2c_get_clientdata(client);
@ -1004,7 +1004,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.id_table = msp_id,
};
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* ---------------------------------------------------------------------------

View File

@ -480,7 +480,6 @@ int msp3400c_thread(void *data)
struct msp3400c_carrier_detect *cd;
int count, max1, max2, val1, val2, val, i;
v4l_dbg(1, msp_debug, client, "msp3400 daemon started\n");
set_freezable();
for (;;) {

View File

@ -1255,7 +1255,6 @@ int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor)
exactly the same otherwise.
*/
/* define local variable for arg */
#define ARG_DEF(ARG_type, ARG_name)\
ARG_type *ARG_name = arg;
@ -1268,7 +1267,6 @@ int pwc_get_cmos_sensor(struct pwc_device *pdev, int *sensor)
/* copy local variable to arg */
#define ARG_OUT(ARG_name) /* nothing */
int pwc_ioctl(struct pwc_device *pdev, unsigned int cmd, void *arg)
{
int ret = 0;

View File

@ -54,7 +54,6 @@
#include <linux/types.h>
#include <linux/version.h>
/* Enumeration of image sizes */
#define PSZ_SQCIF 0x00
#define PSZ_QSIF 0x01

View File

@ -66,6 +66,7 @@ static struct video_device saa_template; /* Declared near bottom */
/* Addresses to scan */
static unsigned short normal_i2c[] = { I2C_ADDRESS, I2C_CLIENT_END };
I2C_CLIENT_INSMOD;
static struct i2c_client client_template;

View File

@ -130,6 +130,7 @@ static struct video_device saa_template; /* Declared near bottom */
/* Addresses to scan */
static unsigned short normal_i2c[] = {34>>1,I2C_CLIENT_END};
I2C_CLIENT_INSMOD;
static struct i2c_client client_template;

View File

@ -31,7 +31,6 @@
#include <linux/wait.h>
#include <asm/uaccess.h>
#include <media/rds.h>
/* Addresses to scan */

View File

@ -67,7 +67,6 @@ static unsigned short normal_i2c[] = {
0x42 >> 1, 0x40 >> 1, /* SAA7114, SAA7115 and SAA7118 */
I2C_CLIENT_END };
I2C_CLIENT_INSMOD;
struct saa711x_state {
@ -1577,4 +1576,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.legacy_class = I2C_CLASS_TV_ANALOG | I2C_CLASS_TV_DIGITAL,
.id_table = saa7115_id,
};

View File

@ -753,4 +753,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.remove = saa7127_remove,
.id_table = saa7127_id,
};

View File

@ -13,7 +13,6 @@
#include <linux/init.h>
#include <linux/crc32.h>
#define MPEG_VIDEO_TARGET_BITRATE_MAX 27000
#define MPEG_VIDEO_MAX_BITRATE_MAX 27000
#define MPEG_TOTAL_TARGET_BITRATE_MAX 27000
@ -21,6 +20,7 @@
/* Addresses to scan */
static unsigned short normal_i2c[] = {0x20, I2C_CLIENT_END};
I2C_CLIENT_INSMOD;
MODULE_DESCRIPTION("device driver for saa6752hs MPEG2 encoder");
@ -707,7 +707,6 @@ static int saa6752hs_attach(struct i2c_adapter *adap, int addr, int kind)
i2c_attach_client(&h->client);
v4l_info(&h->client,"saa6752hs: chip found @ 0x%x\n", addr<<1);
return 0;
}

View File

@ -80,7 +80,6 @@ typedef struct snd_card_saa7134 {
} snd_card_saa7134_t;
/*
* PCM structure
*/
@ -1121,6 +1120,3 @@ late_initcall(saa7134_alsa_init);
module_exit(saa7134_alsa_exit);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ricardo Cerqueira");

View File

@ -4220,6 +4220,7 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_tv,
.vmux = 1,
@ -4246,7 +4247,6 @@ struct saa7134_board saa7134_boards[] = {
.radio_type = UNSET,
.tuner_addr = ADDR_UNSET,
.radio_addr = ADDR_UNSET,
.mpeg = SAA7134_MPEG_DVB,
.inputs = {{
.name = name_tv,
.vmux = 1,

View File

@ -150,7 +150,6 @@ void saa7134_set_gpio(struct saa7134_dev *dev, int bit_no, int value)
#if defined(CONFIG_MODULES) && defined(MODULE)
static void request_module_async(struct work_struct *work){
struct saa7134_dev* dev = container_of(work, struct saa7134_dev, request_module_wk);
if (card_is_empress(dev))

View File

@ -477,7 +477,6 @@ static int tvaudio_thread(void *data)
unsigned int i, audio, nscan;
int max1,max2,carrier,rx,mode,lastmode,default_carrier;
set_freezable();
for (;;) {
@ -775,7 +774,6 @@ static int tvaudio_thread_ddep(void *data)
struct saa7134_dev *dev = data;
u32 value, norms;
set_freezable();
for (;;) {
tvaudio_sleep(dev,-1);

View File

@ -72,6 +72,7 @@ static unsigned short normal_i2c[] = {
I2C_ADDR_TDA7432 >> 1,
I2C_CLIENT_END,
};
I2C_CLIENT_INSMOD;
/* Structure of address and subaddresses for the tda7432 */

View File

@ -34,6 +34,7 @@
static int debug; /* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
#define dprintk(args...) \
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __func__, __LINE__); printk(args); } } while (0)

View File

@ -30,7 +30,6 @@
#include <linux/i2c.h>
#include <linux/init.h>
#include <media/i2c-addr.h>
static int debug; /* insmod parameter */
@ -42,6 +41,7 @@ static unsigned short normal_i2c[] = {
I2C_ADDR_TDA9875 >> 1,
I2C_CLIENT_END
};
I2C_CLIENT_INSMOD;
/* This is a superset of the TDA9875 */

View File

@ -36,6 +36,7 @@
static int debug; /* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
#define dprintk(args...) \
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __func__, __LINE__); printk(args); } } while (0)

View File

@ -36,6 +36,7 @@
static int debug; /* insmod parameter */
module_param(debug, int, 0644);
MODULE_PARM_DESC(debug, "Turn on/off device debugging (default:off).");
#define dprintk(args...) \
do { if (debug) { printk("%s: %s()[%d]: ", KBUILD_MODNAME, __func__, __LINE__); printk(args); } } while (0)

View File

@ -39,7 +39,6 @@ MODULE_LICENSE("GPL");
static unsigned short normal_i2c[] = { 0x34 >> 1, I2C_CLIENT_END };
I2C_CLIENT_INSMOD;
/* ----------------------------------------------------------------------- */

View File

@ -1298,7 +1298,6 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.id_table = tuner_id,
};
/*
* Overrides for Emacs so that we follow Linus's tabbing style.
* ---------------------------------------------------------------------------

View File

@ -169,7 +169,6 @@ static void usbvision_rvfree(void *mem, unsigned long size)
}
#if ENABLE_HEXDUMP
static void usbvision_hexdump(const unsigned char *data, int len)
{
@ -2317,7 +2316,6 @@ static void usbvision_powerOffTimer(unsigned long data)
del_timer(&usbvision->powerOffTimer);
INIT_WORK(&usbvision->powerOffWork, call_usbvision_power_off);
(void) schedule_work(&usbvision->powerOffWork);
}
void usbvision_init_powerOffTimer(struct usb_usbvision *usbvision)
@ -2518,7 +2516,6 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
}
}
/* Submit all URBs */
for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) {
errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb,
@ -2564,7 +2561,6 @@ void usbvision_stop_isoc(struct usb_usbvision *usbvision)
usbvision->sbuf[bufIdx].urb = NULL;
}
PDEBUG(DBG_ISOC, "%s: streaming=Stream_Off\n", __func__);
usbvision->streaming = Stream_Off;

View File

@ -190,7 +190,6 @@ static u32 functionality(struct i2c_adapter *adap)
return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR;
}
/* -----exported algorithm data: ------------------------------------- */
static struct i2c_algorithm usbvision_algo = {
@ -514,11 +513,7 @@ static struct i2c_adapter i2c_adap_template = {
.id = I2C_HW_B_BT848, /* FIXME */
.client_register = attach_inform,
.client_unregister = detach_inform,
#ifdef I2C_ADAP_CLASS_TV_ANALOG
.class = I2C_ADAP_CLASS_TV_ANALOG,
#else
.class = I2C_CLASS_TV_ANALOG,
#endif
};
static struct i2c_client i2c_client_template = {

View File

@ -179,7 +179,6 @@ MODULE_ALIAS(DRIVER_ALIAS);
/* /sys/bus/usb/drivers/USBVision Video Grabber */
/*****************************************************************************/
#define YES_NO(x) ((x) ? "Yes" : "No")
static inline struct usb_usbvision *cd_to_usbvision(struct device *cd)
@ -370,7 +369,6 @@ static void usbvision_remove_sysfs(struct video_device *vdev)
}
}
/*
* usbvision_open()
*
@ -388,7 +386,6 @@ static int usbvision_v4l2_open(struct inode *inode, struct file *file)
PDEBUG(DBG_IO, "open");
usbvision_reset_powerOffTimer(usbvision);
if (usbvision->user)
@ -442,9 +439,6 @@ static int usbvision_v4l2_open(struct inode *inode, struct file *file)
mutex_unlock(&usbvision->lock);
}
if (errCode) {
}
/* prepare queues */
usbvision_empty_framequeues(usbvision);
@ -495,8 +489,6 @@ static int usbvision_v4l2_close(struct inode *inode, struct file *file)
}
PDEBUG(DBG_IO, "success");
return 0;
}
@ -1346,9 +1338,7 @@ static int usbvision_radio_close(struct inode *inode, struct file *file)
usbvision_release(usbvision);
}
PDEBUG(DBG_IO, "success");
return errCode;
}
@ -1360,7 +1350,6 @@ static int usbvision_vbi_open(struct inode *inode, struct file *file)
{
/* TODO */
return -ENODEV;
}
static int usbvision_vbi_close(struct inode *inode, struct file *file)
@ -1899,7 +1888,6 @@ static void __devexit usbvision_disconnect(struct usb_interface *intf)
}
PDEBUG(DBG_PROBE, "success");
}
static struct usb_driver usbvision_driver = {

View File

@ -1254,3 +1254,4 @@ void uvc_ctrl_init(void)
for (; mapping < mend; ++mapping)
uvc_ctrl_add_mapping(mapping);
}

View File

@ -1954,3 +1954,4 @@ MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");
MODULE_VERSION(DRIVER_VERSION);

View File

@ -475,3 +475,4 @@ struct uvc_buffer *uvc_queue_next_buffer(struct uvc_video_queue *queue,
wake_up(&buf->wait);
return nextbuf;
}

View File

@ -205,3 +205,4 @@ int uvc_status_resume(struct uvc_device *dev)
return usb_submit_urb(dev->int_urb, GFP_NOIO);
}

View File

@ -1103,3 +1103,4 @@ struct file_operations uvc_fops = {
.mmap = uvc_v4l2_mmap,
.poll = uvc_v4l2_poll,
};

View File

@ -964,3 +964,4 @@ int uvc_video_enable(struct uvc_video_device *video, int enable)
return uvc_init_video(video, GFP_KERNEL);
}

View File

@ -796,3 +796,4 @@ void uvc_video_decode_isight(struct urb *urb, struct uvc_video_device *video,
#endif /* __KERNEL__ */
#endif

View File

@ -13,7 +13,6 @@
* (at your option) any later version.
*/
#include <linux/module.h>
#include <linux/init.h>
#include <linux/device.h>
@ -257,4 +256,3 @@ EXPORT_SYMBOL(videobuf_dvb_unregister);
* compile-command: "make DVB=1"
* End:
*/

View File

@ -166,4 +166,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.remove = vp27smpx_remove,
.id_table = vp27smpx_id,
};

View File

@ -327,4 +327,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.remove = wm8739_remove,
.id_table = wm8739_id,
};

View File

@ -42,7 +42,6 @@ MODULE_LICENSE("GPL");
static unsigned short normal_i2c[] = { 0x36 >> 1, I2C_CLIENT_END };
I2C_CLIENT_INSMOD;
@ -230,4 +229,3 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = {
.remove = wm8775_remove,
.id_table = wm8775_id,
};

View File

@ -55,8 +55,7 @@
#include <linux/types.h>
#include <linux/version.h>
/* Enumeration of image sizes */
/* Enumeration of image sizes */
#define PSZ_SQCIF 0x00
#define PSZ_QSIF 0x01
#define PSZ_QCIF 0x02

View File

@ -68,7 +68,6 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client)
if (err)
return err;
kfree(client);
return 0;
}