summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb
AgeCommit message (Collapse)AuthorFilesLines
2012-11-28[media] uvcvideo: Fix control value clamping for unsigned integer controlsLaurent Pinchart1-2/+6
V4L2 integer controls are stored in signed 32-bit values. However, UVC controls can be either signed or unsigned. Take the UVC control signedness into account when clamping the control value to the min-max range. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28[media] uvcvideo: Mark first output terminal as default video nodeLaurent Pinchart3-0/+8
The MEDIA_ENT_FL_DEFAULT identifies entities that are considered as default for their group and type. For video nodes, it identifies the node that application should use by default. UVC devices don't report which output terminal should be considered as the default, use the first one. Most devices have a single output terminal anyway. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28[media] uvcvideo: Add VIDIOC_[GS]_PRIORITY supportLaurent Pinchart3-0/+49
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28[media] uvcvideo: Return -ENOTTY for unsupported ioctlsLaurent Pinchart1-2/+2
The proper error code is -ENOTTY instead of -EINVAL. This issue was found by the v4l2-compliance tool. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28[media] uvcvideo: Set device_caps in VIDIOC_QUERYCAPLaurent Pinchart3-4/+13
Set the capabilities field to global capabilities, and the device_caps field to the video node capabilities. This issue was found by the v4l2-compliance tool. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28[media] uvcvideo: Don't fail when an unsupported format is requestedLaurent Pinchart3-5/+8
Return the default format in that case. This issue was found by the v4l2-compliance tool. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28[media] uvcvideo: Return -EACCES when trying to access a read/write-only controlLaurent Pinchart1-2/+2
The proper return code according to the V4L2 specification is -EACCES, not -EINVAL. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28[media] uvcvideo: Set error_idx properly for extended controls API failuresLaurent Pinchart2-14/+22
When one of the requested controls doesn't exist the error_idx field must reflect that situation. For G_EXT_CTRLS and S_EXT_CTRLS, error_idx must be set to the control count. For TRY_EXT_CTRLS, it must be set to the index of the unexisting control. This issue was found by the v4l2-compliance tool. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28[media] rtl28xxu: add NOXON DAB/DAB+ USB dongle rev 2Juergen Lock1-0/+2
This just adds the usbid to the rtl28xxu driver, that's all that's needed to make the stick work for DVB. Signed-off-by: Juergen Lock <nox@jelal.kn-bremen.de> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-28Merge remote-tracking branch 'linus/master' into staging/for_v3.8Mauro Carvalho Chehab3-9/+10
* linus/master: (1428 commits) futex: avoid wake_futex() for a PI futex_q watchdog: using u64 in get_sample_period() writeback: put unused inodes to LRU after writeback completion mm: vmscan: check for fatal signals iff the process was throttled Revert "mm: remove __GFP_NO_KSWAPD" proc: check vma->vm_file before dereferencing UAPI: strip the _UAPI prefix from header guards during header installation include/linux/bug.h: fix sparse warning related to BUILD_BUG_ON_INVALID Linux 3.7-rc7 powerpc/eeh: Do not invalidate PE properly ALSA: hda - Fix build without CONFIG_PM of/address: sparc: Declare of_iomap as an extern function for sparc again PM / QoS: fix wrong error-checking condition bnx2x: remove redundant warning log vxlan: fix command usage in its doc 8139cp: revert "set ring address before enabling receiver" MPI: Fix compilation on MIPS with GCC 4.4 and newer MIPS: Fix crash that occurs when function tracing is enabled MIPS: Merge overlapping bootmem ranges jbd: Fix lock ordering bug in journal_unmap_buffer() ...
2012-11-25[media] v4l: uvc: add support for DMABUF importingTomasz Stanislawski1-1/+1
This patch enhances UVC with support for DMABUF importing via V4L2_MEMORY_DMABUF memory type. Signed-off-by: Tomasz Stanislawski <t.stanislaws@samsung.com> Tested-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22[media] drivers/media/usb/hdpvr/hdpvr-core.c: fix error return codePeter Senna Tschudin1-0/+2
Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22[media] drivers/media/usb/tm6000/tm6000-video.c: fix error return codePeter Senna Tschudin1-0/+1
Convert a nonnegative error return code to a negative one, as returned elsewhere in the function. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // <smpl> ( if@p1 (\(ret < 0\|ret != 0\)) { ... return ret; } | ret@p1 = 0 ) ... when != ret = e1 when != &ret *if(...) { ... when != ret = e2 when forall return ret; } // </smpl> Signed-off-by: Peter Senna Tschudin <peter.senna@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22[media] rtl28xxu: 0ccd:00d7 TerraTec Cinergy T Stick+Andrew Karpow1-0/+2
added usb-id as driver supports the stick Signed-off-by: Andrew Karpow <andy@mailbox.tu-berlin.de> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-22[media] rtl28xxu: 1d19:1102 Dexatek DK mini DVB-T DongleAntti Palosaari1-0/+2
Add new USB ID as driver supports it. Reported-by: Hubert Lin <hubertwslin@gmail.com> Tested-by: Hubert Lin <hubertwslin@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21[media] v4l2: sn9c102 incorrectly blocks FMT_SN9C10XAlan Cox1-0/+2
Missing break Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21[media] pvr2: fix minor storageAlan Cox1-3/+3
This should have break statements in it. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21[media] stkwebcam: Fix sparse warning on undeclared symbolEzequiel Garcia1-4/+1
The sparse warning is: "drivers/media/usb/stkwebcam/stk-webcam.c:59:5: warning: symbol 'first_init' was not declared. Should it be static?" Declare variable 'first_init' as static and local to the function. Found by Hans Verkuil's daily build. Tested by compilation only. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21[media] gspca-sonixb: Add USB-id for Genius Eye 310Hans de Goede1-0/+1
Reported through: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1046608 https://bugzilla.kernel.org/show_bug.cgi?id=48111 Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21[media] pwc: Fix codec1 cameras no longer workingHans de Goede1-0/+2
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21[media] gspca_pac7302: use registers 0x01 and 0x03 for red and blue balance ↵Frank Schäfer1-11/+40
controls Currently used registers 0xc5 and 0xc7 provide only a very coarse adjustment possibility within a very small value range (0-3). With registers 0x01 and 0x03, a fine grained adjustment with 255 steps is possible. This is also what the Windows driver does. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21[media] gspca_pac7302: correct register documentationFrank Schäfer1-6/+5
R,G,B balance registers are 0x01-0x03 instead of 0x02-0x04, which lead to the wrong conclusion that values are inverted. Exposure is controlled via page 3 registers and this is already documented. Also fix a whitespace issue. Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-21[media] stk1160: Try to continue with fewer transfer buffersEzequiel Garcia2-4/+24
Many people are trying to use stk1160 on low memory devices. Instead of failing if one allocation fails, we allow the driver to continue working if fewer transfer buffers are available. Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-09[media] dvb_usb_v2: switch interruptible mutex to normalAntti Palosaari1-3/+1
Fixes error: dvb_usb_v2: pid_filter() failed=-4 error code -4 is EINTR, Interrupted system call That error blocks I/O in some cases as -EINTR error was returned by the mutex which was protecting USB control messages. We want configure hardware to sleep mode on every case after tuning is stopped. That kind of behavior blocks it, leaving hardware some unwanted state in worst case. That error was seen every time when af9015 was plugged to USB1.1 which leads use of hardware PID filters. Stop tuning (tzap) with ctrl+c failed as driver tries to remove hardware PID filters. Tested with every hardware which uses routine in question. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-08[media] dvb_usb_v2: fix pid_filter callback error loggingAntti Palosaari1-6/+5
Code block braces were missing which leds broken error logging and compiler warning. drivers/media/usb/dvb-usb-v2/dvb_usb_core.c: In function 'dvb_usb_ctrl_feed': drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:291:12: warning: 'ret' may be used uninitialized in this function [-Wuninitialized] Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Milan Tuma <milan.olin@seznam.cz> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-11-07[media] siano: fix RC compilationMauro Carvalho Chehab1-1/+1
As reported by Antti and by Stephen: drivers/built-in.o: In function `sms_ir_event': /home/david/checkouts/linux/drivers/media/common/siano/smsir.c:48: undefined reference to `ir_raw_event_store' /home/david/checkouts/linux/drivers/media/common/siano/smsir.c:50: undefined reference to `ir_raw_event_handle' drivers/built-in.o: In function `sms_ir_init': /home/david/checkouts/linux/drivers/media/common/siano/smsir.c:56: undefined reference to `smscore_get_board_id' /home/david/checkouts/linux/drivers/media/common/siano/smsir.c:60: undefined reference to `rc_allocate_device' /home/david/checkouts/linux/drivers/media/common/siano/smsir.c:72: undefined reference to `sms_get_board' /home/david/checkouts/linux/drivers/media/common/siano/smsir.c:92: undefined reference to `sms_get_board' /home/david/checkouts/linux/drivers/media/common/siano/smsir.c:97: undefined reference to `rc_register_device' /home/david/checkouts/linux/drivers/media/common/siano/smsir.c:100: undefined reference to `rc_free_device' drivers/built-in.o: In function `sms_ir_exit': /home/david/checkouts/linux/drivers/media/common/siano/smsir.c:111: undefined reference to `rc_unregister_device' make: *** [vmlinux] Error 1 Caused by commit fdd1eeb49d36 "[media] siano: allow compiling it without RC support" And it happens when CONFIG_SMS_SIANO_RC=y and CONFIG_RC_CORE=m . Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Reported-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] it913x [BUG] Enable endpoint 3 on devices with HID interfaceMalcolm Priestley1-2/+8
On some USB controllers when endpoint 3 (used by HID) is not enabled this causes a USB reset. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] Add Fujitsu Siemens Amilo Pi 2530 to gspca upside down tableGregor Jasny1-0/+6
I've got an webcam upside down report for the following system: System Information Manufacturer: FUJITSU SIEMENS Product Name: AMILO Pi 2530 Version: Serial Number: UUID: <removed> Wake-up Type: Power Switch SKU Number: Not Specified Family: Not Specified Base Board Information Manufacturer: FUJITSU SIEMENS Product Name: F42 Version: 00030D0000000001 Serial Number: <removed> Currently an entry in the gspca/m5602 quirk table is missing. Signed-off-by: Gregor Jasny <gjasny@googlemail.com> Acked-by: Erik Andrén <erik.andren@gmail.com> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] stk1160: Check return value of stk1160_read_reg() in ↵Jesper Juhl1-1/+1
stk1160_i2c_read_reg() Remember to collect the exit status from 'stk1160_read_reg()' in 'rc' before testing it for less than zero. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Ezequiel Garcia <elezegarcia@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] au0828-dvb: ret is never tested. Get rid of itMauro Carvalho Chehab1-3/+2
drivers/media/usb/au0828/au0828-dvb.c:275:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] zr364xx: urb actual_length is unsignedMauro Carvalho Chehab1-2/+1
drivers/media/usb/zr364xx/zr364xx.c:1010:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Cc: Antoine Jacquet <royale@zerezo.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] usbvision-core: fix a warningMauro Carvalho Chehab1-1/+1
drivers/media/usb/usbvision/usbvision-core.c:1749:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] s2255drv: index is always positiveMauro Carvalho Chehab1-1/+1
drivers/media/usb/s2255/s2255drv.c:1654:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] em28xx-cards: fix a warningMauro Carvalho Chehab1-1/+1
drivers/media/usb/em28xx/em28xx-cards.c:3309:2: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] anysee: fix a warningMauro Carvalho Chehab1-1/+1
drivers/media/usb/dvb-usb-v2/anysee.c:1179:5: warning: 'tmp' may be used uninitialized in this function [-Wmaybe-uninitialized] Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] tlg2300: index is unsigned, so never below zeroMauro Carvalho Chehab1-2/+2
drivers/media/usb/tlg2300/pd-video.c:891:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] drivers/media/usb/tlg2300/pd-video.c:926:2: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Cc: Huang Shijie <shijie8@gmail.com> Cc: Kang Yong <kangyong@telegent.com> Cc: Zhang Xiaobing <xbzhang@telegent.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] gspca: warning fix: index is unsigned, so it will never be below 0Mauro Carvalho Chehab1-2/+1
drivers/media/usb/gspca/gspca.c: In function 'vidioc_querybuf': drivers/media/usb/gspca/gspca.c:1590:6: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] jeilinj: fix return of the response codeMauro Carvalho Chehab1-3/+3
drivers/media/usb/gspca/jeilinj.c: In function 'jlj_read1': drivers/media/usb/gspca/jeilinj.c:117:66: warning: parameter 'response' set but not used [-Wunused-but-set-parameter] The code still doesn't make much sense, as response is never tested there. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] gscpa: get rid of warning: suggest braces around empty bodyMauro Carvalho Chehab1-1/+1
There are hundreds of messages like this one, when GSPCA debug is disabled, when compiled with W=1: drivers/media/usb/gspca/spca500.c:725:46: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] Get rid of it, especially as it might actually cause troubles on some places. Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] pwc-if: must check vb2_queue_init() successMauro Carvalho Chehab1-1/+5
drivers/media/usb/pwc/pwc-if.c: In function 'usb_pwc_probe': drivers/media/usb/pwc/pwc-if.c:1003:16: warning: ignoring return value of 'vb2_queue_init', declared with attribute warn_unused_result [-Wunused-result] In the past, it used to have a logic there at queue init that would BUG() on errors. This logic got removed. Drivers are now required to explicitly handle the queue initialization errors, or very bad things may happen. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] pwc-if: get rid of warning: no previous prototypeMauro Carvalho Chehab1-1/+1
drivers/media/usb/pwc/pwc-if.c:158:23: warning: no previous prototype for 'pwc_get_next_fill_buf' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-28[media] pvrusb2: get rid of warning: no previous prototypeMauro Carvalho Chehab1-2/+2
drivers/media/usb/pvrusb2/pvrusb2-v4l2.c:199:5: warning: no previous prototype for 'pvr2_s_std' [-Wmissing-prototypes] drivers/media/usb/pvrusb2/pvrusb2-v4l2.c:368:5: warning: no previous prototype for 'pvr2_s_frequency' [-Wmissing-prototypes] Acked-by: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] vp702x: get rid of warning: no previous prototypeMauro Carvalho Chehab1-4/+4
drivers/media/usb/dvb-usb/vp702x.c:70:5: warning: no previous prototype for 'vp702x_usb_out_op_unlocked' [-Wmissing-prototypes] drivers/media/usb/dvb-usb/vp702x.c:89:5: warning: no previous prototype for 'vp702x_usb_out_op' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] lmedm04: get rid of warning: no previous prototypeMauro Carvalho Chehab1-1/+1
drivers/media/usb/dvb-usb-v2/lmedm04.c:802:13: warning: no previous prototype for 'lme_firmware_switch' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] dvb-usb-v2: get rid of warning: no previous prototypeMauro Carvalho Chehab2-11/+11
drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:227:5: warning: no previous prototype for 'dvb_usbv2_adapter_stream_init' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:239:5: warning: no previous prototype for 'dvb_usbv2_adapter_stream_exit' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:372:5: warning: no previous prototype for 'dvb_usbv2_adapter_dvb_init' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:444:5: warning: no previous prototype for 'dvb_usbv2_adapter_dvb_exit' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:460:5: warning: no previous prototype for 'dvb_usbv2_device_power_ctrl' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:557:5: warning: no previous prototype for 'dvb_usbv2_adapter_frontend_init' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/dvb_usb_core.c:626:5: warning: no previous prototype for 'dvb_usbv2_adapter_frontend_exit' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/usb_urb.c:115:5: warning: no previous prototype for 'usb_urb_free_urbs' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/usb_urb.c:208:5: warning: no previous prototype for 'usb_free_stream_buffers' [-Wmissing-prototypes] drivers/media/usb/dvb-usb-v2/usb_urb.c:226:5: warning: no previous prototype for 'usb_alloc_stream_buffers' [-Wmissing-prototypes] Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] az6027: get rid of warning: no previous prototypeMauro Carvalho Chehab1-5/+6
drivers/media/usb/dvb-usb/az6027.c:1054:5: warning: no previous prototype for 'az6027_identify_state' [-Wmissing-prototypes] drivers/media/usb/dvb-usb/az6027.c:301:5: warning: no previous prototype for 'az6027_usb_in_op' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] cx231xx-avcore: get rid of a sophisticated do-nothing codeMauro Carvalho Chehab1-5/+0
drivers/media/usb/cx231xx/cx231xx-avcore.c: In function 'cx231xx_capture_start': drivers/media/usb/cx231xx/cx231xx-avcore.c:2637:3: warning: suggest braces around empty body in an 'else' statement [-Wempty-body] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] cx231xx: get rid of warning: no previous prototypeMauro Carvalho Chehab3-7/+9
drivers/media/usb/cx231xx/cx231xx-avcore.c:1071:5: warning: no previous prototype for 'stopAudioFirmware' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-avcore.c:1076:5: warning: no previous prototype for 'restartAudioFirmware' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-cards.c:689:6: warning: no previous prototype for 'cx231xx_reset_out' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-cards.c:697:6: warning: no previous prototype for 'cx231xx_enable_OSC' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-cards.c:701:6: warning: no previous prototype for 'cx231xx_sleep_s5h1432' [-Wmissing-prototypes] drivers/media/usb/cx231xx/cx231xx-i2c.c:75:5: warning: no previous prototype for 'cx231xx_i2c_send_bytes' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] au0828: get rid of warning: no previous prototypeMauro Carvalho Chehab2-9/+9
drivers/media/usb/au0828/au0828-cards.c:28:6: warning: no previous prototype for 'hvr950q_cs5340_audio' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:161:6: warning: no previous prototype for 'au0828_uninit_isoc' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:200:5: warning: no previous prototype for 'au0828_init_isoc' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:786:5: warning: no previous prototype for 'au0828_analog_stream_enable' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:813:6: warning: no previous prototype for 'au0828_analog_stream_reset' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:916:6: warning: no previous prototype for 'au0828_vid_buffer_timeout' [-Wmissing-prototypes] drivers/media/usb/au0828/au0828-video.c:940:6: warning: no previous prototype for 'au0828_vbi_buffer_timeout' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2012-10-27[media] rc-core: add separate defines for protocol bitmaps and numbersDavid Härdeman20-115/+123
The RC_TYPE_* defines are currently used both where a single protocol is expected and where a bitmap of protocols is expected. Functions like rc_keydown() and functions which add/remove entries to the keytable want a single protocol. Future userspace APIs would also benefit from numeric protocols (rather than bitmap ones). Keytables are smaller if they can use a small(ish) integer rather than a bitmap. Other functions or struct members (e.g. allowed_protos, enabled_protocols, etc) accept multiple protocols and need a bitmap. Using different types reduces the risk of programmer error. Using a protocol enum whereever possible also makes for a more future-proof user-space API as we don't need to worry about a sufficient number of bits being available (e.g. in structs used for ioctl() calls). The use of both a number and a corresponding bit is dalso one in e.g. the input subsystem as well (see all the references to set/clear bit when changing keytables for example). This patch separate the different usages in preparation for upcoming patches. Where a single protocol is expected, enum rc_type is used; where one or more protocol(s) are expected, something like u64 is used. The patch has been rewritten so that the format of the sysfs "protocols" file is no longer altered (at the loss of some detail). The file itself should probably be deprecated in the future though. Signed-off-by: David Härdeman <david@hardeman.nu> Cc: Andy Walls <awalls@md.metrocast.net> Cc: Maxim Levitsky <maximlevitsky@gmail.com> Cc: Antti Palosaari <crope@iki.fi> Cc: Mike Isely <isely@pobox.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>