Commit graph

6 commits

Author SHA1 Message Date
Mauro Carvalho Chehab 13122f98c6 [media] dib8000: fix a warning
drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_wait_lock':
drivers/media/dvb-frontends/dib8000.c:3972:1: warning: 'value' may be used uninitialized in this function [-Wmaybe-uninitialized]
drivers/media/dvb-frontends/dib8000.c:2419:6: note: 'value' was declared here

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25 15:25:19 -03:00
Mauro Carvalho Chehab 746f7ae0e9 [media] dib8000: Fix sub-channel range
isdbt_sb_subchannel is unsigned with 8 bits. So, it will
never be -1. Instead, any value bigger than 13 is invalid.

As is, the current code generates the following warnings:

drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_set_isdbt_common_channel':
drivers/media/dvb-frontends/dib8000.c:2358:3: warning: comparison is always true due to limited range of data type [-Wtype-limits]
drivers/media/dvb-frontends/dib8000.c: In function 'dib8000_tune':
drivers/media/dvb-frontends/dib8000.c:3107:8: warning: comparison is always false due to limited range of data type [-Wtype-limits]
drivers/media/dvb-frontends/dib8000.c:3153:9: warning: comparison is always false due to limited range of data type [-Wtype-limits]
drivers/media/dvb-frontends/dib8000.c:3160:5: warning: comparison is always false

It should also be noticed that ARIB STD-B31, item
"3.15.6.8 Number of segments" at TMCC table defines the
value 15 for unused segment, and 14 as reserved.

So, better to change the check to consider any value
bigger than 13 to mean that sub-channels should be
disabled, fixing the warning and doing the right thing
even if an invalid value is filled by userspace.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25 15:13:49 -03:00
Mauro Carvalho Chehab c82056d0b4 [media] dib8000: store dtv_property_cache in a temp var
dtv_property_cache is used on several places on very long lines.

On all places it is used, a long list of struct reference is done.

Instead of doing it, at the routines where it is used more than once,
replace it by one temporary var. That may help the compiler to
use a better code. It also makes easier to review the code, as the
lines becomes closer to 80 columns, making them a way clearer
to read.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25 10:51:15 -03:00
Mauro Carvalho Chehab 6f7ee06f4e [media] dib8000: warning fix: declare internal functions as static
drivers/media/dvb-frontends/dib8000.c:2412:5: warning: no previous prototype for 'dib8000_wait_lock' [-Wmissing-prototypes]
drivers/media/dvb-frontends/dib8000.c:2688:5: warning: no previous prototype for 'dib8000_get_symbol_duration' [-Wmissing-prototypes]

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-25 10:36:56 -03:00
Patrick Boettcher 173a64cb3f [media] dib8000: enhancement
The intend of this patch is to improve the support of the dib8000.

Signed-off-by: Olivier Grenie <olivier.grenie@parrot.com>
Signed-off-by: Patrick Boettcher <patrick.boettcher@parrot.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-04-22 16:58:16 -03:00
Mauro Carvalho Chehab 9a0bf528b4 [media] move the dvb/frontends to drivers/media/dvb-frontends
Raise the DVB frontends one level up, as the intention is to remove
the drivers/media/dvb directory.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13 23:13:41 -03:00
Renamed from drivers/media/dvb/frontends/dib8000.c (Browse further)