summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-03-19[media] dib0700: Fix memory leak during initializationJean Delvare
Reported by kmemleak. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] dib0700: Drop useless check when remote key is pressedJean Delvare
struct dvb_usb_device *d can never be NULL so don't waste time checking for this. Rationale: the urb's context is set when usb_fill_bulk_urb() is called in dib0700_rc_setup(), and never changes after that. d is dereferenced unconditionally in dib0700_rc_setup() so it can't be NULL or the driver would crash right away. Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Mauro Carvalho Chehab <mchehab@infradead.org> Cc: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] media: em28xx: Paranoic stack saveEzequiel García
This patch saves 255 bytes of stack on usb_probe() by removing a char array. In some platforms this is represents a substantial save. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] au8522: bug-fix: enable modulation AFTER tune (instead of before tuning)Michael Krufky
The au8522 driver programs the tuner after programming the demodulator, but the tuner should be programmed first. This patch fixes this behavior. EDIT: Apparantly Devin created a similar patch some time ago, but hasn't submitted it for merge. I never saw his patch, but I thank him anyhow for his efforts. In addition, Devin pointed out a flaw in my patch: This newly generated patch takes Devin's comments into account. Thanks-to: Devin Heitmueller <dheitmueller@kernellabs.com> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Cc: stable@kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] mceusb: add Formosa device ID 0xe042Jarod Wilson
Yet another device ID that has started showing up in the wild. Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] media: Initialize the media core with subsys_initcall()Laurent Pinchart
Media-related drivers living outside drivers/media/ (such as the UVC gadget driver in drivers/usb/gadget/) rely on the media core being initialized before they're probed. As drivers/usb/ is linked before drivers/media/, this is currently not the case and will lead to crashes if the drivers are not compiled as modules. Register media_devnode_init() as a subsys_initcall() instead of module_init() to fix this. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Bhupesh Sharma <bhupesh.sharma@st.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Tested-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] V4L/v4l2-dev: Make 'videodev_init' as a subsys initcallBhupesh Sharma
As the V4L2 based UVC webcam gadget (g_webcam) expects the 'videodev' to present when the 'webcam_bind' routine is called, so 'videodev' should be available as early as possible. Now, when 'g_webcam' is built as a module (i.e. not a part of kernel) the late availability of 'videodev' is OK, but if 'g_webcam' is built statically as a part of the kernel, the kernel crashes (a sample crash dump using Designware 2.0 UDC is provided below). To solve the same, this patch makes 'videodev_init' as a subsys initcall. Kernel Crash Dump: ------------------ designware_udc designware_udc: Device Synopsys UDC probed csr 90810000: plug 90812000 g_webcam gadget: uvc_function_bind Unable to handle kernel NULL pointer dereference at virtual address 000000e4 pgd = 80004000 [000000e4] *pgd=00000000 Internal error: Oops: 5 [#1] SMP Modules linked in: CPU: 0 Not tainted (3.3.0-rc3-13888-ge774c03-dirty #20) PC is at do_raw_spin_lock+0x10/0x16c LR is at _raw_spin_lock+0x10/0x14 pc : [<8019e344>] lr : [<804095c0>] psr: 60000013 sp : 8f839d20 ip : 8f839d50 fp : 8f839d4c r10: 80760a94 r9 : 8042de98 r8 : 00000154 r7 : 80760e94 r6 : 805cfc10 r5 : 8fb6a008 r4 : 8fb6a008 r3 : 805dd0c8 r2 : 8f839d48 r1 : 805cfc08 r0 : 000000e0 Flags: nZCv IRQs on FIQs on Mode SVC_32 ISA ARM Segment kernel Control: 10c5387d Table: 0000404a DAC: 00000015 Process swapper/0 (pid: 1, stack limit = 0x8f8382f0) Stack: (0x8f839d20 to 0x8f83a000) 9d20: ffffffff ffffffff 8fb6a008 8fb6a008 805cfc10 80760e94 00000154 8042de98 9d40: 8f839d5c 8f839d50 804095c0 8019e340 8f839d7c 8f839d60 80222b28 804095bc 9d60: 8fb12b80 8fb6a008 8fb6a010 805cfc08 8f839dc4 8f839d80 80223db8 80222adc 9d80: 8f839dac 8f839d90 8022baa0 8019e2e8 8fb6a008 8075e7f4 8fb6a008 8fb6a008 9da0: 00000000 8fb6a008 80760e94 00000154 8042de98 80760a94 8f839ddc 8f839dc8 9dc0: 802242a8 80223d1c 8fb12b80 8fb6a000 8f839e1c 8f839de0 8030132c 80224298 9de0: 80223ce8 803f2ee8 00000001 804f7750 8f839e1c 8f824008 805cff20 8f824000 9e00: 8fb6a000 ffffffff 00000000 8f8d4880 8f839e4c 8f839e20 80562e3c 80301100 9e20: 00000000 8fb13140 8f824008 805cff20 8042aa68 8f824000 8042aa8c 805e4d40 9e40: 8f839e64 8f839e50 802d20c4 80562ba8 805d0058 805cff20 8f839e8c 8f839e68 9e60: 80563034 802d206c 8042aa8c 805cff20 8f8d4880 00000000 805cfc08 8fb12a40 9e80: 8f839e9c 8f839e90 805630c4 80562ec4 8f839ebc 8f839ea0 802d2364 805630b0 9ea0: 805cfeac 8f8d4880 805cfbe8 807605e8 8f839ed4 8f839ec0 80562b3c 802d22cc 9ec0: 80562ac4 8f8d4880 8f839f04 8f839ed8 802d0b40 80562ad0 8f839ef4 805cff90 9ee0: 805cff90 805cfb98 00000000 00000000 805cfbe8 805e4d40 8f839f3c 8f839f08 9f00: 802cd078 802d0a18 00000000 802d0a0c 00000000 8fb9ba00 802d0a0c 805cff90 9f20: 00000013 00000000 00000000 805e4d40 8f839f5c 8f839f40 802cf390 802ccff0 9f40: 00000003 00000003 804fb598 00000000 8f839f74 8f839f60 802d2554 802cf2a0 9f60: 8f838000 8057731c 8f839f84 8f839f78 80562b90 802d24d0 8f839fdc 8f839f88 9f80: 800085d4 80562b84 805af2ac 805af2ac 80562b78 00000000 00000013 00000000 9fa0: 00000000 00000000 8f839fc4 8f839fb8 80043dd0 8057706c 8057731c 8002875c 9fc0: 00000013 00000000 00000000 00000000 8f839ff4 8f839fe0 805468d4 800085a0 9fe0: 00000000 80546840 00000000 8f839ff8 8002875c 8054684c 51155555 55545555 Backtrace: [<8019e334>] (do_raw_spin_lock+0x0/0x16c) from [<804095c0>] (_raw_spin_lock+0x10/0x14) r9:8042de98 r8:00000154 r7:80760e94 r6:805cfc10 r5:8fb6a008 r4:8fb6a008 [<804095b0>] (_raw_spin_lock+0x0/0x14) from [<80222b28>] (get_device_parent+0x58/0x1c0) [<80222ad0>] (get_device_parent+0x0/0x1c0) from [<80223db8>] (device_add+0xa8/0x57c) r6:805cfc08 r5:8fb6a010 r4:8fb6a008 r3:8fb12b80 [<80223d10>] (device_add+0x0/0x57c) from [<802242a8>] (device_register+0x1c/0x20) [<8022428c>] (device_register+0x0/0x20) from [<8030132c>] (__video_register_device+0x238/0x484) r4:8fb6a000 r3:8fb12b80 [<803010f4>] (__video_register_device+0x0/0x484) from [<80562e3c>] (uvc_function_bind+0x2a0/0x31c) [<80562b9c>] (uvc_function_bind+0x0/0x31c) from [<802d20c4>] (usb_add_function+0x64/0x118) [<802d2060>] (usb_add_function+0x0/0x118) from [<80563034>] (uvc_bind_config+0x17c/0x1ec) r5:805cff20 r4:805d0058 [<80562eb8>] (uvc_bind_config+0x0/0x1ec) from [<805630c4>] (webcam_config_bind+0x20/0x28) r8:8fb12a40 r7:805cfc08 r6:00000000 r5:8f8d4880 r4:805cff20 r3:8042aa8c [<805630a4>] (webcam_config_bind+0x0/0x28) from [<802d2364>] (usb_add_config+0xa4/0x124) [<802d22c0>] (usb_add_config+0x0/0x124) from [<80562b3c>] (webcam_bind+0x78/0xb4) r6:807605e8 r5:805cfbe8 r4:8f8d4880 r3:805cfeac [<80562ac4>] (webcam_bind+0x0/0xb4) from [<802d0b40>] (composite_bind+0x134/0x308) r4:8f8d4880 r3:80562ac4 [<802d0a0c>] (composite_bind+0x0/0x308) from [<802cd078>] (dw_udc_start+0x94/0x2bc) [<802ccfe4>] (dw_udc_start+0x0/0x2bc) from [<802cf390>] (usb_gadget_probe_driver+0xfc/0x180) [<802cf294>] (usb_gadget_probe_driver+0x0/0x180) from [<802d2554>] (usb_composite_probe+0x90/0xb4) r6:00000000 r5:804fb598 r4:00000003 r3:00000003 [<802d24c4>] (usb_composite_probe+0x0/0xb4) from [<80562b90>] (webcam_init+0x18/0x24) r5:8057731c r4:8f838000 [<80562b78>] (webcam_init+0x0/0x24) from [<800085d4>] (do_one_initcall+0x40/0x184) [<80008594>] (do_one_initcall+0x0/0x184) from [<805468d4>] (kernel_init+0x94/0x134) [<80546840>] (kernel_init+0x0/0x134) from [<8002875c>] (do_exit+0x0/0x6f8) r5:80546840 r4:00000000 Code: e1a0c00d e92ddbf0 e24cb004 e24dd008 (e5902004) ---[ end trace 7ecca37f36fbdc06 ]--- Signed-off-by: Bhupesh Sharma <bhupesh.sharma@st.com> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] v4l: Add driver for Micron MT9M032 camera sensorMartin Hostettler
The MT9M032 is a parallel 1.6MP sensor from Micron controlled through I2C. The driver creates a V4L2 subdevice. It currently supports cropping, gain, exposure and v/h flipping controls in monochrome mode with an external pixel clock. [Lots of clean up, fixes and enhancements] Signed-off-by: Martin Hostettler <martin@neutronstar.dyndns.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] mt9p031: Use generic PLL setup codeLaurent Pinchart
Compute the PLL parameters at runtime using the generic Aptina PLL helper. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] v4l: Aptina-style sensor PLL supportLaurent Pinchart
Add a generic helper function to compute PLL parameters for PLL found in several Aptina sensors. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] mt9p031: Remove unused xskip and yskip fields in struct mt9p031Laurent Pinchart
The fields are set but never used, remove them. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Sakari Ailus <sakari.ailus@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] dvb: earth-pt1: remove unsupported net subdevicesAkihiro Tsukada
PT1 and PT2 do not have net functions. Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] dvb: earth-pt1: decrease the too large DMA buffer sizeAkihiro Tsukada
Current default value of "nr_tables" option corresponds to the DMA buffer of about 10 to 48 seconds long, which is obviously too much. Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] dvb: earth-pt1: add an error check/report on the incoming dataAkihiro Tsukada
This patch adds a data integrity check using the sequence counter and error flags added by the bridge chip. Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] dvb: earth-pt1: stop polling data when no one accesses the deviceAkihiro Tsukada
The driver started a kthread to poll the DMA buffers soon after probing, which relsuleted in 1000/sec sleeps and wakeups of the thread doing nothing useful until someone started feeding. This patch changes the creation and destruction of the kthread depending on the number of users. Signed-off-by: Akihiro Tsukada <tskd2@yahoo.co.jp> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] media: em28xx: Remove unused urb arrays from device structEzequiel García
These arrays were embedded in the struct itself, but they weren't used by anyone, since urbs are now dinamically allocated at em28xx_usb_isoc_ctl struct. Tested by compilation only. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] gpio-ir-recv: a couple signedness bugsDan Carpenter
There are couple places where we check unsigned values for negative. I changed ->gpin_nr to signed because in gpio_ir_recv_probe() we do: if (pdata->gpio_nr < 0) return -EINVAL; I also change gval to a signed int in gpio_ir_recv_irq() because that's the type that gpio_get_value_cansleep() returns and we test for negative returns. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Trilok Soni <tsoni@codeaurora.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] Staging: media: solo6x10: core.c Fix some coding style issueAndrew Miller
Replaced spaces with tabs Signed-off-by: Andrew Miller <amiller@amilx.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] s5p-csis: Fix compilation with PM_SLEEP disabledSylwester Nawrocki
Fix following compilation error when CONFIG_PM_SLEEP is disabled: CC drivers/media/video/s5p-fimc/mipi-csis.o drivers/media/video/s5p-fimc/mipi-csis.c: In function ‘s5pcsis_remove’: drivers/media/video/s5p-fimc/mipi-csis.c:956: error: implicit declaration of function ‘s5pcsis_suspend’ Reported-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] /w9966: Fix a build warningMauro Carvalho Chehab
drivers/media/video/w9966.c: In function ‘__check_pardev’: drivers/media/video/w9966.c:136:1: warning: return from incompatible pointer type [enabled by default] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] video: Kconfig: Select VIDEOBUF2_DMA_CONTIG for VIDEO_MX2Fabio Estevam
Fix the following build error: LD .tmp_vmlinux1 drivers/built-in.o: In function `mx2_camera_init_videobuf': clkdev.c:(.text+0xcfaf4): undefined reference to `vb2_dma_contig_memops' drivers/built-in.o: In function `mx2_camera_probe': clkdev.c:(.devinit.text+0x5734): undefined reference to `vb2_dma_contig_init_ctx' clkdev.c:(.devinit.text+0x5778): undefined reference to `vb2_dma_contig_cleanup_ctx' drivers/built-in.o: In function `mx2_camera_remove': clkdev.c:(.devexit.text+0x89c): undefined reference to `vb2_dma_contig_cleanup_ctx' commit c6a41e3271 ([media] media i.MX27 camera: migrate driver to videobuf2) missed to select VIDEOBUF2_DMA_CONTIG in Kconfig. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] V4L: Improve the selection API documentationSylwester Nawrocki
Make the VIDIOC_G/S_SELECTION ioctls documentation more consistent with the rest of media Docbook, use capital letters where necessary and correct few minor errors. Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] lmedm04 - support for m88rs2000 missing kconfig optionMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] add blackfin capture bridge driverScott Jiang
This is a v4l2 bridge driver for Blackfin video capture device, support ppi and eppi interface. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] vs6624: add vs6624 sensor driverScott Jiang
This is a v4l2 sensor-level driver for the ST VS6624 camera. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] adv7183: add adv7183 decoder driverScott Jiang
This driver is a v4l2 subdevice driver to support Analog Devices ADV7183 SDTV video decoder. Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] lmedm04 RS2000 Firmware detailsMalcolm Priestley
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] lmedm04 ver 1.99 support for m88rs2000 v2Malcolm Priestley
Support for m88rs2000 module. The driver also attempts to overcome occasional lock problems. Call backs are now used for read_status, signal level and SNR. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] m88rs2000: Don't fill info.typeMauro Carvalho Chehab
This field is handled internally by the DVB core, with uses the selected delivery system to fill it, when a DVBv3 call is handled. So, drivers should not touch on it. Cc: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] m88rs2000 1.12 v2 DVB-S frontend and tuner moduleMalcolm Priestley
Support for m88rs2000 chip used in lmedm04 driver. Note there are still lock problems. Slow channel change due to the large block of registers sent in set_frontend. Version 2 differences. Front end is completely shut down when in sleep mode. This allow user to regain control of device. Kaffeine scan problem solved by removing register calls from get_frontend. Kaffeine seems to call get_frontend when updating signal data. This can happen in the middle of a tune stalling the driver. Change calculations to those in the DS3000 driver. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] lmedm04 v1.98 Remove clear haltMalcolm Priestley
These were in the original lme2510 device driver. Removing them significantly speeds up the driver. All tuners tested. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] dvb: negative value assigned to unsigned int in CDRXD()Santosh Nayak
In CDRXD(), Negative number is assigned to unsigned variable 'state->noise_cal.tdCal2. Members of 'SNoiseCal' should be 'signed short'. Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] dib9000: implement error handling for DibAcquireLockAlexey Khoroshilov
DibAcquireLock() is implemented as mutex_lock_interruptible() but the driver does not handle unsuccessful locking. As a result it may lead to unlock of an unheld mutex. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] dib9000: fix explicit lock mismatchesAlexey Khoroshilov
There are several error paths, where &state->platform.risc.mem_mbx_lock is not unlocked. The patch fixes it. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] staging: Fix comments and some typos in staging/media/*Justin P. Mattock
linux-next: I like to spend some time reading code, in doing so I have found some typos in some of the comments. Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] as102: set optimal eLNA config values for each deviceGianluca Gennari
Ryley and me tested several eLNA configuration values with both a rooftop and a portable antenna. Ryley fuond out that the best value for his Elgato stick is indeed the current default value 0xC0. Instead, my stick is not capable of tuning VHF channels with 0xC0. With 0x80, VHF works but the tuner sensitivity with the portable antenna is poor. Instead, the value 0xA0 works with VHF and also gives good performance with both the rooftop and the portable antenna. So we concluded that devices built on the reference design work best with 0xA0, while custom designs (Elgato, PCTV) seem to require 0xC0. I also removed the unused parameter "minor" in struct as102_dev_t. Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Ryley Angus <rangus@student.unimelb.edu.au> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] as102: add __packed attribute to structs defined inside packed structsGianluca Gennari
This patch fixes a regression in kernel 3.3 due to this patch: http://patchwork.linuxtv.org/patch/8332/ That patch changes "#pragma pack(1)" with "__packed" attributes, but it is not complete. In fact, in the as102 driver there are a lot of structs/unions defined inside other structs/unions. When the "__packed" attribute is applied only on the external struct, it will not affect the internal struct definitions. So the regression is fixed by specifiying the "__packed" attribute also on the internal structs. This patch should go into 3.3, as it fixes a regression introduced in the new kernel version. Signed-off-by: Gianluca Gennari <gennarone@gmail.com> Signed-off-by: Ryley Angus <rangus@student.unimelb.edu.au> Cc: stable@kernel.org # for v3.3 Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] Add CI support to az6007 driverJose Alberto Reguero
This patch add CI support to az6007 driver. Signed-off-by: Jose Alberto Reguero <jareguero@telefonica.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] media, cx231xx: Fix double free on closeJesper Juhl
In cx231xx_v4l2_close() there are two calls to cx231xx_release_resources(dev) followed by kfree(dev). That is a problem since cx231xx_release_resources() already kfree()'s its argument, so we end up doing a double free. Easily resolved by just removing the redundant kfree() calls after the calls to cx231xx_release_resources(). I also changed the 'dev = NULL' assignments (which are rather pointless since 'dev' is about to go out of scope), to 'fh->dev = NULL' since it looks to me that that is what was actually intended. And I removed the 'dev = NULL' assignment at the end of cx231xx_release_resources() since it is pointless. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] lmedm04 ver 1.97 Remove delays required for STV0288Malcolm Priestley
Remove delays added for STV0288 frontend. This patch significantly speeds up channel change and scan. It requires patch 10161-STV0288 increase delay between carrier search. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] STV0288 increase delay between carrier searchMalcolm Priestley
The current delay of 30uS is too short to recover any carrier. In the lmedm04 driver delays were added to overcome carrier lock problems. The typical delay was 30mS (2 x 15ms register write 0x2c and read 0x24). Other drivers that use STV0288 don't appear to have any delay are likely to have also suffered this problem. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] uvcvideo: uvc_driver.c: use linux/atomic.hAndrew Morton
There's no known problem here, but this is one of only two non-arch files in the kernel which use asm/atomic.h instead of linux/atomic.h. Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] uvcvideo: Add support for Dell XPS m1530 integrated webcamLaurent Pinchart
The camera requires the PROBE_DEF quirk. Add a corresponding entry in the device IDs list. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] uvcvideo: Allow userptr IO modeJavier Martin
Userptr can be very useful if a UVC camera is requested to use video buffers allocated by another processing device. So that buffers don't need to be copied. Signed-off-by: Javier Martin <javier.martin@vista-silicon.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] uvcvideo: Implement compat_ioctl32 for custom ioctlsLaurent Pinchart
Support 32-bit/64-bit compatibility for the the UVCIOC_ ioctls. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] uvcvideo: Return -ENOTTY in case of unknown ioctlLaurent Pinchart
-EINVAL is the wrong error code in that case, replace it with -ENOTTY. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] v4l: Add custom compat_ioctl32 operationLaurent Pinchart
Drivers implementing custom ioctls need to handle 32-bit/64-bit compatibility themselves. Provide them with a way to do so. To avoid circular module dependencies, merge the v4l2-compat-ioctl32 module into videodev. There is no point in keeping them separate, as the v4l2_compat_ioctl32() function is required by videodev if CONFIG_COMPAT is set anyway. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19[media] Two small string fixes in v4l2-ctrls.cHans Verkuil
Fix one typo and use 'Microseconds' instead of 'useconds' in the pre-emphasis descriptions. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-03-19Merge tag 'v3.3' into staging/for_v3.4Mauro Carvalho Chehab
* tag 'v3.3': (1646 commits) Linux 3.3 Don't limit non-nested epoll paths netfilter: ctnetlink: fix race between delete and timeout expiration ipv6: Don't dev_hold(dev) in ip6_mc_find_dev_rcu. nilfs2: fix NULL pointer dereference in nilfs_load_super_block() nilfs2: clamp ns_r_segments_percentage to [1, 99] afs: Remote abort can cause BUG in rxrpc code afs: Read of file returns EBADMSG C6X: remove dead code from entry.S wimax/i2400m: fix erroneous NETDEV_TX_BUSY use net/hyperv: fix erroneous NETDEV_TX_BUSY use net/usbnet: reserve headroom on rx skbs bnx2x: fix memory leak in bnx2x_init_firmware() bnx2x: fix a crash on corrupt firmware file sch_sfq: revert dont put new flow at the end of flows ipv6: fix icmp6_dst_alloc() MAINTAINERS: Add Serge as maintainer of capabilities drivers/video/backlight/s6e63m0.c: fix corruption storing gamma mode MAINTAINERS: add entry for exynos mipi display drivers MAINTAINERS: fix link to Gustavo Padovans tree ...
2012-03-19[media] radio-sf16fmr2: fix session mismatchesMauro Carvalho Chehab
WARNING: drivers/media/radio/built-in.o(.data+0x284): Section mismatch in reference from the variable fmr2_driver to the function .init.text:fmr2_probe() The variable fmr2_driver references the function __init fmr2_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console WARNING: drivers/media/built-in.o(.data+0x48200): Section mismatch in reference from the variable fmr2_driver to the function .init.text:fmr2_probe() The variable fmr2_driver references the function __init fmr2_probe() If the reference is valid then annotate the variable with __init* or __refdata (see linux/init.h) or name the variable: *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console Cc: Hans Verkuil <hans.verkuil@cisco.com> Cc: Ondrej Zary <linux@rainbow-software.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>