summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2014-09-08[media] cx23885: convert to vb2Hans Verkuil
As usual, this patch is very large due to the fact that half a vb2 conversion isn't possible. And since this affects 417, alsa, core, dvb, vbi and video the changes are all over. What made this more difficult was the peculiar way the risc program was setup. The driver allowed for running out of buffers in which case the DMA would stop and restart when the next buffer was queued. There was also a complicated timeout system for when buffers weren't filled. This was replaced by a much simpler scheme where there is always one buffer around and the DMA will just cycle that buffer until a new buffer is queued. In that case the previous buffer will be chained to the new buffer. An interrupt is generated at the start of the new buffer telling the driver that the previous buffer can be passed on to userspace. Much simpler and more robust. The old code seems to be copied from the cx88 driver. But it didn't fit the vb2 ops very well and replacing it with the new scheme made the code easier to understand. Not to mention that this patch removes 600 lines of code. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] vivid: tpg_reset_source prototype mismatchHans Verkuil
Replaced enum v4l2_field by u32, just as the prototype in the header has. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] vivid: add missing includesHans Verkuil
Fix kbuild test robot warnings about missing vmalloc.h and string.h includes. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] vivid: remove duplicate and unused g/s_edid functionsHans Verkuil
I'm not sure how I missed this, but they should be removed. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] trivial: drivers/media/usb/gspca/gspca.h: indent with TABs, not spacesAntonio Ospite
Signed-off-by: Antonio Ospite <ao2@ao2.it> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] trivial: drivers/media/usb/gspca/gspca.c: fix the indentation of a ↵Antonio Ospite
comment Fix indentation of a comment, put it on the same level of the code it refers to. Signed-off-by: Antonio Ospite <ao2@ao2.it> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] m88ts2022: change parameter type of m88ts2022_cmdAntti Palosaari
It is driver internal function and does not need anything from frontend structure. Due to that change parameter type to driver state which is better for driver internal functions. Also remove one unused variable from state itself. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] m88ts2022: convert to RegMap I2C APIAntti Palosaari
Use RegMap to cover I2C register routines. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] m88ts2022: clean up loggingAntti Palosaari
There is no need to print module name nor function name as those are done by kernel logging system when dev_xxx logging is used and driver is proper I2C driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] m88ts2022: rename device state (priv => dev)Antti Palosaari
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 <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-08[media] ngene: properly handle __user ptrMauro Carvalho Chehab
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/ngene-dvb.c:62:48: got char const [noderef] <asn:1>*buf As this is intercepting a .write() file ops, we can't just memcpy. We need to use copy_from_user. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-04[media] tw68: make tw68_pci_tbl static and constifyMauro Carvalho Chehab
drivers/media/pci/tw68/tw68-core.c:72:22: warning: symbol 'tw68_pci_tbl' was not declared. Should it be static? Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-04[media] tw68: refactor and cleanup the tw68 driverHans Verkuil
Refactor and clean up the tw68 driver. It's now using the proper V4L2 core frameworks. Tested with my Techwell tw6805a and tw6816 grabber boards. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-04[media] tw68: add original tw68 codeHans Verkuil
This tw68 driver has been out-of-tree for many years on gitorious: https://gitorious.org/tw68/tw68-v2. This copies that code to the kernel as a record of that original code. Note that William Brack's email address in these sources is no longer valid and I have not been able to contact him. However, all the code is standard GPL. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] drxk_hard: fix bad alignmentsMauro Carvalho Chehab
drivers/media/dvb-frontends/drxk_hard.c:2224:3-22: code aligned with following code on line 2227 Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] drxd_hard: fix bad alignmentsMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] sp8870: fix bad alignmentsMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] tuner-xc2028: fix bad alignmentsMauro Carvalho Chehab
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>
2014-09-03[media] xc4000: Fix bad alignmentsMauro Carvalho Chehab
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/tuners/xc4000.c:579:2-27: code aligned with following code on line 580 drivers/media/tuners/xc4000.c:581:2-29: code aligned with following code on line 582 drivers/media/tuners/xc4000.c:583:2-29: code aligned with following code on line 584 drivers/media/tuners/xc4000.c:585:2-28: code aligned with following code on line 586 drivers/media/tuners/xc4000.c:587:2-27: code aligned with following code on line 588 drivers/media/tuners/xc4000.c:589:2-28: code aligned with following code on line 590 drivers/media/tuners/xc4000.c:591:2-29: code aligned with following code on line 592 drivers/media/tuners/xc4000.c:593:2-28: code aligned with following code on line 594 drivers/media/tuners/xc4000.c:595:2-26: code aligned with following code on line 596 drivers/media/tuners/xc4000.c:597:2-30: code aligned with following code on line 598 drivers/media/tuners/xc4000.c:599:2-27: code aligned with following code on line 600 drivers/media/tuners/xc4000.c:601:2-28: code aligned with following code on line 602 drivers/media/tuners/xc4000.c:603:2-28: code aligned with following code on line 604 drivers/media/tuners/xc4000.c:605:2-28: code aligned with following code on line 606 drivers/media/tuners/xc4000.c:607:2-26: code aligned with following code on line 608 drivers/media/tuners/xc4000.c:609:2-28: code aligned with following code on line 610 drivers/media/tuners/xc4000.c:611:2-30: code aligned with following code on line 612 drivers/media/tuners/xc4000.c:613:2-31: code aligned with following code on line 614 drivers/media/tuners/xc4000.c:615:2-30: code aligned with following code on line 616 drivers/media/tuners/xc4000.c:617:2-33: code aligned with following code on line 618 drivers/media/tuners/xc4000.c:619:2-33: code aligned with following code on line 620 drivers/media/tuners/xc4000.c:621:2-32: code aligned with following code on line 622 drivers/media/tuners/xc4000.c:623:2-34: code aligned with following code on line 624 drivers/media/tuners/xc4000.c:625:2-29: code aligned with following code on line 626 drivers/media/tuners/xc4000.c:627:2-29: code aligned with following code on line 628 drivers/media/tuners/xc4000.c:629:2-30: code aligned with following code on line 630 drivers/media/tuners/xc4000.c:631:2-29: code aligned with following code on line 632 Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] cx231xx: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] mxl5005s: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] mt2060: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] nuvoton-cir: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] ite-cir: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] fintek-cir: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] marvel-ccic: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] davinci: just return 0 instead of using a varMauro Carvalho Chehab
Instead of allocating a var to store 0 and just return it, change the code to return 0 directly. Acked-by: "Lad, Prabhakar" <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] saa7164: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] bt8xx: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] media-devnode: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] stv0367: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] siano: just return 0 instead of using a varMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] s5p-tv: Simplify the return logicMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] e4000: simplify boolean testsMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] via-camera: simplify boolean testsMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] omap: simplify test logicMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] lm3560: simplify a boolean testMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] lm3560: simplify boolean testsMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] drxk_hard: simplify test logicMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] msi2500: simplify boolean testsMauro Carvalho Chehab
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 <m.chehab@samsung.com>
2014-09-03[media] af9005: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] lmedm04: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] au0828-dvb: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] ene_ir: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] radio: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] vivid-tpg: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] ti-vpe: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] omap3isp: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] ov9740: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-09-03[media] smiapp-core: use true/false for boolean varsMauro Carvalho Chehab
Instead of using 0 or 1 for boolean, use the true/false defines. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>