Commit 27d683ab authored by Tomas Winkler's avatar Tomas Winkler Committed by Greg Kroah-Hartman

staging/easycap: replace if(true == var) with if (var)

's/(true == \([^ ]\+\))/(\1)/g'

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: default avatarTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a90f3620
...@@ -330,7 +330,7 @@ int adjust_standard(struct easycap *peasycap, v4l2_std_id std_id) ...@@ -330,7 +330,7 @@ int adjust_standard(struct easycap *peasycap, v4l2_std_id std_id)
JOM(8, "SAA register 0x%02X changed " JOM(8, "SAA register 0x%02X changed "
"from 0x%02X to 0x%02X\n", reg, itwas, isnow); "from 0x%02X to 0x%02X\n", reg, itwas, isnow);
} }
if (true == resubmit) if (resubmit)
submit_video_urbs(peasycap); submit_video_urbs(peasycap);
return 0; return 0;
} }
...@@ -548,7 +548,7 @@ int adjust_format(struct easycap *peasycap, ...@@ -548,7 +548,7 @@ int adjust_format(struct easycap *peasycap,
peasycap->offerfields = true; peasycap->offerfields = true;
else else
peasycap->offerfields = false; peasycap->offerfields = false;
if (true == peasycap->decimatepixel) if (peasycap->decimatepixel)
multiplier = 2; multiplier = 2;
else else
multiplier = 1; multiplier = 1;
...@@ -1439,7 +1439,7 @@ long easycap_unlocked_ioctl(struct file *file, ...@@ -1439,7 +1439,7 @@ long easycap_unlocked_ioctl(struct file *file,
int mute; int mute;
JOM(8, "user requests mute %i\n", v4l2_control.value); JOM(8, "user requests mute %i\n", v4l2_control.value);
if (true == v4l2_control.value) if (v4l2_control.value)
mute = 1; mute = 1;
else else
mute = 0; mute = 0;
...@@ -1560,7 +1560,7 @@ long easycap_unlocked_ioctl(struct file *file, ...@@ -1560,7 +1560,7 @@ long easycap_unlocked_ioctl(struct file *file,
v4l2_frmsizeenum.type = (u32) V4L2_FRMSIZE_TYPE_DISCRETE; v4l2_frmsizeenum.type = (u32) V4L2_FRMSIZE_TYPE_DISCRETE;
if (true == peasycap->ntsc) { if (peasycap->ntsc) {
switch (index) { switch (index) {
case 0: { case 0: {
v4l2_frmsizeenum.discrete.width = 640; v4l2_frmsizeenum.discrete.width = 640;
...@@ -1690,7 +1690,7 @@ long easycap_unlocked_ioctl(struct file *file, ...@@ -1690,7 +1690,7 @@ long easycap_unlocked_ioctl(struct file *file,
if (peasycap->fps) if (peasycap->fps)
denominator = peasycap->fps; denominator = peasycap->fps;
else { else {
if (true == peasycap->ntsc) if (peasycap->ntsc)
denominator = 30; denominator = 30;
else else
denominator = 25; denominator = 25;
...@@ -2265,7 +2265,7 @@ long easycap_unlocked_ioctl(struct file *file, ...@@ -2265,7 +2265,7 @@ long easycap_unlocked_ioctl(struct file *file,
v4l2_buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; v4l2_buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
v4l2_buffer.bytesused = peasycap->frame_buffer_used; v4l2_buffer.bytesused = peasycap->frame_buffer_used;
v4l2_buffer.flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_DONE; v4l2_buffer.flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_DONE;
if (true == peasycap->offerfields) if (peasycap->offerfields)
v4l2_buffer.field = V4L2_FIELD_BOTTOM; v4l2_buffer.field = V4L2_FIELD_BOTTOM;
else else
v4l2_buffer.field = V4L2_FIELD_NONE; v4l2_buffer.field = V4L2_FIELD_NONE;
...@@ -2399,7 +2399,7 @@ long easycap_unlocked_ioctl(struct file *file, ...@@ -2399,7 +2399,7 @@ long easycap_unlocked_ioctl(struct file *file,
pv4l2_streamparm->parm.capture.timeperframe. pv4l2_streamparm->parm.capture.timeperframe.
denominator = peasycap->fps; denominator = peasycap->fps;
} else { } else {
if (true == peasycap->ntsc) { if (peasycap->ntsc) {
pv4l2_streamparm->parm.capture.timeperframe. pv4l2_streamparm->parm.capture.timeperframe.
denominator = 30; denominator = 30;
} else { } else {
......
...@@ -388,7 +388,7 @@ int setup_stk(struct usb_device *p, bool ntsc) ...@@ -388,7 +388,7 @@ int setup_stk(struct usb_device *p, bool ntsc)
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
i0 = 0; i0 = 0;
if (true == ntsc) { if (ntsc) {
while (0xFFF != stk1160configNTSC[i0].reg) { while (0xFFF != stk1160configNTSC[i0].reg) {
SET(p, stk1160configNTSC[i0].reg, SET(p, stk1160configNTSC[i0].reg,
stk1160configNTSC[i0].set); stk1160configNTSC[i0].set);
...@@ -414,7 +414,7 @@ int setup_saa(struct usb_device *p, bool ntsc) ...@@ -414,7 +414,7 @@ int setup_saa(struct usb_device *p, bool ntsc)
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
i0 = 0; i0 = 0;
if (true == ntsc) { if (ntsc) {
while (0xFF != saa7113configNTSC[i0].reg) { while (0xFF != saa7113configNTSC[i0].reg) {
ir = write_saa(p, saa7113configNTSC[i0].reg, ir = write_saa(p, saa7113configNTSC[i0].reg,
saa7113configNTSC[i0].set); saa7113configNTSC[i0].set);
...@@ -552,7 +552,7 @@ int check_saa(struct usb_device *p, bool ntsc) ...@@ -552,7 +552,7 @@ int check_saa(struct usb_device *p, bool ntsc)
return -ENODEV; return -ENODEV;
i0 = 0; i0 = 0;
rc = 0; rc = 0;
if (true == ntsc) { if (ntsc) {
while (0xFF != saa7113configNTSC[i0].reg) { while (0xFF != saa7113configNTSC[i0].reg) {
if (0x0F == saa7113configNTSC[i0].reg) { if (0x0F == saa7113configNTSC[i0].reg) {
i0++; i0++;
...@@ -663,7 +663,7 @@ int check_stk(struct usb_device *p, bool ntsc) ...@@ -663,7 +663,7 @@ int check_stk(struct usb_device *p, bool ntsc)
if (NULL == p) if (NULL == p)
return -ENODEV; return -ENODEV;
i0 = 0; i0 = 0;
if (true == ntsc) { if (ntsc) {
while (0xFFF != stk1160configNTSC[i0].reg) { while (0xFFF != stk1160configNTSC[i0].reg) {
if (0x000 == stk1160configNTSC[i0].reg) { if (0x000 == stk1160configNTSC[i0].reg) {
i0++; continue; i0++; continue;
......
This diff is collapsed.
...@@ -598,7 +598,7 @@ int easycap_alsa_probe(struct easycap *peasycap) ...@@ -598,7 +598,7 @@ int easycap_alsa_probe(struct easycap *peasycap)
} }
peasycap->alsa_hardware = alsa_hardware; peasycap->alsa_hardware = alsa_hardware;
if (true == peasycap->microphone) { if (peasycap->microphone) {
peasycap->alsa_hardware.rates = SNDRV_PCM_RATE_32000; peasycap->alsa_hardware.rates = SNDRV_PCM_RATE_32000;
peasycap->alsa_hardware.rate_min = 32000; peasycap->alsa_hardware.rate_min = 32000;
peasycap->alsa_hardware.rate_max = 32000; peasycap->alsa_hardware.rate_max = 32000;
......
...@@ -734,12 +734,12 @@ static long easyoss_unlocked_ioctl(struct file *file, ...@@ -734,12 +734,12 @@ static long easyoss_unlocked_ioctl(struct file *file,
JOM(8, "SNDCTL_DSP_GETCAPS\n"); JOM(8, "SNDCTL_DSP_GETCAPS\n");
#ifdef UPSAMPLE #ifdef UPSAMPLE
if (true == peasycap->microphone) if (peasycap->microphone)
caps = 0x04400000; caps = 0x04400000;
else else
caps = 0x04400000; caps = 0x04400000;
#else #else
if (true == peasycap->microphone) if (peasycap->microphone)
caps = 0x02400000; caps = 0x02400000;
else else
caps = 0x04400000; caps = 0x04400000;
...@@ -783,12 +783,12 @@ static long easyoss_unlocked_ioctl(struct file *file, ...@@ -783,12 +783,12 @@ static long easyoss_unlocked_ioctl(struct file *file,
JOM(8, "........... %i=incoming\n", incoming); JOM(8, "........... %i=incoming\n", incoming);
#ifdef UPSAMPLE #ifdef UPSAMPLE
if (true == peasycap->microphone) if (peasycap->microphone)
outgoing = AFMT_S16_LE; outgoing = AFMT_S16_LE;
else else
outgoing = AFMT_S16_LE; outgoing = AFMT_S16_LE;
#else #else
if (true == peasycap->microphone) if (peasycap->microphone)
outgoing = AFMT_S16_LE; outgoing = AFMT_S16_LE;
else else
outgoing = AFMT_S16_LE; outgoing = AFMT_S16_LE;
...@@ -817,12 +817,12 @@ static long easyoss_unlocked_ioctl(struct file *file, ...@@ -817,12 +817,12 @@ static long easyoss_unlocked_ioctl(struct file *file,
JOM(8, "........... %i=incoming\n", incoming); JOM(8, "........... %i=incoming\n", incoming);
#ifdef UPSAMPLE #ifdef UPSAMPLE
if (true == peasycap->microphone) if (peasycap->microphone)
incoming = 1; incoming = 1;
else else
incoming = 1; incoming = 1;
#else #else
if (true == peasycap->microphone) if (peasycap->microphone)
incoming = 0; incoming = 0;
else else
incoming = 1; incoming = 1;
...@@ -844,12 +844,12 @@ static long easyoss_unlocked_ioctl(struct file *file, ...@@ -844,12 +844,12 @@ static long easyoss_unlocked_ioctl(struct file *file,
JOM(8, "........... %i=incoming\n", incoming); JOM(8, "........... %i=incoming\n", incoming);
#ifdef UPSAMPLE #ifdef UPSAMPLE
if (true == peasycap->microphone) if (peasycap->microphone)
incoming = 32000; incoming = 32000;
else else
incoming = 48000; incoming = 48000;
#else #else
if (true == peasycap->microphone) if (peasycap->microphone)
incoming = 8000; incoming = 8000;
else else
incoming = 48000; incoming = 48000;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment