's/(true == \([^ ]\+\))/(\1)/g' Cc: Mike Thomas <rmthomas@xxxxxxxxxxx> Signed-off-by: Tomas Winkler <tomas.winkler@xxxxxxxxx> --- drivers/staging/easycap/easycap_ioctl.c | 14 ++-- drivers/staging/easycap/easycap_low.c | 8 +- drivers/staging/easycap/easycap_main.c | 98 +++++++++++++------------- drivers/staging/easycap/easycap_sound.c | 2 +- drivers/staging/easycap/easycap_sound_oss.c | 16 ++-- 5 files changed, 69 insertions(+), 69 deletions(-) diff --git a/drivers/staging/easycap/easycap_ioctl.c b/drivers/staging/easycap/easycap_ioctl.c index 8d8d07f..c2f5a78 100644 --- a/drivers/staging/easycap/easycap_ioctl.c +++ b/drivers/staging/easycap/easycap_ioctl.c @@ -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 { diff --git a/drivers/staging/easycap/easycap_low.c b/drivers/staging/easycap/easycap_low.c index 1f914b4..96270e0 100644 --- a/drivers/staging/easycap/easycap_low.c +++ b/drivers/staging/easycap/easycap_low.c @@ -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; diff --git a/drivers/staging/easycap/easycap_main.c b/drivers/staging/easycap/easycap_main.c index 83aa6ee..7f59b94 100644 --- a/drivers/staging/easycap/easycap_main.c +++ b/drivers/staging/easycap/easycap_main.c @@ -247,7 +247,7 @@ static int reset(struct easycap *peasycap) rate = ready_saa(peasycap->pusb_device); if (0 > rate) { JOM(8, "not ready to capture after %i ms ...\n", PATIENCE); - if (true == peasycap->ntsc) { + if (peasycap->ntsc) { JOM(8, "... trying PAL ...\n"); ntsc = false; } else { JOM(8, "... trying NTSC ...\n"); ntsc = true; @@ -566,7 +566,7 @@ newinput(struct easycap *peasycap, int input) SAM("ERROR: start_100() rc = %i\n", rc); return -EFAULT; } - if (true == resubmit) + if (resubmit) submit_video_urbs(peasycap); peasycap->video_isoc_sequence = VIDEO_ISOC_BUFFER_MANY - 1; @@ -1335,7 +1335,7 @@ field2frame(struct easycap *peasycap) peasycap->field_buffer[peasycap->field_read][0].input, peasycap->field_read, peasycap->frame_fill); JOM(8, "===== %i=bytesperpixel\n", peasycap->bytesperpixel); - if (true == peasycap->offerfields) + if (peasycap->offerfields) JOM(8, "===== offerfields\n"); /*---------------------------------------------------------------------------*/ @@ -1368,7 +1368,7 @@ field2frame(struct easycap *peasycap) SAM("MISTAKE: %i=bytesperpixel\n", bytesperpixel); return -EFAULT; } - if (true == decimatepixel) + if (decimatepixel) multiplier = 2; else multiplier = 1; @@ -1385,7 +1385,7 @@ field2frame(struct easycap *peasycap) pad = peasycap->frame_buffer[kad][0].pgo; rad = PAGE_SIZE; odd = !!(peasycap->field_buffer[kex][0].kount); - if ((true == odd) && (false == decimatepixel)) { + if (odd && (false == decimatepixel)) { JOM(8, "initial skipping %4i bytes p.%4i\n", w3/multiplier, mad); pad += (w3 / multiplier); rad -= (w3 / multiplier); @@ -1445,7 +1445,7 @@ field2frame(struct easycap *peasycap) } if (rump) caches++; - if (true == badinput) { + if (badinput) { JOM(8, "ERROR: 0x%02X=->field_buffer" "[%i][%i].input, " "0x%02X=(0x08|->input)\n", @@ -1561,7 +1561,7 @@ field2frame(struct easycap *peasycap) if (rump) caches++; - if (true == badinput) { + if (badinput) { JOM(8, "ERROR: 0x%02X=->field_buffer" "[%i][%i].input, " "0x%02X=(0x08|->input)\n", @@ -1663,7 +1663,7 @@ field2frame(struct easycap *peasycap) JOM(8, "===== field2frame(): %i bytes --> %i bytes (incl skip)\n", c2, c3); JOM(8, "===== field2frame(): %i=mad %i=rad\n", mad, rad); - if (true == odd) + if (odd) JOM(8, "+++++ field2frame(): frame buffer %i is full\n", kad); if (peasycap->field_read == peasycap->field_fill) @@ -1819,7 +1819,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, p2 = (u8 *)pex; pz = p2 + much; pr = p3 + more; last = false; p2++; - if (true == isuy) + if (isuy) u = *(p2 - 1); else v = *(p2 - 1); @@ -1884,9 +1884,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, else last = false; y = *p2; - if ((true == last) && (0x0C & mask)) { + if (last && (0x0C & mask)) { if (0x04 & mask) { - if (true == isuy) + if (isuy) v = margin; else u = margin; @@ -1894,7 +1894,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, if (0x08 & mask) ; } else { - if (true == isuy) + if (isuy) v = *(p2 + 1); else u = *(p2 + 1); @@ -1910,7 +1910,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, b = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); - if ((true == last) && rump) { + if (last && rump) { pcache = &peasycap->cache[0]; switch (bytesperpixel - rump) { case 1: { @@ -1937,7 +1937,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, *(p3 + 2) = b; } p2 += 2; - if (true == isuy) + if (isuy) isuy = false; else isuy = true; @@ -1952,9 +1952,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, else last = false; y = *p2; - if ((true == last) && (0x0C & mask)) { + if (last && (0x0C & mask)) { if (0x04 & mask) { - if (true == isuy) + if (isuy) v = margin; else u = margin; @@ -1963,7 +1963,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, if (0x08 & mask) ; } else { - if (true == isuy) + if (isuy) v = *(p2 + 1); else u = *(p2 + 1); @@ -1979,7 +1979,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, b = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); - if ((true == last) && rump) { + if (last && rump) { pcache = &peasycap->cache[0]; switch (bytesperpixel - rump) { case 1: { @@ -2006,7 +2006,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, *(p3 + 2) = r; } p2 += 2; - if (true == isuy) + if (isuy) isuy = false; else isuy = true; @@ -2023,9 +2023,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, else last = false; y = *p2; - if ((true == last) && (0x0C & mask)) { + if (last && (0x0C & mask)) { if (0x04 & mask) { - if (true == isuy) + if (isuy) v = margin; else u = margin; @@ -2033,13 +2033,13 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, if (0x08 & mask) ; } else { - if (true == isuy) + if (isuy) v = *(p2 + 1); else u = *(p2 + 1); } - if (true == isuy) { + if (isuy) { tmp = ay[(int)y] + rv[(int)v]; r = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); @@ -2051,7 +2051,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, b = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); - if ((true == last) && rump) { + if (last && rump) { pcache = &peasycap->cache[0]; switch (bytesperpixel - rump) { case 1: { @@ -2094,9 +2094,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, else last = false; y = *p2; - if ((true == last) && (0x0C & mask)) { + if (last && (0x0C & mask)) { if (0x04 & mask) { - if (true == isuy) + if (isuy) v = margin; else u = margin; @@ -2104,13 +2104,13 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, if (0x08 & mask) ; } else { - if (true == isuy) + if (isuy) v = *(p2 + 1); else u = *(p2 + 1); } - if (true == isuy) { + if (isuy) { tmp = ay[(int)y] + rv[(int)v]; r = (255 < tmp) ? 255 : ((0 > tmp) ? @@ -2123,7 +2123,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, b = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); - if ((true == last) && rump) { + if (last && rump) { pcache = &peasycap->cache[0]; switch (bytesperpixel - rump) { case 1: { @@ -2173,9 +2173,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, else last = false; y = *p2; - if ((true == last) && (0x0C & mask)) { + if (last && (0x0C & mask)) { if (0x04 & mask) { - if (true == isuy) + if (isuy) v = margin; else u = margin; @@ -2183,7 +2183,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, if (0x08 & mask) ; } else { - if (true == isuy) + if (isuy) v = *(p2 + 1); else u = *(p2 + 1); @@ -2199,7 +2199,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, b = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); - if ((true == last) && rump) { + if (last && rump) { pcache = &peasycap->cache[0]; switch (bytesperpixel - rump) { case 1: { @@ -2236,7 +2236,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, *(p3 + 3) = 0; } p2 += 2; - if (true == isuy) + if (isuy) isuy = false; else isuy = true; @@ -2253,9 +2253,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, else last = false; y = *p2; - if ((true == last) && (0x0C & mask)) { + if (last && (0x0C & mask)) { if (0x04 & mask) { - if (true == isuy) + if (isuy) v = margin; else u = margin; @@ -2263,7 +2263,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, if (0x08 & mask) ; } else { - if (true == isuy) + if (isuy) v = *(p2 + 1); else u = *(p2 + 1); @@ -2279,7 +2279,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, b = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); - if ((true == last) && rump) { + if (last && rump) { pcache = &peasycap->cache[0]; switch (bytesperpixel - rump) { case 1: { @@ -2315,7 +2315,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, *(p3 + 3) = 0; } p2 += 2; - if (true == isuy) + if (isuy) isuy = false; else isuy = true; @@ -2334,9 +2334,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, else last = false; y = *p2; - if ((true == last) && (0x0C & mask)) { + if (last && (0x0C & mask)) { if (0x04 & mask) { - if (true == isuy) + if (isuy) v = margin; else u = margin; @@ -2344,13 +2344,13 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, if (0x08 & mask) ; } else { - if (true == isuy) + if (isuy) v = *(p2 + 1); else u = *(p2 + 1); } - if (true == isuy) { + if (isuy) { tmp = ay[(int)y] + rv[(int)v]; r = (255 < tmp) ? 255 : ((0 > tmp) ? @@ -2363,7 +2363,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, b = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); - if ((true == last) && rump) { + if (last && rump) { pcache = &peasycap->cache[0]; switch (bytesperpixel - rump) { case 1: { @@ -2418,9 +2418,9 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, else last = false; y = *p2; - if ((true == last) && (0x0C & mask)) { + if (last && (0x0C & mask)) { if (0x04 & mask) { - if (true == isuy) + if (isuy) v = margin; else u = margin; @@ -2428,13 +2428,13 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, if (0x08 & mask) ; } else { - if (true == isuy) + if (isuy) v = *(p2 + 1); else u = *(p2 + 1); } - if (true == isuy) { + if (isuy) { tmp = ay[(int)y] + rv[(int)v]; r = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); @@ -2446,7 +2446,7 @@ redaub(struct easycap *peasycap, void *pad, void *pex, int much, int more, b = (255 < tmp) ? 255 : ((0 > tmp) ? 0 : (u8)tmp); - if ((true == last) && rump) { + if (last && rump) { pcache = &peasycap->cache[0]; switch (bytesperpixel - rump) { case 1: { diff --git a/drivers/staging/easycap/easycap_sound.c b/drivers/staging/easycap/easycap_sound.c index 86b9ae0..8fc2f16 100644 --- a/drivers/staging/easycap/easycap_sound.c +++ b/drivers/staging/easycap/easycap_sound.c @@ -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; diff --git a/drivers/staging/easycap/easycap_sound_oss.c b/drivers/staging/easycap/easycap_sound_oss.c index e36f341..71776fc 100644 --- a/drivers/staging/easycap/easycap_sound_oss.c +++ b/drivers/staging/easycap/easycap_sound_oss.c @@ -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; -- 1.7.4 --------------------------------------------------------------------- Intel Israel (74) Limited This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel