Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235805
b: refs/heads/master
c: 3fc0dae
h: refs/heads/master
i:
  235803: 669aade
v: v3
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Feb 4, 2011
1 parent f687b1e commit 97b4436
Show file tree
Hide file tree
Showing 8 changed files with 62 additions and 65 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f2b3c685b9b1c048cfa8bef98dac037275b9d20d
refs/heads/master: 3fc0dae888ee216036ae1898fc9186f1dd04f185
18 changes: 9 additions & 9 deletions trunk/drivers/staging/easycap/easycap.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,22 +90,22 @@
#include <sound/control.h>
#endif /* !CONFIG_EASYCAP_OSS */
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT)
#ifdef EASYCAP_IS_VIDEODEV_CLIENT
#include <media/v4l2-dev.h>
#if defined(EASYCAP_NEEDS_V4L2_DEVICE_H)
#ifdef EASYCAP_NEEDS_V4L2_DEVICE_H
#include <media/v4l2-device.h>
#endif /*EASYCAP_NEEDS_V4L2_DEVICE_H*/
#endif /*EASYCAP_IS_VIDEODEV_CLIENT*/
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
#include <linux/videodev2.h>
#include <linux/soundcard.h>
#if defined(EASYCAP_NEEDS_USBVIDEO_H)
#ifdef EASYCAP_NEEDS_USBVIDEO_H
#include <config/video/usbvideo.h>
#endif /*EASYCAP_NEEDS_USBVIDEO_H*/

#if (!defined(PAGE_SIZE))
#ifndef PAGE_SIZE
#error "PAGE_SIZE not defined"
#endif
#endif /* PAGE_SIZE */

/*---------------------------------------------------------------------------*/
/* VENDOR, PRODUCT: Syntek Semiconductor Co., Ltd
Expand Down Expand Up @@ -309,9 +309,9 @@ struct easycap {
int minor;

/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT)
#ifdef EASYCAP_IS_VIDEODEV_CLIENT
struct video_device video_device;
#if defined(EASYCAP_NEEDS_V4L2_DEVICE_H)
#ifdef EASYCAP_NEEDS_V4L2_DEVICE_H
struct v4l2_device v4l2_device;
#endif /*EASYCAP_NEEDS_V4L2_DEVICE_H*/
#endif /*EASYCAP_IS_VIDEODEV_CLIENT*/
Expand All @@ -322,8 +322,8 @@ struct easycap {
unsigned int audio_buffer_page_many;

#define UPSAMPLE
#if defined(UPSAMPLE)
__s16 oldaudio;
#ifdef UPSAMPLE
__s16 oldaudio;
#endif /*UPSAMPLE*/

int ilk;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/easycap/easycap_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1387,7 +1387,7 @@ case VIDIOC_G_CTRL: {
break;
}
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
#if defined(VIDIOC_S_CTRL_OLD)
#ifdef VIDIOC_S_CTRL_OLD
case VIDIOC_S_CTRL_OLD: {
JOM(8, "VIDIOC_S_CTRL_OLD required at least for xawtv\n");
}
Expand Down Expand Up @@ -2156,7 +2156,7 @@ case VIDIOC_QBUF: {
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
case VIDIOC_DQBUF:
{
#if defined(AUDIOTIME)
#ifdef AUDIOTIME
struct signed_div_result sdr;
long long int above, below, dnbydt, fudge, sll;
unsigned long long int ull;
Expand Down Expand Up @@ -2269,7 +2269,7 @@ case VIDIOC_DQBUF:
do_gettimeofday(&timeval);
timeval2 = timeval;

#if defined(AUDIOTIME)
#ifdef AUDIOTIME
if (!peasycap->timeval0.tv_sec) {
timeval8 = timeval;
timeval1 = timeval;
Expand Down Expand Up @@ -2389,7 +2389,7 @@ case VIDIOC_STREAMOFF: {
/*---------------------------------------------------------------------------*/
JOM(8, "calling wake_up on wq_video and wq_audio\n");
wake_up_interruptible(&(peasycap->wq_video));
#if defined(EASYCAP_NEEDS_ALSA)
#ifdef EASYCAP_NEEDS_ALSA
if (NULL != peasycap->psubstream)
snd_pcm_period_elapsed(peasycap->psubstream);
#else
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/easycap/easycap_low.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ static const struct saa7113config{
int set;
} saa7113configPAL[256] = {
{0x01, 0x08},
#if defined(ANTIALIAS)
#ifdef ANTIALIAS
{0x02, 0xC0},
#else
{0x02, 0x80},
Expand Down Expand Up @@ -191,7 +191,7 @@ static const struct saa7113config{
/*--------------------------------------------------------------------------*/
static const struct saa7113config saa7113configNTSC[256] = {
{0x01, 0x08},
#if defined(ANTIALIAS)
#ifdef ANTIALIAS
{0x02, 0xC0},
#else
{0x02, 0x80},
Expand Down Expand Up @@ -929,7 +929,7 @@ rc0 = usb_control_msg(pusb_device, usb_sndctrlpipe(pusb_device, 0),
(__u16)0,
(int)500);

#if defined(NOREADBACK)
#ifdef NOREADBACK
#
#else
rc1 = usb_control_msg(pusb_device, usb_rcvctrlpipe(pusb_device, 0),
Expand Down
53 changes: 25 additions & 28 deletions trunk/drivers/staging/easycap/easycap_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ return -1;
/*^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^*/
static int easycap_open(struct inode *inode, struct file *file)
{
#if (!defined(EASYCAP_IS_VIDEODEV_CLIENT))
#ifndef EASYCAP_IS_VIDEODEV_CLIENT
struct usb_interface *pusb_interface;
#else
struct video_device *pvideo_device;
Expand All @@ -146,7 +146,7 @@ SAY("==========OPEN=========\n");

peasycap = NULL;
/*---------------------------------------------------------------------------*/
#if (!defined(EASYCAP_IS_VIDEODEV_CLIENT))
#ifndef EASYCAP_IS_VIDEODEV_CLIENT
if (NULL == inode) {
SAY("ERROR: inode is NULL.\n");
return -EFAULT;
Expand Down Expand Up @@ -728,7 +728,7 @@ return 0;
/*--------------------------------------------------------------------------*/
static int easycap_release(struct inode *inode, struct file *file)
{
#if (!defined(EASYCAP_IS_VIDEODEV_CLIENT))
#ifndef EASYCAP_IS_VIDEODEV_CLIENT
struct easycap *peasycap;

JOT(4, "\n");
Expand Down Expand Up @@ -756,7 +756,7 @@ JOM(4, "ending successfully\n");

return 0;
}
#if defined(EASYCAP_IS_VIDEODEV_CLIENT)
#ifdef EASYCAP_IS_VIDEODEV_CLIENT
static int easycap_open_noinode(struct file *file)
{
return easycap_open(NULL, file);
Expand Down Expand Up @@ -1375,7 +1375,7 @@ if (peasycap->field_read == peasycap->field_fill) {
peasycap->field_read);
return 0;
}
#if defined(EASYCAP_TESTCARD)
#ifdef EASYCAP_TESTCARD
easycap_testcard(peasycap, peasycap->field_read);
#else
if (0 <= input && INPUT_MANY > input) {
Expand Down Expand Up @@ -3128,8 +3128,8 @@ static const struct usb_class_driver easycap_class = {
.minor_base = USB_SKEL_MINOR_BASE,
};
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT)
#if defined(EASYCAP_NEEDS_V4L2_FOPS)
#ifdef EASYCAP_IS_VIDEODEV_CLIENT
#ifdef EASYCAP_NEEDS_V4L2_FOPS
static const struct v4l2_file_operations v4l2_fops = {
.owner = THIS_MODULE,
.open = easycap_open_noinode,
Expand Down Expand Up @@ -3180,8 +3180,8 @@ __u16 mask;
__s32 value;
struct easycap_format *peasycap_format;
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT)
#if defined(EASYCAP_NEEDS_V4L2_DEVICE_H)
#ifdef EASYCAP_IS_VIDEODEV_CLIENT
#ifdef EASYCAP_NEEDS_V4L2_DEVICE_H
struct v4l2_device *pv4l2_device;
#endif /*EASYCAP_NEEDS_V4L2_DEVICE_H*/
#endif /*EASYCAP_IS_VIDEODEV_CLIENT*/
Expand Down Expand Up @@ -3303,10 +3303,10 @@ if (0 == bInterfaceNumber) {
}
SAM("allocated 0x%08lX=peasycap\n", (unsigned long int) peasycap);
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT)
#ifdef EASYCAP_IS_VIDEODEV_CLIENT
SAM("where 0x%08lX=&peasycap->video_device\n",
(unsigned long int) &peasycap->video_device);
#if defined(EASYCAP_NEEDS_V4L2_DEVICE_H)
#ifdef EASYCAP_NEEDS_V4L2_DEVICE_H
SAM("and 0x%08lX=&peasycap->v4l2_device\n",
(unsigned long int) &peasycap->v4l2_device);
#endif /*EASYCAP_NEEDS_V4L2_DEVICE_H*/
Expand Down Expand Up @@ -3559,11 +3559,11 @@ if (0 == bInterfaceNumber) {
bInterfaceNumber);
return -ENODEV;
}
#if (!defined(EASYCAP_IS_VIDEODEV_CLIENT))
#ifndef EASYCAP_IS_VIDEODEV_CLIENT
#
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#else
#if defined(EASYCAP_NEEDS_V4L2_DEVICE_H)
#ifdef EASYCAP_NEEDS_V4L2_DEVICE_H
/*---------------------------------------------------------------------------*/
/*
* SOME VERSIONS OF THE videodev MODULE OVERWRITE THE DATA WHICH HAS
Expand Down Expand Up @@ -4128,7 +4128,7 @@ case 0: {
* BEWARE.
*/
/*---------------------------------------------------------------------------*/
#if defined(PREFER_NTSC)
#ifdef PREFER_NTSC
peasycap->ntsc = true;
JOM(8, "defaulting initially to NTSC\n");
#else
Expand All @@ -4145,7 +4145,7 @@ case 0: {
* THE VIDEO DEVICE CAN BE REGISTERED NOW, AS IT IS READY.
*/
/*--------------------------------------------------------------------------*/
#if (!defined(EASYCAP_IS_VIDEODEV_CLIENT))
#ifndef EASYCAP_IS_VIDEODEV_CLIENT
if (0 != (usb_register_dev(pusb_interface, &easycap_class))) {
err("Not able to get a minor for this device");
usb_set_intfdata(pusb_interface, NULL);
Expand All @@ -4158,7 +4158,7 @@ case 0: {
}
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#else
#if defined(EASYCAP_NEEDS_V4L2_DEVICE_H)
#ifdef EASYCAP_NEEDS_V4L2_DEVICE_H
if (0 != (v4l2_device_register(&(pusb_interface->dev),
&(peasycap->v4l2_device)))) {
SAM("v4l2_device_register() failed\n");
Expand All @@ -4181,7 +4181,7 @@ case 0: {
#endif /*EASYCAP_NEEDS_V4L2_DEVICE_H*/

strcpy(&peasycap->video_device.name[0], "easycapdc60");
#if defined(EASYCAP_NEEDS_V4L2_FOPS)
#ifdef EASYCAP_NEEDS_V4L2_FOPS
peasycap->video_device.fops = &v4l2_fops;
#else
peasycap->video_device.fops = &easycap_fops;
Expand Down Expand Up @@ -4214,7 +4214,7 @@ case 0: {
*/
/*--------------------------------------------------------------------------*/
case 1: {
#if defined(EASYCAP_SILENT)
#ifdef EASYCAP_SILENT
return -ENOENT;
#endif /*EASYCAP_SILENT*/
if (!peasycap) {
Expand All @@ -4233,7 +4233,7 @@ case 1: {
}
/*--------------------------------------------------------------------------*/
case 2: {
#if defined(EASYCAP_SILENT)
#ifdef EASYCAP_SILENT
return -ENOENT;
#endif /*EASYCAP_SILENT*/
if (!peasycap) {
Expand Down Expand Up @@ -4566,8 +4566,8 @@ struct list_head *plist_head;
struct data_urb *pdata_urb;
int minor, m, kd;
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#if defined(EASYCAP_IS_VIDEODEV_CLIENT)
#if defined(EASYCAP_NEEDS_V4L2_DEVICE_H)
#ifdef EASYCAP_IS_VIDEODEV_CLIENT
#ifdef EASYCAP_NEEDS_V4L2_DEVICE_H
struct v4l2_device *pv4l2_device;
#endif /*EASYCAP_NEEDS_V4L2_DEVICE_H*/
#endif /*EASYCAP_IS_VIDEODEV_CLIENT*/
Expand Down Expand Up @@ -4602,11 +4602,8 @@ if (NULL == peasycap) {
return;
}
/*---------------------------------------------------------------------------*/
#if (!defined(EASYCAP_IS_VIDEODEV_CLIENT))
#
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#else
#if defined(EASYCAP_NEEDS_V4L2_DEVICE_H)
#ifdef EASYCAP_IS_VIDEODEV_CLIENT
#ifdef EASYCAP_NEEDS_V4L2_DEVICE_H
/*---------------------------------------------------------------------------*/
/*
* SOME VERSIONS OF THE videodev MODULE OVERWRITE THE DATA WHICH HAS
Expand Down Expand Up @@ -4715,7 +4712,7 @@ case 0: {
} else
SAY("ERROR: %i=kd is bad: cannot lock dongle\n", kd);
/*---------------------------------------------------------------------------*/
#if (!defined(EASYCAP_IS_VIDEODEV_CLIENT))
#ifndef EASYCAP_IS_VIDEODEV_CLIENT
if (NULL == peasycap) {
SAM("ERROR: peasycap has become NULL\n");
} else {
Expand All @@ -4726,7 +4723,7 @@ case 0: {
}
/*vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv*/
#else
#if defined(EASYCAP_NEEDS_V4L2_DEVICE_H)
#ifdef EASYCAP_NEEDS_V4L2_DEVICE_H
if (!peasycap->v4l2_device.name[0]) {
SAM("ERROR: peasycap->v4l2_device.name is empty\n");
if (0 <= kd && DONGLE_MANY > kd)
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/easycap/easycap_sound.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ int isfragment;
__u8 *p1, *p2;
__s16 s16;
int i, j, more, much, rc;
#if defined(UPSAMPLE)
#ifdef UPSAMPLE
int k;
__s16 oldaudio, newaudio, delta;
#endif /*UPSAMPLE*/
Expand Down Expand Up @@ -131,7 +131,7 @@ if (purb->status) {
*/
/*---------------------------------------------------------------------------*/

#if defined(UPSAMPLE)
#ifdef UPSAMPLE
oldaudio = peasycap->oldaudio;
#endif /*UPSAMPLE*/

Expand Down Expand Up @@ -185,7 +185,7 @@ for (i = 0; i < purb->number_of_packets; i++) {
p1 += much;
more -= much;
} else {
#if defined(UPSAMPLE)
#ifdef UPSAMPLE
if (much % 16)
JOM(8, "MISTAKE? much"
" is not divisible by 16\n");
Expand Down Expand Up @@ -271,7 +271,7 @@ for (i = 0; i < purb->number_of_packets; i++) {
purb->iso_frame_desc[i].status);
}

#if defined(UPSAMPLE)
#ifdef UPSAMPLE
peasycap->oldaudio = oldaudio;
#endif /*UPSAMPLE*/

Expand Down
Loading

0 comments on commit 97b4436

Please sign in to comment.