aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
Commit message (Collapse)AuthorAge
* [media] media: usb: dvb-usb-v2: mxl111sf.c: Cleaning up uninitialized variablesRickard Strandqvist2014-07-04
| | | | | | | | | | There is a risk that the variable will be used without being initialized. This was largely found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drivers/media: Remove useless return variablesPeter Senna Tschudin2014-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret when strict return - ret + C ; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] drivers/media/usb/usbvision/usbvision-core.c: Remove useless return ↵Peter Senna Tschudin2014-07-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | variables This patch remove variables that are initialized with a constant, are never updated, and are only used as parameter of return. Return the constant instead of using a variable. Verified by compilation only. The coccinelle script that find and fixes this issue is: // <smpl> @@ type T; constant C; identifier ret; @@ - T ret = C; ... when != ret when strict return - ret + C ; // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] em28xx: add MSI Digivox Trio supportHans Verkuil2014-07-04
| | | | | | | | Add support for the MSI Digivox Trio device. Signed-off-by: P. van Gaans <w3ird_n3rd@gmx.net> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] gspca_kinect: add support for the depth streamAntonio Ospite2014-07-04
| | | | | | | | | | Add support for the depth stream at 10bpp, for now use a 'depth_mode' command line parameter to switch between video and depth mode. Signed-off-by: Alexander Sosna <alexander@xxor.de> 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>
* [media] gspca: provide a mechanism to select a specific transfer endpointAntonio Ospite2014-07-04
| | | | | | | | | | | | | | | | | | Currently gspca selects the first ISOC input endpoint as the input transfer endpoint, however some devices can provide streams on endpoints different then the first one, so some subdrivers (e.g. gspca_kinect) may want to select a specific endpoint to use as a transfer endpoint. Add an xfer_ep field to struct gspca_dev, and change alt_xfer() so that it accepts a parameter which represents a specific endpoint address to look for. If a subdriver wants to specify a value for gspca_dev->xfer_ep it can do that in its sd_config() callback. 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>
* [media] technisat-sub2: Fix stream curruption on high bitrateCrazyCat2014-06-26
| | | | | | | Fix stream curruption on high bitrate (>60mbit). Signed-off-by: Evgeny Plehov <EvgenyPlehov@ukr.net> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] au0828: don't hardcode height/widthMauro Carvalho Chehab2014-06-19
| | | | | | | | | | While this device doesn't have a scaler (or have it disabled), the screen dimentions are a function of the standard. Ok, right now, only 480 lines standards are implemented, although it supports other ones. Yet, let's calculate the size, to make easier to add more standards latter. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] au0828: Only alt setting logic when neededMauro Carvalho Chehab2014-06-19
| | | | | | | | | | | | | | | | | | | It seems that there's a bug at au0828 hardware/firmware related to alternate setting: when the device is already at alt 5, a further call causes the URBs to receive -ESHUTDOWN. I found two different encarnations of this issue: 1) at qv4l2, it fails the second time we try to open the video screen; 2) at xawtv, when audio underrun occurs, with is very frequent, at least on my test machine. The fix is simple: just check if alt=5 before calling set_usb_interface(). Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] au0828/au8522: Add PAL-M supportMauro Carvalho Chehab2014-06-19
| | | | Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] au0828: add missing tuner Kconfig dependencyMauro Carvalho Chehab2014-06-19
| | | | | | | The analog part of au0828 is missing the tuner Kconfig dependency. That makes the device to not work while in analog mode. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] dib8000: export just one symbolMauro Carvalho Chehab2014-06-17
| | | | | | | | | | | | | | | | Exporting multiple symbols don't work as it causes compilation breakages, due to the way dvb_attach() works. The bug happens when: CONFIG_DVB_DIB8000=m CONFIG_DVB_USB_DIB0700=y As a bonus, dib8000 won't be loaded anymore if the device uses a different frontend, reducing the memory footprint. Tested with both Pixelview PV-D231 and MyGica S870. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] dib8000: rename dib8000_attach to dib8000_initMauro Carvalho Chehab2014-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Well, what we call as "foo_attach" is the method that should be called by the dvb_attach() macro. It should be noticed that the name "dvb_attach" is really a bad name and don't express what it does. dvb_attach() basically does three things, if the frontend is compiled as a module: - It lookups for the module that it is known to have the given symbol name and requests such module; - It increments the module usage (anonymously - so lsmod doesn't print who loaded the module); - after loading the module, it runs the function associated with the dynamic symbol. When compiled as builtin, it just calls the function given to it. As dvb_attach() increments refcount, it can't be (easily) called more than once for the same module, or the kernel will deny to remove the module, because refcount will never be zeroed. In other words, the function name given to dvb_attach() should be one single symbol that will always be called before any other function on that module to be used. For almost all DVB frontends, there's just one function, but, on dib8000, there are several exported symbols. We need to get rid of all those direct calls, because they cause compilation breakages when bridge is builtin and frontend is module, we'll need to add a new function that will be the first one to be called, whatever initialization is needed. So, let's rename this function, in order to prepare for a next patch that will add a new attach() function that will be the only one exported by this module. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] dib7000: export just one symbolMauro Carvalho Chehab2014-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Exporting multiple symbols don't work as it causes compilation breakages, due to the way dvb_attach() works. This were reported several times, like: drivers/built-in.o: In function `cxusb_dualdig4_rev2_tuner_attach': >> cxusb.c:(.text+0x27d4b5): undefined reference to `dib7000p_get_i2c_master' drivers/built-in.o: In function `dib7070_set_param_override': cxusb.c:(.text+0x27d5a5): undefined reference to `dib0070_wbd_offset' >> cxusb.c:(.text+0x27d5be): undefined reference to `dib7000p_set_wbd_ref' drivers/built-in.o: In function `dib7070_tuner_reset': >> cxusb.c:(.text+0x27d5f9): undefined reference to `dib7000p_set_gpio' drivers/built-in.o: In function `cxusb_dualdig4_rev2_frontend_attach': >> cxusb.c:(.text+0x27df5c): undefined reference to `dib7000p_i2c_enumeration' In this specific report: CONFIG_DVB_USB_CXUSB=y CONFIG_DVB_DIB7000P=m But the same type of bug can happen if: CONFIG_DVB_DIB7000P=m and one of the bridge drivers is compiled builtin (cxusb, cx23885-dvb and/or dib0700). As a bonus, dib7000p won't be loaded anymore if the device uses a different frontend, reducing the memory footprint. Tested with Hauppauge Nova-TD (2 frontends). Reported-by: Fengguang Wu <fengguang.wu@intel.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] dib7000p: rename dib7000p_attach to dib7000p_initMauro Carvalho Chehab2014-06-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Well, what we call as "foo_attach" is the method that should be called by the dvb_attach() macro. It should be noticed that the name "dvb_attach" is really a bad name and don't express what it does. dvb_attach() basically does three things, if the frontend is compiled as a module: - It lookups for the module that it is known to have the given symbol name and requests such module; - It increments the module usage (anonymously - so lsmod doesn't print who loaded the module); - after loading the module, it runs the function associated with the dynamic symbol. When compiled as builtin, it just calls the function given to it. As dvb_attach() increments refcount, it can't be (easily) called more than once for the same module, or the kernel will deny to remove the module, because refcount will never be zeroed. In other words, the function name given to dvb_attach() should be one single symbol that will always be called before any other function on that module to be used. For almost all DVB frontends, there's just one function. However, the dib7000p initialization can require up to 3 functions to be called: - dib7000p_get_i2c_master; - dib7000p_i2c_enumeration; - dib7000p_init (before this patch dib7000_attach). (plus a bunch of other functions that the bridge driver will need to call). As we need to get rid of all those direct calls, because they cause compilation breakages when bridge is builtin and frontend is module, we'll need to add a new function that will be the first one to be called, whatever initialization is needed. So, let's rename the function that probes and init the hardware to dib7000p_init. A latter patch will add a new dib7000p_attach that will be used as originally conceived by dvb_attach() way. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] lmedm04: rs2000 check if interrupt urb is over dueMalcolm Priestley2014-06-17
| | | | | | | | | | | | | | | | Change handling of signal_lock on rs2000. Use ibuf[2] to detect lock as there is a longer wait for lock to appear in ibuf[6]. Remove last_key and key_timeout and use jiffies plus 60ms to detect that streaming is still active. If the current jiffies is time_after the interrupt urb overdue and clear signal lock. This results in far faster recovery of lock and streaming. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] usbtv: fix leak at failure path in usbtv_probe()Alexey Khoroshilov2014-06-17
| | | | | | | | | | Error handling code in usbtv_probe() misses usb_put_dev(). Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Acked-by: Lubomir Rintel <lkundrak@v3.sk> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* Merge branch 'v4l_for_linus' of ↵Linus Torvalds2014-06-04
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media into next Pull media updates from Mauro Carvalho Chehab: "This contains: - a new frontend/tuner driver set for si2168 and sa2157 - Videobuf 2 core now supports DVB too - A new gspca sub-driver (dtcs033) - saa7134 is now converted to use videobuf2 - add support for 4K timings - several other driver fixes and improvements PS. This pull request is shorter than usual, partly because I have some other patches on topic branches that I'll be sending you later this week" * 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (286 commits) [media] au0828-dvb: restore its permission to 644 [media] xc5000: delay tuner sleep to 5 seconds [media] xc5000: Don't use whitespace before tabs [media] xc5000: fix CamelCase [media] xc5000: Don't wrap msleep() [media] xc5000: get rid of positive error codes [media] au0828: reset streaming when a new frequency is set [media] au0828: Improve debug messages for urb_completion [media] au0828: Cancel stream-restart operation if frontend is disconnected [media] dib0700: fix RC support on Hauppauge Nova-TD [media] USB: as102_usb_drv.c: Remove useless return variables [media] v4l: Fix documentation of V4L2_PIX_FMT_H264_MVC and VP8 pixel formats [media] m5mols: Replace missing header [media] staging: lirc: Fix sparse warnings [media] fix mceusb endpoint type identification/handling [media] az6027: Added the PID for a new revision of the Elgato EyeTV Sat DVB-S Tuner [media] DocBook media: fix typo [media] adv7604: Add missing include to linux/types.h [media] v4l: Validate fields in the core code for subdev EDID ioctls [media] v4l: Add support for DV timings ioctls on subdev nodes ...
| * [media] au0828-dvb: restore its permission to 644Mauro Carvalho Chehab2014-06-04
| | | | | | | | | | | | | | A previous patch mistakenly changed the file permission to 755. Restore it to 644. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] au0828: reset streaming when a new frequency is setMauro Carvalho Chehab2014-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As reported by Trevor, doing several opening/streaming/closing operations to the demux causes it to fail. I was able to simulate this bug too. I also noticed that, sometimes, changing channels with au0828, the same thing happens. Most of the issues seem to be due to some hardware bug, that causes the device to not fill all the URBs allocated. When the bug happens, the only known fix is to either replug the device, or to send an USB reset to it. There's also a hack a the au0828 driver that starts a thread that tries to reset the device when a package doesn't start with a sync. One of the culpits for this bad hardware behavior seem to be caused by the lack of stopping and restarting the stream every time a new channel is set. This patch warrants that the stream will be properly reset every time the set_frontend callback is called, partially solving the problem. A complete fix, however, would also need to check the PM conditions for the tuner and demux. Reported-by: Trevor Graffa <tlgraffa@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] au0828: Improve debug messages for urb_completionMauro Carvalho Chehab2014-05-25
| | | | | | | | | | | | | | | | Sometimes, it helps to know how much data was received by urb_completion. Add that information to the optional debug log. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] au0828: Cancel stream-restart operation if frontend is disconnectedChangbing Xiong2014-05-25
| | | | | | | | | | | | | | | | If the tuner is already disconnected, It is meaningless to go on doing the stream-restart operation, It is better to cancel this operation. Signed-off-by: Changbing Xiong <cb.xiong@samsung.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] dib0700: fix RC support on Hauppauge Nova-TDMauro Carvalho Chehab2014-05-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The RC support o Nova-TD is broken, as the RC endpoint there is an interrupt endpoint. That produces an ugly calltrace at the Kernel logs: WARNING: CPU: 2 PID: 56 at drivers/usb/core/urb.c:450 usb_submit_urb+0x1fd/0x5c0() usb 1-1.2: BOGUS urb xfer, pipe 3 != type 1 Modules linked in: rc_dib0700_rc5(OF) dvb_usb_dib0700(OF) dib9000(OF) dib8000(OF) dib7000m(OF) dib0090(OF) dib0070(OF) dib7000p(OF) dib3000mc(OF) dibx000_common(OF) dvb_usb(OF) rc_core(OF) snd_usb_audio snd_usbmidi_lib snd_hwdep snd_rawmidi snd_seq snd_seq_device snd_pcm snd_timer snd soundcore bnep bluetooth 6lowpan_iphc rfkill au0828(OF) xc5000(OF) au8522_dig(OF) au8522_common(OF) tveeprom(OF) dvb_core(OF) nouveau i915 mxm_wmi ttm i2c_algo_bit drm_kms_helper drm r8169 mii i2c_core video wmi [last unloaded: au0828] CPU: 2 PID: 56 Comm: khubd Tainted: GF O 3.14.2-200.fc20.x86_64 #1 Hardware name: SAMSUNG ELECTRONICS CO., LTD. 550P5C/550P7C/SAMSUNG_NP1234567890, BIOS P05ABI.016.130917.dg 09/17/2013 0000000000000000 00000000610866bc ffff880223703860 ffffffff816eec92 ffff8802237038a8 ffff880223703898 ffffffff8108a1bd ffff8800916a2180 ffff8801d5b16000 0000000000000003 0000000000000003 0000000000000020 Call Trace: [<ffffffff816eec92>] dump_stack+0x45/0x56 [<ffffffff8108a1bd>] warn_slowpath_common+0x7d/0xa0 [<ffffffff8108a23c>] warn_slowpath_fmt+0x5c/0x80 [<ffffffff814e3ebd>] usb_submit_urb+0x1fd/0x5c0 [<ffffffffa0445925>] dib0700_rc_setup+0xb5/0x120 [dvb_usb_dib0700] [<ffffffffa0445a58>] dib0700_probe+0xc8/0x130 [dvb_usb_dib0700] ... Fix it by detecting if the endpoint is bulk or interrupt. Tested with both Hauppauge Nova-TD model 52009 (interrupt) and with a Prolink Pixelview SBTVD model PV-D231U (bulk). Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] az6027: Added the PID for a new revision of the Elgato EyeTV Sat ↵Manuel Schönlaub2014-05-25
| | | | | | | | | | | | | | | | | | DVB-S Tuner There is another clone of AZ6027. This patch adds the relevant PID. Signed-off-by: Manuel Schönlaub <manuel.schoenlaub@gmail.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] media: stk1160: Avoid stack-allocated buffer for control URBsEzequiel Garcia2014-05-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently stk1160_read_reg() uses a stack-allocated char to get the read control value. This is wrong because usb_control_msg() requires a kmalloc-ed buffer. This commit fixes such issue by kmalloc'ating a 1-byte buffer to receive the read value. While here, let's remove the urb_buf array which was meant for a similar purpose, but never really used. Cc: Alan Stern <stern@rowland.harvard.edu> Reported-by: Sander Eikelenboom <linux@eikelenboom.it> Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Cc: stable@vger.kernel.org # for v3.7 and up Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] v4l: subdev: Move [gs]_std operation to video opsLaurent Pinchart2014-05-24
| | | | | | | | | | | | | | | | | | | | | | | | The g_std and s_std operations are video-related, move them to the video ops where they belong. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] technisat-usb2: rename led enums to be specific to driverLuis R. Rodriguez2014-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | The current names clash with include/linux/leds.h namespace, although there is no compile issue currently this does affect backports. Drivers should also try to avoid generic namespaces for things like this. Cc: Felipe Pena <felipensp@gmail.com> Cc: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Luis R. Rodriguez <mcgrof@suse.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: make em28xx_free_v4l2 static()Mauro Carvalho Chehab2014-05-23
| | | | | | | | | | | | | | Changeset 95d2608b88 created this function, but declared it as global, by mistake. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move fields wq_trigger and streaming_started from struct ↵Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | | | em28xx to struct em28xx_audio Both wq_trigger and stream_started are used only to control the em28xx alsa streaming. They don't belong to em28xx common struct. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: remove field tuner_addr from struct em28xxFrank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | The tuner address is only used by the v4l submodule and at tuner setup and can be obtained from the board data directly (if specified). Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: remove field tda9887_conf from struct em28xxFrank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The tda9887 chipset is part of the analog tuner. Move it out of em28xx-cards. Also, it is used only one time by the v4l2 sub-module at tuner setup. With that, we can get rid of an additional data inside the em28xx common structure. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move tuner frequency field from struct em28xx to struct v4l2Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | Move V4L2-specific frequency cache to struct em28xx_v4l2. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move v4l2 user counting fields from struct em28xx to struct v4l2Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | Despite being at the common em28xx struct, those two fields are actually taking into account only the usage inside em28xx v4l2 submodule. So, move them out of the common struct. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move capture state tracking fields from struct em28xx to ↵Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | | | struct v4l2 Move some temporary capture tracking date to the em28xx_v4l2 struct, as those info are used only by em28xx v4l2 submodule. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move sensor parameter fields from struct em28xx to struct v4l2Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | Move camera sensor resolution and xtal out of em28xx common struct, as thore are used only by the em28xx v4l2 submodule. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move progressive/interlaced fields from struct em28xx to ↵Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | | | struct v4l2 The video progressive data fields belong to analog TV. Move them out of the common em28xx struct. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move struct em28xx_fmt *format from struct em28xx to struct v4l2Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | The analog format struct belongs to analog TV. Move it out of the common em28xx struct. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move TV norm from struct em28xx to struct v4l2Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | TV norm is specific to analog TV reception. move it out of the common em28xx struct. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move vinmode and vinctrl data from struct em28xx to struct v4l2Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | The video input mode and control data also belong only to the analog side. move them to struct em28xx_v4l. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move v4l2 frame resolutions and scale data from struct ↵Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | | | em28xx to struct v4l2 The em28xx scaler data are used only for analog video. Move them to struct em28xx_v4l2. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move videobuf2 related data from struct em28xx to struct v4l2Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | The video and VBI-specific VB2 queue and mutexes are used only by the v4l2 sub-driver. Move them to the V4L2 struct, preventing wasting memory if this sub-driver is not used. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move video_device structs from struct em28xx to struct v4l2Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | There are 3 struct video_device at the em28xx common struct, for video, VBI and radio. They all are used only by the V4L2 driver. So, move them to the v4l2-specific struct. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move struct v4l2_clk *clk from struct em28xx to struct v4l2Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | The current clock definition applies only to the V4L2 side of the driver. Move its struct pointer to the v4l2_dev, where it belongs. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move struct v4l2_ctrl_handler ctrl_handler from struct ↵Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | | | em28xx to struct v4l2 Controls are only applicable to V4L2 module. Move the corresponding data structs to the proper place. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: start moving em28xx-v4l specific data to its own structFrank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | That reduces a little bit the memory footprint when em28xx-video is not loaded. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx-video: simplify usage of the pointer to struct ↵Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | v4l2_ctrl_handler in em28xx_v4l2_init() The local var hdl is already pointing to &dev->ctrl_handler. Use it, instead of dereferencing it all the time. Code cleanup. No functional changes. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: move sub-module data structs to a common place in the main ↵Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | | | | | struct Just a cleanup. No functional changes. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] em28xx: remove the i2c_set_adapdata() call in em28xx_i2c_register()Frank Schaefer2014-05-23
| | | | | | | | | | | | | | | | It is no longer needed since nobody is calling i2c_get_adapdata() anymore. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] s2255drv: fix memory leak s2255_probe()Daeseok Youn2014-05-23
| | | | | | | | | | | | | | | | | | | | | | smatch says: drivers/media/usb/s2255/s2255drv.c:2246 s2255_probe() warn: possible memory leak of 'dev' Signed-off-by: Daeseok Youn <daeseok.youn@gmail.com> Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
| * [media] s2255: Do not free fw_data until timer handler has actually stopped ↵Kirill Tkhai2014-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | using it Function del_timer() does not guarantee that timer was really deleted. If the timer handler is beeing executed at the moment, the function does nothing. So, we have a race between del_timer() and kfree(), and it's possible to use already freed memory in the handler. Signed-off-by: Kirill Tkhai <tkhai@yandex.ru> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>