forked from luck/tmp_suning_uos_patched
V4L/DVB (4941): Remove LINUX_VERSION_CODE and fix identations
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
This commit is contained in:
parent
7ca659e3c1
commit
a1ed551cdb
@ -47,8 +47,8 @@
|
|||||||
#include <media/tuner.h>
|
#include <media/tuner.h>
|
||||||
#include <media/audiochip.h>
|
#include <media/audiochip.h>
|
||||||
|
|
||||||
#include <linux/moduleparam.h>
|
#include <linux/moduleparam.h>
|
||||||
#include <linux/workqueue.h>
|
#include <linux/workqueue.h>
|
||||||
|
|
||||||
#ifdef CONFIG_KMOD
|
#ifdef CONFIG_KMOD
|
||||||
#include <linux/kmod.h>
|
#include <linux/kmod.h>
|
||||||
@ -1397,7 +1397,7 @@ static int usbvision_compress_isochronous(struct usb_usbvision *usbvision,
|
|||||||
return totlen;
|
return totlen;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void usbvision_isocIrq(struct urb *urb, struct pt_regs *regs)
|
static void usbvision_isocIrq(struct urb *urb)
|
||||||
{
|
{
|
||||||
int errCode = 0;
|
int errCode = 0;
|
||||||
int len;
|
int len;
|
||||||
@ -1529,7 +1529,7 @@ int usbvision_write_reg(struct usb_usbvision *usbvision, unsigned char reg,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void usbvision_ctrlUrb_complete(struct urb *urb, struct pt_regs *regs)
|
static void usbvision_ctrlUrb_complete(struct urb *urb)
|
||||||
{
|
{
|
||||||
struct usb_usbvision *usbvision = (struct usb_usbvision *)urb->context;
|
struct usb_usbvision *usbvision = (struct usb_usbvision *)urb->context;
|
||||||
|
|
||||||
@ -2416,11 +2416,7 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
|
|||||||
int j, k;
|
int j, k;
|
||||||
struct urb *urb;
|
struct urb *urb;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
|
||||||
urb = usb_alloc_urb(USBVISION_URB_FRAMES);
|
|
||||||
#else
|
|
||||||
urb = usb_alloc_urb(USBVISION_URB_FRAMES, GFP_KERNEL);
|
|
||||||
#endif
|
|
||||||
if (urb == NULL) {
|
if (urb == NULL) {
|
||||||
err("%s: usb_alloc_urb() failed", __FUNCTION__);
|
err("%s: usb_alloc_urb() failed", __FUNCTION__);
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
@ -2429,12 +2425,8 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
|
|||||||
urb->dev = dev;
|
urb->dev = dev;
|
||||||
urb->context = usbvision;
|
urb->context = usbvision;
|
||||||
urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp);
|
urb->pipe = usb_rcvisocpipe(dev, usbvision->video_endp);
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
|
||||||
urb->transfer_flags = USB_ISO_ASAP;
|
|
||||||
#else
|
|
||||||
urb->transfer_flags = URB_ISO_ASAP;
|
urb->transfer_flags = URB_ISO_ASAP;
|
||||||
urb->interval = 1;
|
urb->interval = 1;
|
||||||
#endif
|
|
||||||
urb->transfer_buffer = usbvision->sbuf[bufIdx].data;
|
urb->transfer_buffer = usbvision->sbuf[bufIdx].data;
|
||||||
urb->complete = usbvision_isocIrq;
|
urb->complete = usbvision_isocIrq;
|
||||||
urb->number_of_packets = USBVISION_URB_FRAMES;
|
urb->number_of_packets = USBVISION_URB_FRAMES;
|
||||||
@ -2450,11 +2442,7 @@ int usbvision_init_isoc(struct usb_usbvision *usbvision)
|
|||||||
|
|
||||||
/* Submit all URBs */
|
/* Submit all URBs */
|
||||||
for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) {
|
for (bufIdx = 0; bufIdx < USBVISION_NUMSBUF; bufIdx++) {
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
|
||||||
errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb);
|
|
||||||
#else
|
|
||||||
errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb, GFP_KERNEL);
|
errCode = usb_submit_urb(usbvision->sbuf[bufIdx].urb, GFP_KERNEL);
|
||||||
#endif
|
|
||||||
if (errCode) {
|
if (errCode) {
|
||||||
err("%s: usb_submit_urb(%d) failed: error %d", __FUNCTION__, bufIdx, errCode);
|
err("%s: usb_submit_urb(%d) failed: error %d", __FUNCTION__, bufIdx, errCode);
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
#include <linux/delay.h>
|
#include <linux/delay.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
#include <linux/version.h>
|
#include <linux/version.h>
|
||||||
#include <linux/utsname.h>
|
#include <linux/utsname.h>
|
||||||
#include <linux/init.h>
|
#include <linux/init.h>
|
||||||
#include <asm/uaccess.h>
|
#include <asm/uaccess.h>
|
||||||
#include <linux/ioport.h>
|
#include <linux/ioport.h>
|
||||||
@ -350,13 +350,9 @@ static int detach_inform(struct i2c_client *client)
|
|||||||
{
|
{
|
||||||
struct usb_usbvision *usbvision;
|
struct usb_usbvision *usbvision;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
|
usbvision = (struct usb_usbvision *)i2c_get_adapdata(client->adapter);
|
||||||
usbvision = (struct usb_usbvision *)client->adapter->data;
|
|
||||||
#else
|
|
||||||
usbvision = (struct usb_usbvision *)i2c_get_adapdata(client->adapter);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
PDEBUG(DBG_I2C,"usbvision[%d] detaches %s", usbvision->nr, client->name);
|
PDEBUG(DBG_I2C,"usbvision[%d] detaches %s", usbvision->nr, client->name);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -548,9 +544,9 @@ static struct i2c_adapter i2c_adap_template = {
|
|||||||
.algo_data = NULL,
|
.algo_data = NULL,
|
||||||
.client_register = attach_inform,
|
.client_register = attach_inform,
|
||||||
.client_unregister = detach_inform,
|
.client_unregister = detach_inform,
|
||||||
#if defined (I2C_ADAP_CLASS_TV_ANALOG)
|
#ifdef I2C_ADAP_CLASS_TV_ANALOG
|
||||||
.class = I2C_ADAP_CLASS_TV_ANALOG,
|
.class = I2C_ADAP_CLASS_TV_ANALOG,
|
||||||
#elif defined (I2C_CLASS_TV_ANALOG)
|
#else
|
||||||
.class = I2C_CLASS_TV_ANALOG,
|
.class = I2C_CLASS_TV_ANALOG,
|
||||||
#endif
|
#endif
|
||||||
};
|
};
|
||||||
|
@ -68,8 +68,8 @@
|
|||||||
#include <media/tuner.h>
|
#include <media/tuner.h>
|
||||||
#include <media/audiochip.h>
|
#include <media/audiochip.h>
|
||||||
|
|
||||||
#include <linux/moduleparam.h>
|
#include <linux/moduleparam.h>
|
||||||
#include <linux/workqueue.h>
|
#include <linux/workqueue.h>
|
||||||
|
|
||||||
#ifdef CONFIG_KMOD
|
#ifdef CONFIG_KMOD
|
||||||
#include <linux/kmod.h>
|
#include <linux/kmod.h>
|
||||||
@ -189,8 +189,8 @@ MODULE_PARM_DESC(CustomDevice, " Define the fine tuning parameters for the devic
|
|||||||
MODULE_AUTHOR(DRIVER_AUTHOR);
|
MODULE_AUTHOR(DRIVER_AUTHOR);
|
||||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||||
MODULE_LICENSE(DRIVER_LICENSE);
|
MODULE_LICENSE(DRIVER_LICENSE);
|
||||||
MODULE_VERSION(USBVISION_VERSION_STRING);
|
MODULE_VERSION(USBVISION_VERSION_STRING);
|
||||||
MODULE_ALIAS(DRIVER_ALIAS);
|
MODULE_ALIAS(DRIVER_ALIAS);
|
||||||
|
|
||||||
|
|
||||||
/****************************************************************************************/
|
/****************************************************************************************/
|
||||||
@ -1430,9 +1430,7 @@ static int usbvision_vbi_ioctl(struct inode *inode, struct file *file,
|
|||||||
|
|
||||||
// Video template
|
// Video template
|
||||||
static struct file_operations usbvision_fops = {
|
static struct file_operations usbvision_fops = {
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31)
|
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
#endif
|
|
||||||
.open = usbvision_v4l2_open,
|
.open = usbvision_v4l2_open,
|
||||||
.release = usbvision_v4l2_close,
|
.release = usbvision_v4l2_close,
|
||||||
.read = usbvision_v4l2_read,
|
.read = usbvision_v4l2_read,
|
||||||
@ -1441,25 +1439,19 @@ static struct file_operations usbvision_fops = {
|
|||||||
.llseek = no_llseek,
|
.llseek = no_llseek,
|
||||||
};
|
};
|
||||||
static struct video_device usbvision_video_template = {
|
static struct video_device usbvision_video_template = {
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31)
|
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
#endif
|
|
||||||
.type = VID_TYPE_TUNER | VID_TYPE_CAPTURE,
|
.type = VID_TYPE_TUNER | VID_TYPE_CAPTURE,
|
||||||
.hardware = VID_HARDWARE_USBVISION,
|
.hardware = VID_HARDWARE_USBVISION,
|
||||||
.fops = &usbvision_fops,
|
.fops = &usbvision_fops,
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
|
||||||
.name = "usbvision-video",
|
.name = "usbvision-video",
|
||||||
.release = video_device_release,
|
.release = video_device_release,
|
||||||
#endif
|
|
||||||
.minor = -1,
|
.minor = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Radio template
|
// Radio template
|
||||||
static struct file_operations usbvision_radio_fops = {
|
static struct file_operations usbvision_radio_fops = {
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31)
|
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
#endif
|
|
||||||
.open = usbvision_radio_open,
|
.open = usbvision_radio_open,
|
||||||
.release = usbvision_radio_close,
|
.release = usbvision_radio_close,
|
||||||
.ioctl = usbvision_radio_ioctl,
|
.ioctl = usbvision_radio_ioctl,
|
||||||
@ -1468,25 +1460,19 @@ static struct file_operations usbvision_radio_fops = {
|
|||||||
|
|
||||||
static struct video_device usbvision_radio_template=
|
static struct video_device usbvision_radio_template=
|
||||||
{
|
{
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31)
|
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
#endif
|
|
||||||
.type = VID_TYPE_TUNER,
|
.type = VID_TYPE_TUNER,
|
||||||
.hardware = VID_HARDWARE_USBVISION,
|
.hardware = VID_HARDWARE_USBVISION,
|
||||||
.fops = &usbvision_radio_fops,
|
.fops = &usbvision_radio_fops,
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
|
||||||
.release = video_device_release,
|
.release = video_device_release,
|
||||||
.name = "usbvision-radio",
|
.name = "usbvision-radio",
|
||||||
#endif
|
|
||||||
.minor = -1,
|
.minor = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// vbi template
|
// vbi template
|
||||||
static struct file_operations usbvision_vbi_fops = {
|
static struct file_operations usbvision_vbi_fops = {
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31)
|
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
#endif
|
|
||||||
.open = usbvision_vbi_open,
|
.open = usbvision_vbi_open,
|
||||||
.release = usbvision_vbi_close,
|
.release = usbvision_vbi_close,
|
||||||
.ioctl = usbvision_vbi_ioctl,
|
.ioctl = usbvision_vbi_ioctl,
|
||||||
@ -1495,16 +1481,12 @@ static struct file_operations usbvision_vbi_fops = {
|
|||||||
|
|
||||||
static struct video_device usbvision_vbi_template=
|
static struct video_device usbvision_vbi_template=
|
||||||
{
|
{
|
||||||
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,31)
|
|
||||||
.owner = THIS_MODULE,
|
.owner = THIS_MODULE,
|
||||||
#endif
|
|
||||||
.type = VID_TYPE_TUNER,
|
.type = VID_TYPE_TUNER,
|
||||||
.hardware = VID_HARDWARE_USBVISION,
|
.hardware = VID_HARDWARE_USBVISION,
|
||||||
.fops = &usbvision_vbi_fops,
|
.fops = &usbvision_vbi_fops,
|
||||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
|
|
||||||
.release = video_device_release,
|
.release = video_device_release,
|
||||||
.name = "usbvision-vbi",
|
.name = "usbvision-vbi",
|
||||||
#endif
|
|
||||||
.minor = -1,
|
.minor = -1,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user