aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/tuner-xc2028.c
AgeCommit message (Collapse)Author
2014-04-06[media] xc2028: add missing break to switchAntti Palosaari
Coverity CID 1196501: Missing break in switch (MISSING_BREAK) I introduced that bug recently by commit 96a5b3a869e3dc7d55bf04a48a8dca8a4025787e. As a result, it will flood unintentionally error message to log. Reported-by: <scan-admin@coverity.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-03-05[media] xc2028: silence compiler warningsAntti Palosaari
There is now new tuner types which are not handled on that switch-case. Print error if unknown tuner type is meet. drivers/media/tuners/tuner-xc2028.c: In function ‘generic_set_freq’: drivers/media/tuners/tuner-xc2028.c:1037:2: warning: enumeration value ‘V4L2_TUNER_ADC’ not handled in switch [-Wswitch] switch (new_type) { ^ drivers/media/tuners/tuner-xc2028.c:1037:2: warning: enumeration value ‘V4L2_TUNER_RF’ not handled in switch [-Wswitch] Cc: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-10[media] tuner-xc2028: Don't read status if device is powered downMauro Carvalho Chehab
That removes those timeout errors: [ 3675.930940] xc2028 19-0061: Device is Xceive 3028 version 1.0, firmware version 2.7 [ 3676.060487] xc2028 19-0061: divisor= 00 00 8d d0 (freq=567.250) [ 3676.349449] xc2028 19-0061: Putting xc2028/3028 into poweroff mode. [ 3698.247645] xc2028 19-0061: xc2028_get_reg 0002 called [ 3698.253276] em2860 #0: I2C transfer timeout on writing to addr 0xc2 [ 3698.253301] xc2028 19-0061: i2c input error: rc = -121 (should be 2) [ 3698.253327] xc2028 19-0061: xc2028_signal called [ 3698.253339] xc2028 19-0061: xc2028_get_reg 0002 called [ 3698.259283] em2860 #0: I2C transfer timeout on writing to addr 0xc2 [ 3698.259312] xc2028 19-0061: i2c input error: rc = -121 (should be 2) Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-10[media] tuner-xc2028: Don't try to sleep twiceMauro Carvalho Chehab
Only send a power down command for the device if it is not already in power down state. That prevents a timeout when trying to talk with the device. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-01-05[media] tuner-xc2028: remove unused codeMauro Carvalho Chehab
This macro is not used. remove it. Reviewed-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-11-08[media] tuner-xc2028: Don't use dynamic static allocationMauro Carvalho Chehab
Dynamic static allocation is evil, as Kernel stack is too low, and compilation complains about it on some archs: drivers/media/tuners/tuner-xc2028.c:651:1: warning: 'load_firmware' uses dynamic stack allocation [enabled by default] Instead, let's enforce a limit for the buffer. In the specific case of this driver, the maximum limit is 80, used only on tm6000 driver. This limit is due to the size of the USB control URBs. Ok, it would be theoretically possible to use a bigger size on PCI devices, but the firmware load time is already good enough. Anyway, if some usage requires more, it is just a matter of also increasing the buffer size at load_firmware(). Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-10-15[media] tuner-xs2028.c: fix sparse warningsHans Verkuil
drivers/media/tuners/tuner-xc2028.c:575:24: warning: cast to restricted __le16 drivers/media/tuners/tuner-xc2028.c:686:21: warning: cast to restricted __le16 Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2013-03-18[media] media: tuners: Remove redundant NULL check before kfreeSyam Sidhardhan
kfree on NULL pointer is a no-op. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-12-27[media] tuners/xc2028: Replace memcpy with struct assignmentEzequiel Garcia
This kind of memcpy() is error-prone. Its replacement with a struct assignment is prefered because it's type-safe and much easier to read. Found by coccinelle. Hand patched and reviewed. Tested by compilation only. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> @@ identifier struct_name; struct struct_name to; struct struct_name from; expression E; @@ -memcpy(&(to), &(from), E); +to = from; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-08-13[media] common: move media/common/tuners to media/tunersMauro Carvalho Chehab
Move the tuners one level up, as the "common" directory will be used by drivers that are shared between more than one driver. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>