On 09/04/2014 01:19 AM, Mauro Carvalho Chehab wrote:
> c->ptr was already copied to Kernelspace. So, this sparse warning
> is bogus:
>
>>> drivers/media/v4l2-core/v4l2-ctrls.c:1685:15: sparse: incorrect type in
>>> assignment (different address spaces)
>drivers/media/v4l2-core/v4l2-ctrls.c:16
Integrated RF tuner of IT9135 is connected to demod clock source
named dyn0_clk. Enable that clock source in order to provide stable
clock early enough.
Cc: Bimow Chen
Signed-off-by: Antti Palosaari
---
drivers/media/usb/dvb-usb-v2/af9035.c | 9 ++---
1 file changed, 6 insertions(+), 3 dele
Remove tuner_ prefix from module name and file names. Prefix was
added due to file name conflict on media out-tree build system.
Demodulator having same name does not exists anymore. So lets
remove dumb prefix.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/Makefile| 2 +-
Use I2C it913x tuner driver.
Signed-off-by: Antti Palosaari
---
drivers/media/usb/dvb-usb-v2/af9035.c | 135 --
drivers/media/usb/dvb-usb-v2/af9035.h | 3 +-
2 files changed, 131 insertions(+), 7 deletions(-)
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c
Reverts commit 3ab25123373270152a9fae98e3c48ef1b2a878c0
[media] af9035: override tuner for AVerMedia A835B devices
Original commit itself is correct, but it was replaced by more
general solution (commit 1cbbf90d0406913ad4b44194b07f4f41bde84e54).
This old solution was committed by a accident and is
Correct issues reported by checkpatch.pl.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 30 ++
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/drivers/media/dvb-frontends/af9033.c
b/drivers/media/dvb-frontends/af9033.c
inde
foo_dev seems to be most correct term for the structure holding data
of each device instance. It is most used term in Kernel and also
examples from book Linux Device Drivers, Third Edition, uses it.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/it913x.c | 150 +-
Change register write and read routines to similar which are
typically used. We have to add processor core as a part of register
address in order to simplify register access. Chip has two cores,
called link and ofdm. As for now, use address bit 24 to address used
core. Bits 15:0 are register addres
Correct issues reported by checkpatch.pl
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/tuner_it913x.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/media/tuners/tuner_it913x.c
b/drivers/media/tuners/tuner_it913x.c
index 281d8c5..b92d599 100644
--- a/drivers/media/tun
AF903x/IT913x demod provides clock source(s). It seems that this
clock source is used for integrated RF tuner of IT913x. It is
enabled by default, but firmware disables it automatically when
suspend is requested (suspend_flag (0x004c) + trigger_ofsm
(0x)). Automatic disable behavior seems to be
Remove IT9135 tuner attach for a while as we will convert IT9135
driver to Kernel I2C model.
Signed-off-by: Antti Palosaari
---
drivers/media/usb/dvb-usb-v2/af9035.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c
b/drivers/media/usb/dvb-usb-v2/af903
Convert driver from DVB proprietary model to kernel I2C model.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/it913x.c | 133 -
drivers/media/tuners/it913x.h | 33 -
drivers/media/tuners/it913x_priv.h | 1 -
3 files changed, 90 in
IT913x tuner driver disables own clock, provided by demod core, as
very a first operation when tuner is put on *sleep*. That likely
causes failure of all the rest commands on sleep sequence, which
leads situation where tuner is not actually on sleep, but consuming
a lot of power.
I measured 102mA
Old IT9135 AX needs a little bit different register settings for
sleep than newer IT9135 BX. This has been broken always, as power
management of the whole driver, but it started to be problem as I
fixed clock. Earlier clock was disabled very first on sleep and
rest of the commands were skipped by t
Re-implement sleep. Based USB sniffs taken from the latest Hauppauge
windows driver version 07/10/2014, 14.6.23.32191.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/it913x.c | 76 +++
drivers/media/tuners/it913x.h | 10 -
drivers/medi
It uses I2C client so logging system prints module name
automatically. Function name is also added automatically, if it is
requested from dynamic debug by setting proper format.
Because of that, we could simplify logging in our driver.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-fronten
Implement following DTV API commands:
DTV_STAT_POST_ERROR_BIT_COUNT
DTV_STAT_POST_TOTAL_BIT_COUNT
These will provide post-Viterbi bit error rate reporting.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 15 +++
1 file changed, 15 insertions(+)
diff --git
foo_dev seems to be most correct term for the structure holding data
of each device instance. It is most used term in Kernel codebase and also
examples from book Linux Device Drivers, Third Edition, uses it.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 328 ++
Used script loader is quite useless and hides register numbers
making code hard to understand. Get rid of it and use standard
RegMap register write functions directly.
it913x_priv.h file leaves empty after that change and is also
removed.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/
Remove 'duplicate' DVBv3 read SNR implementation and return value,
calculated already by DVBv5 CNR, from the cache.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 52 ---
drivers/media/dvb-frontends/af9033_priv.h | 1 +
2 files changed
udelay based I/O polling loop is a bad idea, especially system
performance point of view. Kernel jiffies are preferred solution
for such situations. Use it instead.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/it913x.c | 29 -
1 file changed, 20 insertions(
Let the demod firmware estimate RF signal strength and return it
to the app as a dBm. To handle that, use thread which reads signal
strengths from firmware in 2 sec intervals when device is active.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 48 +
Use RegMap API to cover I2C register access routines.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/Kconfig | 1 +
drivers/media/tuners/it913x.c | 137 +
drivers/media/tuners/it913x_priv.h | 1 +
3 files changed, 34 insertions(+), 105
DVBv5 BER is calculated anyway, so just return it for legacy
read_ber() API too.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 9 +++--
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/media/dvb-frontends/af9033.c
b/drivers/media/dvb-frontend
Refactor code largely in order to satisfy me. Try to keep order of
register read/write same as windows driver does as it makes
comparing sniffs easier.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/it913x.c | 356 +++---
1 file changed, 194 insertion
Remove 'duplicate' DVBv3 read UCB implementation and return value,
calculated already for DVBv5 statistics.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/media/dvb-frontends/af9033.c
b/d
Remove unused tuner set template.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/it913x.c | 9 +
drivers/media/tuners/it913x_priv.h | 11 ---
2 files changed, 1 insertion(+), 19 deletions(-)
diff --git a/drivers/media/tuners/it913x.c b/drivers/media/tuners/it913x.
Statistics are now calculated for DVBv5 and those DVBv5 values are
returned for legacy DVBv3 calls also. So we could remove all old
statistics calculation logic.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 49
1 file changed, 49
AF9030 and IT9130 series has different memory location for firmware
version. Choose correct location according to chip type.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 17 -
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/media
Implement following API commands:
DTV_STAT_ERROR_BLOCK_COUNT
DTV_STAT_TOTAL_BLOCK_COUNT
These returns total and uncorrected error packets from outer FEC.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 33 -
1 file changed, 32 insertions
Correct issues reported by checkpatch.pl.
Signed-off-by: Antti Palosaari
---
drivers/media/usb/dvb-usb-v2/af9035.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c
b/drivers/media/usb/dvb-usb-v2/af9035.c
index 85f2c4b..f37cf7d 1006
Biggest problem of that function is complexity. Try reduce complexity:
* define macros to detect all 3 supported xfers
* remove duplicate message maximum size checks
Signed-off-by: Antti Palosaari
---
drivers/media/usb/dvb-usb-v2/af9035.c | 37 +--
1 file changed
Use device names for recent PCTV Systems devices:
PCTV AndroiDTV (78e)
PCTV microStick (79e)
Signed-off-by: Antti Palosaari
---
drivers/media/usb/dvb-usb-v2/af9035.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/dvb-usb-v2/af9035.c
b/drivers/media/usb
Return CNR via DVBv5 statistic API.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 54 ++--
1 file changed, 52 insertions(+), 2 deletions(-)
diff --git a/drivers/media/dvb-frontends/af9033.c
b/drivers/media/dvb-frontends/af9033.c
index
Convert driver to kernel I2C model.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.c | 236 +++---
drivers/media/dvb-frontends/af9033.h | 44 ++-
drivers/media/usb/dvb-usb-v2/af9035.c | 50 +--
drivers/media/usb/dvb-usb-v2/af9035.h |
I removed tuner_ prefix from the driver file names. Update
maintainers entry according to that.
Signed-off-by: Antti Palosaari
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index aefa948..182a4a1 100644
--- a/MAINTAINERS
+++ b/MAINT
I2C driver address is passed as a i2c_new_device() parameter when
device is created. Thus no need to keep it in config struct.
Signed-off-by: Antti Palosaari
---
drivers/media/dvb-frontends/af9033.h | 9 -
drivers/media/usb/dvb-usb-v2/af9035.c | 29 ++---
driver
Error on init leaves some internal divisor zero, which causes oops
later. Fix it by populating divisors even it fails.
Signed-off-by: Antti Palosaari
---
drivers/media/tuners/tuner_it913x.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/media/tuners/tuner_it913x.c
b/drivers/medi
Variable frame_size represents the size of plane luminance
here, not just frame size, its naming style should be unified
as frame_size_ch and frame_size_mv.
Signed-off-by: Zhaowei Yuan
---
drivers/media/platform/s5p-mfc/s5p_mfc_opr_v5.c |8
1 file changed, 4 insertions(+), 4 deletio
It should take ctx->dst_fmt->num_planes as
the loop condition for CAPTURE.
Signed-off-by: Zhaowei Yuan
---
drivers/media/platform/s5p-mfc/s5p_mfc_dec.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c
b/drivers/media/platform/s5
Em Thu, 04 Sep 2014 04:27:57 +0300
Antti Palosaari escreveu:
> > By being shorter, a reviewer can read it faster and, at least for
> > me, it is a non-brain to understand !foo. On the other hand,
> > "false" is not part of standard C. So, it takes more time for my
> > brain to parse it.
>
> No,
This message is generated daily by a cron job that builds media_tree for
the kernels and architectures in the list below.
Results of the daily build of media_tree:
date: Thu Sep 4 04:00:19 CEST 2014
git branch: test
git hash: 89fffac802c18caebdf4e91c0785b522c9f6399a
gcc versi
On 09/04/2014 04:12 AM, Mauro Carvalho Chehab wrote:
Em Thu, 04 Sep 2014 02:56:19 +0300
Antti Palosaari escreveu:
Which is static analyzer you are referring to fix these?
Coccinelle. See: scripts/coccinelle/misc/boolinit.cocci
Using true/false for boolean datatype sounds OK, but personal
Em Thu, 04 Sep 2014 02:56:19 +0300
Antti Palosaari escreveu:
> Which is static analyzer you are referring to fix these?
Coccinelle. See: scripts/coccinelle/misc/boolinit.cocci
> Using true/false for boolean datatype sounds OK, but personally I
> dislike use of negation operator. For my eyes (f
Map V4L2_CID_TILT_SPEED and V4L2_CID_PAN_SPEED to the standard UVC
CT_PANTILT_RELATIVE_CONTROL terminal control request.
Tested by plugging a Logitech ConferenceCam C3000e USB camera
and controlling pan/tilt from the userspace using the VIDIOC_S_CTRL ioctl.
Verified that it can pan and tilt at the
On Thu, Sep 4, 2014 at 4:40 AM, Vincent Palatin wrote:
> Map V4L2_CID_TILT_SPEED and V4L2_CID_PAN_SPEED to the standard UVC
> CT_PANTILT_RELATIVE_CONTROL terminal control request.
>
> Tested by plugging a Logitech ConferenceCam C3000e USB camera
> and controlling pan/tilt from the userspace using
Which is static analyzer you are referring to fix these?
Using true/false for boolean datatype sounds OK, but personally I
dislike use of negation operator. For my eyes (foo = 0) / (foo == false)
is better and I have changed all the time negate operators to equal
operators from my drivers.
r
Sparse is complaining about ngene's bad usage of a __user ptr:
>> drivers/media/pci/ngene/ngene-dvb.c:62:48: sparse: incorrect type in
>> argument 2 (different address spaces)
drivers/media/pci/ngene/ngene-dvb.c:62:48:expected unsigned char const
[usertype] *buf
drivers/media/pci/ngene
c->ptr was already copied to Kernelspace. So, this sparse warning
is bogus:
>> drivers/media/v4l2-core/v4l2-ctrls.c:1685:15: sparse: incorrect type in
>> assignment (different address spaces)
drivers/media/v4l2-core/v4l2-ctrls.c:1685:15:expected void *[assigned] p
drivers/media/v4l2-cor
As reported by cocinelle:
drivers/media/tuners/xc4000.c:573:2-28: code aligned with following code on
line 574
drivers/media/tuners/xc4000.c:575:2-29: code aligned with following code on
line 576
drivers/media/tuners/xc4000.c:577:2-29: code aligned with following code on
line 578
drivers/media/
As reported by cocinelle:
drivers/media/dvb-frontends/sp8870.c:395:2-14: code aligned with following code
on line 397
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/sp8870.c
b/drivers/media/dvb-frontends/sp8870.c
index 2aa8ef76eba2..57dc2abaa87b 100644
--- a/dri
drivers/media/dvb-frontends/drxk_hard.c:2224:3-22: code aligned with following
code on line 2227
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/drxk_hard.c
b/drivers/media/dvb-frontends/drxk_hard.c
index 88182c18e186..672195147d01 100644
--- a/drivers/media/dvb-f
As reported by cocinelle:
drivers/media/tuners/tuner-xc2028.c:182:2-18: code aligned with following code
on line 183
drivers/media/tuners/tuner-xc2028.c:184:2-19: code aligned with following code
on line 185
drivers/media/tuners/tuner-xc2028.c:186:2-19: code aligned with following code
on line
As reported by cocinelle:
drivers/media/dvb-frontends/drxd_hard.c:2632:3-51: code aligned with following
code on line 2633
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/drxd_hard.c
b/drivers/media/dvb-frontends/drxd_hard.c
index ae2276db77bc..961641b67728 10064
Em Wed, 03 Sep 2014 22:49:47 +0200
Hans Verkuil escreveu:
> On 09/03/2014 10:32 PM, Mauro Carvalho Chehab wrote:
> > Instead of allocating and coping from __user, do it using
> > one atomic call. That makes the code simpler. Also,
>
> Also what?
I added a comment about IS_ERR(new_bitmap), and r
Em Wed, 3 Sep 2014 22:44:02 +0200 (CEST)
Guennadi Liakhovetski escreveu:
> Hi Mauro,
>
> On Wed, 3 Sep 2014, Mauro Carvalho Chehab wrote:
>
> > Instead of calling kzalloc and then copying, use kmemdup(). That
> > avoids zeroing the data structure before copying.
> >
> > Found by coccinelle.
>
On 09/03/2014 10:32 PM, Mauro Carvalho Chehab wrote:
> Instead of allocating and coping from __user, do it using
> one atomic call. That makes the code simpler. Also,
Also what?
Anyway, looks good to me:
Acked-by: Hans Verkuil
Regards,
Hans
>
> Found by coccinelle.
>
> Signed-off-b
Hi Mauro,
On Wed, 3 Sep 2014, Mauro Carvalho Chehab wrote:
> Instead of calling kzalloc and then copying, use kmemdup(). That
> avoids zeroing the data structure before copying.
>
> Found by coccinelle.
>
> Signed-off-by: Mauro Carvalho Chehab
>
> diff --git a/drivers/media/platform/soc_camer
On Wed, Sep 3, 2014 at 9:33 PM, Mauro Carvalho Chehab
wrote:
> Instead of allocating a var to store 0 and just return it,
> change the code to return 0 directly.
>
Acked-by: Lad, Prabhakar
Regards,
--Prabhakar Lad
> Signed-off-by: Mauro Carvalho Chehab
>
> diff --git a/drivers/media/platform/
We don't use semicolons after curly braces in the middle of the
code.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/i2c/s5k5baf.c b/drivers/media/i2c/s5k5baf.c
index 564f05f2c9ef..0e461a6fd065 100644
--- a/drivers/media/i2c/s5k5baf.c
+++ b/drivers/media/i2c/s5k5baf.c
@@ -816,7
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/af9013.c
b/drivers/media/dvb-frontends/af9013.c
index ecf6388d2200..8001690d7576 100644
--- a/drivers/media/dvb-frontends/af9013.c
+++ b/drivers/media/d
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/tuners/mt2060.c b/drivers/media/tuners/mt2060.c
index 13381de58a84..b87b2549d58d 100644
--- a/drivers/media/tuners/mt2060.c
+++ b/drive
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/usb/cx231xx/cx231xx-dvb.c
b/drivers/media/usb/cx231xx/cx231xx-dvb.c
index 2adfecf70236..6c7b5e250eed 100644
--- a/drivers/media/usb/cx
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/omap3isp/ispccdc.c
b/drivers/media/platform/omap3isp/ispccdc.c
index cabf46b4b645..81a9dc053d58 100644
--- a/drivers/media/platform/omap3isp/ispccdc.c
+++ b/
Instead of calling kzalloc and then copying, use kmemdup(). That
avoids zeroing the data structure before copying.
Found by coccinelle.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/soc_camera/soc_camera.c
b/drivers/media/platform/soc_camera/soc_camera.c
index f4308f
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/pci/saa7164/saa7164-api.c
b/drivers/media/pci/saa7164/saa7164-api.c
index e042963d377d..4f3b1dd18ba4 100644
--- a/drivers/media/pci/sa
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/tda10071.c
b/drivers/media/dvb-frontends/tda10071.c
index 9619be5d4827..4a19b85995f1 100644
--- a/drivers/media/dvb-frontends/tda10071.c
+++ b/drivers/m
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/v4l2-core/tuner-core.c
b/drivers/media/v4l2-core/tuner-core.c
index 177023200737..559f8372e2eb 100644
--- a/drivers/media/v4l2-core/tuner-core.c
+++ b/drivers/media/v
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/davinci/vpfe_capture.c
b/drivers/media/platform/davinci/vpfe_capture.c
index ed9dd27e3c63..c557eb5ebf6b 100644
--- a/drivers/
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/exynos4-is/fimc-isp-video.c
b/drivers/media/platform/exynos4-is/fimc-isp-video.c
index 93f9cf2ebcd6..9d8d885558e5 100644
---
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/tuners/mxl5005s.c b/drivers/media/tuners/mxl5005s.c
index b473b76cb278..92a3be4fde87 100644
--- a/drivers/media/tuners/mxl5005s.c
+++ b
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/media-devnode.c b/drivers/media/media-devnode.c
index 7acd19c881de..ebf9626e5ae5 100644
--- a/drivers/media/media-devnode.c
+++ b/drive
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/rc/fintek-cir.c b/drivers/media/rc/fintek-cir.c
index f0a1f7d31ee6..b5167573240e 100644
--- a/drivers/media/rc/fintek-cir.c
+++ b/drive
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/stv0367.c
b/drivers/media/dvb-frontends/stv0367.c
index 764577218974..59f622ae80e8 100644
--- a/drivers/media/dvb-fronte
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/rc/ite-cir.c b/drivers/media/rc/ite-cir.c
index 447fe35862dc..56abf9120cc2 100644
--- a/drivers/media/rc/ite-cir.c
+++ b/drivers/media/
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/cxd2820r_c.c
b/drivers/media/dvb-frontends/cxd2820r_c.c
index 0f4657e01cde..149fdca3fb44 100644
--- a/drivers/media/dvb-frontends/cxd2820r_c.c
+++ b/dri
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/rc/nuvoton-cir.c b/drivers/media/rc/nuvoton-cir.c
index 7f4fd859bba5..9c2c8635ff33 100644
--- a/drivers/media/rc/nuvoton-cir.c
+++ b/dr
The error return code STV0900_NO_ERROR happens only once, at
the end of the functions. So, just return it directly.
This driver should actually be fixed to return standard
Linux error codes, instead of its own macros, but this
should be done on a separate patchset.
Signed-off-by: Mauro Carvalho C
Instead of using 0 or 1 for boolean, use the true/false
defines.
Also, instead of testing foo == false, just use the
simplified notation if(!foo).
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/rtl2832.c
b/drivers/media/dvb-frontends/rtl2832.c
index fdbed35c87fa.
Instead of allocating a var to store 0 and just return it,
change the code to return 0 directly.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/common/siano/smscoreapi.c
b/drivers/media/common/siano/smscoreapi.c
index 050984c5b1e3..a3677438205e 100644
--- a/drivers/media/common
Instead of using if (on == true), just use
if (on).
That allows a faster mental parsing when analyzing the
code.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/i2c/lm3560.c b/drivers/media/i2c/lm3560.c
index c23de593c17d..d9ece4b2d047 100644
--- a/drivers/media/i2c/lm3560.c
+++
Instead of using if (foo == false), just use
if (!foo).
That allows a faster mental parsing when analyzing the
code.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/via-camera.c
b/drivers/media/platform/via-camera.c
index 00d431293190..ae6870cb8339 100644
--- a/drivers
lml33dpatch is boolean. So, the possible values are
true or false.
Instead of using if (lml33dpath), just use
if (!lml33dpath).
That allows a faster mental parsing when analyzing the
code.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/pci/zoran/zoran_device.c
b/drivers/media
Make sure pm_runtime_* calls does not use unnecessary
IS_ERR_VALUE().
Reported by scripts/coccinelle/api/pm_runtime.cocci script.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/s5p-tv/hdmi_drv.c
b/drivers/media/platform/s5p-tv/hdmi_drv.c
index 754740f4b671..37c8bd694c
Instead of using if (foo == false), just use
if (!foo).
That allows a faster mental parsing when analyzing the
code.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/tuners/e4000.c b/drivers/media/tuners/e4000.c
index 90d93348f20c..cd9cf643f602 100644
--- a/drivers/media/tuners/e
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/radio/radio-gemtek.c
b/drivers/media/radio/radio-gemtek.c
index 235c0e349820..cff1eb144a5c 100644
--- a/drivers/media/radio/radio-gemtek.c
+++ b/drivers/media/radio/r
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/i2c/smiapp/smiapp-core.c
b/drivers/media/i2c/smiapp/smiapp-core.c
index c4cc5de3ae59..d312932bc56e 100644
--- a/drivers/media/i2c/smiapp/smiapp-core.c
+++ b/drivers/m
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/usb/dvb-usb/af9005.c
b/drivers/media/usb/dvb-usb/af9005.c
index af176b6ce738..3f4361e48a32 100644
--- a/drivers/media/usb/dvb-usb/af9005.c
+++ b/drivers/media/usb/dvb
instead of testing bools if they are false or true, just use
if (!foo) or if (foo). That makes the code easier to
read and shorter.
Also, properly initialize booleans with true or false.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/omap/omap_vout.c
b/drivers/media/p
Instead of using if (foo == false), just use
if (!foo).
That allows a faster mental parsing when analyzing the
code.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/usb/msi2500/msi2500.c
b/drivers/media/usb/msi2500/msi2500.c
index 71e0960b46c0..e980aaa47b7c 100644
--- a/drivers
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/i2c/soc_camera/ov9740.c
b/drivers/media/i2c/soc_camera/ov9740.c
index ea76863dfdb4..ee9eb635d540 100644
--- a/drivers/media/i2c/soc_camera/ov9740.c
+++ b/drivers/medi
We don't use semicolons after curly braces in the middle of the
code.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/soc_camera/pxa_camera.c
b/drivers/media/platform/soc_camera/pxa_camera.c
index 64dc80ccd6f9..66178fc9f9eb 100644
--- a/drivers/media/platform/soc_camera
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/ti-vpe/vpe.c
b/drivers/media/platform/ti-vpe/vpe.c
index 773b1fbf3269..febeca70211b 100644
--- a/drivers/media/platform/ti-vpe/vpe.c
+++ b/drivers/media/plat
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/rc/ene_ir.c b/drivers/media/rc/ene_ir.c
index d16d9b496b92..e80f2c6c5f1a 100644
--- a/drivers/media/rc/ene_ir.c
+++ b/drivers/media/rc/ene_ir.c
@@ -979,7 +979,7 @@ sta
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/usb/dvb-usb-v2/lmedm04.c
b/drivers/media/usb/dvb-usb-v2/lmedm04.c
index e332af731187..9f2c5459b73a 100644
--- a/drivers/media/usb/dvb-usb-v2/lmedm04.c
+++ b/drivers/m
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/usb/au0828/au0828-dvb.c
b/drivers/media/usb/au0828/au0828-dvb.c
index 4bd9d687d2d6..00ab1563d142 100644
--- a/drivers/media/usb/au0828/au0828-dvb.c
+++ b/drivers/medi
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/platform/vivid/vivid-tpg.c
b/drivers/media/platform/vivid/vivid-tpg.c
index 8576b2c1d4a1..57ff428c897e 100644
--- a/drivers/media/platform/vivid/vivid-tpg.c
+++ b/dri
We don't use semicolons after curly braces in the middle of the
code.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c
b/drivers/media/pci/bt8xx/bttv-driver.c
index 970e542d3a51..750bdab8aacb 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers
instead of testing if it is false or true, just use
if (!foo) or if (foo). That makes the code easier to
read and shorter.
Also, properly initialize booleans with true or false.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/drxk_hard.c
b/drivers/media/dvb-fronte
Instead of using 0 or 1 for boolean, use the true/false
defines.
Signed-off-by: Mauro Carvalho Chehab
diff --git a/drivers/media/dvb-frontends/m88ds3103.c
b/drivers/media/dvb-frontends/m88ds3103.c
index 6eae2c619843..81657e94c5a4 100644
--- a/drivers/media/dvb-frontends/m88ds3103.c
+++ b/driver
1 - 100 of 134 matches
Mail list logo