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)
JOM(8, "SAA register 0x%02X changed "
"from 0x%02X to 0x%02X\n", reg, itwas, isnow);
}
if (true == resubmit)
if (resubmit)
submit_video_urbs(peasycap);
return 0;
}
......@@ -548,7 +548,7 @@ int adjust_format(struct easycap *peasycap,
peasycap->offerfields = true;
else
peasycap->offerfields = false;
if (true == peasycap->decimatepixel)
if (peasycap->decimatepixel)
multiplier = 2;
else
multiplier = 1;
......@@ -1439,7 +1439,7 @@ long easycap_unlocked_ioctl(struct file *file,
int mute;
JOM(8, "user requests mute %i\n", v4l2_control.value);
if (true == v4l2_control.value)
if (v4l2_control.value)
mute = 1;
else
mute = 0;
......@@ -1560,7 +1560,7 @@ long easycap_unlocked_ioctl(struct file *file,
v4l2_frmsizeenum.type = (u32) V4L2_FRMSIZE_TYPE_DISCRETE;
if (true == peasycap->ntsc) {
if (peasycap->ntsc) {
switch (index) {
case 0: {
v4l2_frmsizeenum.discrete.width = 640;
......@@ -1690,7 +1690,7 @@ long easycap_unlocked_ioctl(struct file *file,
if (peasycap->fps)
denominator = peasycap->fps;
else {
if (true == peasycap->ntsc)
if (peasycap->ntsc)
denominator = 30;
else
denominator = 25;
......@@ -2265,7 +2265,7 @@ long easycap_unlocked_ioctl(struct file *file,
v4l2_buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
v4l2_buffer.bytesused = peasycap->frame_buffer_used;
v4l2_buffer.flags = V4L2_BUF_FLAG_MAPPED | V4L2_BUF_FLAG_DONE;
if (true == peasycap->offerfields)
if (peasycap->offerfields)
v4l2_buffer.field = V4L2_FIELD_BOTTOM;
else
v4l2_buffer.field = V4L2_FIELD_NONE;
......@@ -2399,7 +2399,7 @@ long easycap_unlocked_ioctl(struct file *file,
pv4l2_streamparm->parm.capture.timeperframe.
denominator = peasycap->fps;
} else {
if (true == peasycap->ntsc) {
if (peasycap->ntsc) {
pv4l2_streamparm->parm.capture.timeperframe.
denominator = 30;
} else {
......
......@@ -388,7 +388,7 @@ int setup_stk(struct usb_device *p, bool ntsc)
if (NULL == p)
return -ENODEV;
i0 = 0;
if (true == ntsc) {
if (ntsc) {
while (0xFFF != stk1160configNTSC[i0].reg) {
SET(p, stk1160configNTSC[i0].reg,
stk1160configNTSC[i0].set);
......@@ -414,7 +414,7 @@ int setup_saa(struct usb_device *p, bool ntsc)
if (NULL == p)
return -ENODEV;
i0 = 0;
if (true == ntsc) {
if (ntsc) {
while (0xFF != saa7113configNTSC[i0].reg) {
ir = write_saa(p, saa7113configNTSC[i0].reg,
saa7113configNTSC[i0].set);
......@@ -552,7 +552,7 @@ int check_saa(struct usb_device *p, bool ntsc)
return -ENODEV;
i0 = 0;
rc = 0;
if (true == ntsc) {
if (ntsc) {
while (0xFF != saa7113configNTSC[i0].reg) {
if (0x0F == saa7113configNTSC[i0].reg) {
i0++;
......@@ -663,7 +663,7 @@ int check_stk(struct usb_device *p, bool ntsc)
if (NULL == p)
return -ENODEV;
i0 = 0;
if (true == ntsc) {
if (ntsc) {
while (0xFFF != stk1160configNTSC[i0].reg) {
if (0x000 == stk1160configNTSC[i0].reg) {
i0++; continue;
......
This diff is collapsed.
......@@ -598,7 +598,7 @@ int easycap_alsa_probe(struct easycap *peasycap)
}
peasycap->alsa_hardware = alsa_hardware;
if (true == peasycap->microphone) {
if (peasycap->microphone) {
peasycap->alsa_hardware.rates = SNDRV_PCM_RATE_32000;
peasycap->alsa_hardware.rate_min = 32000;
peasycap->alsa_hardware.rate_max = 32000;
......
......@@ -734,12 +734,12 @@ static long easyoss_unlocked_ioctl(struct file *file,
JOM(8, "SNDCTL_DSP_GETCAPS\n");
#ifdef UPSAMPLE
if (true == peasycap->microphone)
if (peasycap->microphone)
caps = 0x04400000;
else
caps = 0x04400000;
#else
if (true == peasycap->microphone)
if (peasycap->microphone)
caps = 0x02400000;
else
caps = 0x04400000;
......@@ -783,12 +783,12 @@ static long easyoss_unlocked_ioctl(struct file *file,
JOM(8, "........... %i=incoming\n", incoming);
#ifdef UPSAMPLE
if (true == peasycap->microphone)
if (peasycap->microphone)
outgoing = AFMT_S16_LE;
else
outgoing = AFMT_S16_LE;
#else
if (true == peasycap->microphone)
if (peasycap->microphone)
outgoing = AFMT_S16_LE;
else
outgoing = AFMT_S16_LE;
......@@ -817,12 +817,12 @@ static long easyoss_unlocked_ioctl(struct file *file,
JOM(8, "........... %i=incoming\n", incoming);
#ifdef UPSAMPLE
if (true == peasycap->microphone)
if (peasycap->microphone)
incoming = 1;
else
incoming = 1;
#else
if (true == peasycap->microphone)
if (peasycap->microphone)
incoming = 0;
else
incoming = 1;
......@@ -844,12 +844,12 @@ static long easyoss_unlocked_ioctl(struct file *file,
JOM(8, "........... %i=incoming\n", incoming);
#ifdef UPSAMPLE
if (true == peasycap->microphone)
if (peasycap->microphone)
incoming = 32000;
else
incoming = 48000;
#else
if (true == peasycap->microphone)
if (peasycap->microphone)
incoming = 8000;
else
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