Skip to content

Commit

Permalink
staging/easycap: replace if(true == var) with if (var)
Browse files Browse the repository at this point in the history
's/(true == \([^ ]\+\))/(\1)/g'

Cc: Mike Thomas <rmthomas@sciolus.org>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Tomas Winkler authored and Greg Kroah-Hartman committed Mar 7, 2011
1 parent a90f362 commit 27d683a
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 69 deletions.
14 changes: 7 additions & 7 deletions drivers/staging/easycap/easycap_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/easycap/easycap_low.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
Expand Down Expand Up @@ -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++;
Expand Down Expand Up @@ -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;
Expand Down
Loading

0 comments on commit 27d683a

Please sign in to comment.