summaryrefslogtreecommitdiffstats
path: root/drivers/media/tuners/tuner-xc2028.c
Commit message (Collapse)AuthorAgeFilesLines
* [media] tuner-xc2028: fix bad alignmentsMauro Carvalho Chehab2014-09-031-31/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 187 drivers/media/tuners/tuner-xc2028.c:188:2-17: code aligned with following code on line 189 drivers/media/tuners/tuner-xc2028.c:190:2-19: code aligned with following code on line 191 drivers/media/tuners/tuner-xc2028.c:192:2-19: code aligned with following code on line 193 drivers/media/tuners/tuner-xc2028.c:194:2-18: code aligned with following code on line 195 drivers/media/tuners/tuner-xc2028.c:196:2-17: code aligned with following code on line 197 drivers/media/tuners/tuner-xc2028.c:198:2-18: code aligned with following code on line 199 drivers/media/tuners/tuner-xc2028.c:200:2-19: code aligned with following code on line 201 drivers/media/tuners/tuner-xc2028.c:202:2-18: code aligned with following code on line 203 drivers/media/tuners/tuner-xc2028.c:204:2-16: code aligned with following code on line 205 drivers/media/tuners/tuner-xc2028.c:206:2-20: code aligned with following code on line 207 drivers/media/tuners/tuner-xc2028.c:208:2-17: code aligned with following code on line 209 drivers/media/tuners/tuner-xc2028.c:210:2-18: code aligned with following code on line 211 drivers/media/tuners/tuner-xc2028.c:212:2-18: code aligned with following code on line 213 drivers/media/tuners/tuner-xc2028.c:214:2-18: code aligned with following code on line 215 drivers/media/tuners/tuner-xc2028.c:216:2-16: code aligned with following code on line 217 drivers/media/tuners/tuner-xc2028.c:218:2-18: code aligned with following code on line 219 drivers/media/tuners/tuner-xc2028.c:220:2-20: code aligned with following code on line 221 drivers/media/tuners/tuner-xc2028.c:222:2-21: code aligned with following code on line 223 drivers/media/tuners/tuner-xc2028.c:224:2-20: code aligned with following code on line 225 drivers/media/tuners/tuner-xc2028.c:226:2-23: code aligned with following code on line 227 drivers/media/tuners/tuner-xc2028.c:228:2-23: code aligned with following code on line 229 drivers/media/tuners/tuner-xc2028.c:230:2-22: code aligned with following code on line 231 drivers/media/tuners/tuner-xc2028.c:232:2-24: code aligned with following code on line 233 drivers/media/tuners/tuner-xc2028.c:234:2-19: code aligned with following code on line 235 drivers/media/tuners/tuner-xc2028.c:236:2-19: code aligned with following code on line 237 drivers/media/tuners/tuner-xc2028.c:238:2-20: code aligned with following code on line 239 drivers/media/tuners/tuner-xc2028.c:240:2-19: code aligned with following code on line 241 Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc2028: remove unnecessary break after gotoFabian Frederick2014-07-221-1/+0
| | | | | Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] xc2028: add missing break to switchAntti Palosaari2014-04-061-0/+1
| | | | | | | | | | | | 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>
* [media] xc2028: silence compiler warningsAntti Palosaari2014-03-051-0/+3
| | | | | | | | | | | | | | | 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>
* [media] tuner-xc2028: Don't read status if device is powered downMauro Carvalho Chehab2014-01-101-4/+17
| | | | | | | | | | | | | | | | | 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>
* [media] tuner-xc2028: Don't try to sleep twiceMauro Carvalho Chehab2014-01-101-3/+13
| | | | | | | | 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>
* [media] tuner-xc2028: remove unused codeMauro Carvalho Chehab2014-01-051-9/+0
| | | | | | | 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>
* [media] tuner-xc2028: Don't use dynamic static allocationMauro Carvalho Chehab2013-11-081-1/+7
| | | | | | | | | | | | | | | | | 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>
* [media] tuner-xs2028.c: fix sparse warningsHans Verkuil2013-10-151-2/+2
| | | | | | | | | 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>
* [media] media: tuners: Remove redundant NULL check before kfreeSyam Sidhardhan2013-03-181-2/+1
| | | | | | | 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>
* [media] tuners/xc2028: Replace memcpy with struct assignmentEzequiel Garcia2012-12-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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>
* [media] common: move media/common/tuners to media/tunersMauro Carvalho Chehab2012-08-131-0/+1509
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>
OpenPOWER on IntegriCloud