summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/dvb-usb-v2/af9035.c
Commit message (Collapse)AuthorAgeFilesLines
* media: use strscpy() instead of strlcpy()Mauro Carvalho Chehab2018-09-111-1/+1
| | | | | | | | | | | The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: af9035: prevent buffer overflow on writeJozef Balga2018-08-291-2/+4
| | | | | | | | | | | | | When less than 3 bytes are written to the device, memcpy is called with negative array size which leads to buffer overflow and kernel panic. This patch adds a condition and returns -EOPNOTSUPP instead. Fixes bugzilla issue 64871 [mchehab+samsung@kernel.org: fix a merge conflict and changed the condition to match the patch's comment, e. g. len == 3 could also be valid] Signed-off-by: Jozef Balga <jozef.balga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
* media: rc: rename RC_TYPE_* to RC_PROTO_* and RC_BIT_* to RC_PROTO_BIT_*Sean Young2017-08-201-7/+7
| | | | | | | | | RC_TYPE is confusing and it's just the protocol. So rename it. Suggested-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Sean Young <sean@mess.org> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* media: Added support for the TerraTec T1 DVB-T USB tuner [IT9135 chipset]Nuno Henriques2017-07-201-0/+2
| | | | | Signed-off-by: Nuno Henriques <nuno.amhenriques@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] af9035: correct demod i2c addressesAntti Palosaari2017-01-311-8/+9
| | | | | | | | | | | Chip uses so called 8-bit i2c addresses, but on bus there is of course correct 7-bit addresses with rw bit as lsb - verified with oscilloscope. Lets still use correct addresses in driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] it913x: add chip device ids for bindingAntti Palosaari2017-01-311-4/+4
| | | | | | | | Driver supports 2 different device versions, AX and BX. Use device IDs to pass chip version information to driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] af9035: register it9133 tuner using platform bindingAntti Palosaari2017-01-311-64/+60Star
| | | | | | | | | | | it913x tuner driver is changed to platform model so we need bind it using platform_device_register_data(). Also remove hacks from I2C adapter where fake tuner driver address (addr >> 1) were used as those are no longer needed. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] af9035: read and store whole eepromAntti Palosaari2017-01-311-70/+56Star
| | | | | | | | Read eeprom content to chip state and read values there when needed. Also debug dump eeprom content. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] Add support for EVOLVEO XtraTV stickCIJOML CIJOMLovic2016-10-241-0/+2
| | | | | | | | Add a new USB ID for EVOLVEO XtraTV stick. [mchehab@s-opensource.org: fix patch and make checkpatch happy] Cc: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] rc: split nec protocol into its three variantsSean Young2016-09-221-2/+7
| | | | | | | | | | | | | | Currently we do not know what variant (bit length) of the nec protocol is used, other than from guessing from the length of the scancode. Now nec will be handled the same way as the sony protocol or the rc6 protocol; one variant per bit length. In the future we might want to expose the rc protocol type to userspace and we don't want to be introducing this world of pain into userspace too. Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] af9035: fix dual tuner detection with PCTV 79eStefan Pöschel2016-07-151-17/+33
| | | | | | | | | | | | | | | The value 5 of the EEPROM_TS_MODE register (meaning dual tuner presence) is only valid for AF9035 devices. For IT9135 devices it is invalid and led to a false positive dual tuner mode detection with PCTV 79e. Therefore on non-AF9035 devices and with value 5 the driver now defaults to single tuner mode and outputs a regarding info message to log. This fixes Bugzilla bug #118561. Reported-by: Marc Duponcheel <marc@offline.be> Signed-off-by: Stefan Pöschel <basic.master@gmx.de> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] af9035: fix loggingAntti Palosaari2016-06-091-96/+97
| | | | | | | | Remove __func__ and KBUILD_MODNAME from logging formatters and pass USB interface device instead, so logging can be done correctly. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: fix for MXL5007T devices with I2C read issuesAlessandro Radicati2016-06-091-0/+21
| | | | | | | | | | | The MXL5007T tuner will lock-up on some devices after an I2C read transaction. This patch works around this issue by inhibiting such operations and emulating a 0x00 response. The workaround is only applied to USB devices known to exhibit this flaw. Signed-off-by: Alessandro Radicati <alessandro@radicati.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: I2C combined write + read transaction fixAlessandro Radicati2016-06-091-2/+17
| | | | | | | | | | | | This patch will modify the af9035 driver to use the register address fields of the I2C read command for the combined write/read transaction case. Without this change, the firmware issues just a I2C read transaction without the preceding write transaction to select the register. Signed-off-by: Alessandro Radicati <alessandro@radicati.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] Add support for Avermedia AverTV Volar HD 2 (TD110)Philippe Valembois2016-03-031-0/+2
| | | | | | Signed-off-by: Philippe Valembois <lephilousophe@users.sourceforge.net> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: add support for 2nd tuner of MSI DigiVox DiversityStefan Pöschel2016-02-011-2/+2
| | | | | | | PIP tested with VLC. Diversity tested with the Windows driver. Signed-off-by: Stefan Pöschel <basic.master@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: add USB ID 07ca:0337 AVerMedia HD Volar (A867)Antti Palosaari2015-05-301-0/+2
| | | | | | | | | | | | | It is AF9035 + MxL5007T. Driver reports: prechip_version=00 chip_version=03 chip_type=3802 Not sure if that USB ID is reserved only for HP brand or if it is common, but the stick I have is branded as HP part no. 580715-001 rmn A867. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: bind tua9001 using I2C bindingAntti Palosaari2015-05-181-9/+17
| | | | | | | Change tua9001 driver from media binding to I2C client binding. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: fix device order in ID listAntti Palosaari2015-05-181-3/+5
| | | | | | | | | Driver supports multiple chipset versions. Devices are ordered to ID table per used chipset type. "ITE 9303 Generic" device uses IT9303 chipset and was added mistakenly between IT9135 IDs. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: bind fc2580 using I2C bindingAntti Palosaari2015-05-181-8/+13
| | | | | | | Change fc2580 driver from media binding to I2C client binding. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] si2157: support selection of IF interfaceOlli Salonen2015-05-121-0/+1
| | | | | | | | | | | | | | The chips supported by the si2157 driver have two IF outputs (either pins 12+13 or pins 9+11). Instead of hardcoding the output to be used add an option to choose which output shall be used. As this patch changes the default behaviour, the IF interface is specified in each driver currently using si2157 driver. This is to keep bisectability. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: initialize si2168_config structOlli Salonen2014-11-211-0/+1
| | | | | | | | When new parameters are added for si2168 driver, the parameters have to be explicitly defined for each device if the si2168_config struct is not initialized to all zeros. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: make sure loading modules is constKees Cook2014-10-211-3/+3
| | | | | | | | | Make sure that loaded modules are const char strings so we don't load arbitrary modules in the future, nor allow for format string leaks in the module request call. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: Add support for IT930x USB bridgeOlli Salonen2014-09-241-17/+307
| | | | | | | | | | | | | | | | | | | | | Add support for IT930x USB bridge and IT9303 reference design. It is a DVB-T/T2/C tuner with the following components: - IT9303 USB bridge - Si2168-B40 demodulator - Si2147-A30 tuner The IT9303 requires firmware that can be downloaded here: http://trsqr.net/olli/linux/firmwares/it930x/ The Si2168-B40 requires firmware, but the one that is used by PCTV 292e can be used. http://palosaari.fi/linux/v4l-dvb/firmware/Si2168/Si2168-B40/ The Si2147-A30 tuner does not require firmware loading. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: Add possibility to define which I2C adapter to useOlli Salonen2014-09-241-5/+4Star
| | | | | | | | | | Some I2C tuner drivers require that the I2C device of the tuner is added to the I2C adapter of the demodulator (Si2168+Si2157 for example). Add possibility to tell af9035_add_i2c_dev which I2C adapter should be used. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: remove I2C client differentlyAntti Palosaari2014-09-221-26/+67
| | | | | | | | | | | | | It crash kernel when device was removed while it was streaming. That is because we removed driver and frontend thread was still running. Use new callback which allows I2C driver removal just after frontend is unregistered. V2: fixed by reported by Daniel Reported-by: Daniel Glöckner <daniel-gl@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: replace PCTV device model numbers with nameAntti Palosaari2014-09-221-2/+2
| | | | | | | | | Use device names for recent PCTV Systems devices: PCTV AndroiDTV (78e) PCTV microStick (79e) Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9033: remove I2C addr from configAntti Palosaari2014-09-221-15/+14Star
| | | | | | | | I2C driver address is passed as a i2c_new_device() parameter when device is created. Thus no need to keep it in config struct. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: few small I2C master xfer changesAntti Palosaari2014-09-221-23/+14Star
| | | | | | | | | | Biggest problem of that function is complexity. Try reduce complexity: * define macros to detect all 3 supported xfers * remove duplicate message maximum size checks Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9033: convert to I2C clientAntti Palosaari2014-09-221-9/+41
| | | | | | | Convert driver to kernel I2C model. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] it913x: re-implement sleepAntti Palosaari2014-09-211-0/+14
| | | | | | | | Re-implement sleep. Based USB sniffs taken from the latest Hauppauge windows driver version 07/10/2014, 14.6.23.32191. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] it913x: convert to I2C driverAntti Palosaari2014-09-211-3/+129
| | | | | | | | | | | Change the it913x driver to use the I2C high lever tuner binding model. As af9035 depends on it, add a code there to do the binding. [mchehab@osg.samsung.com: Merge 3 patches into one, because we don't want to break bisect due to the conversion] Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: make checkpatch.pl happyAntti Palosaari2014-09-211-1/+7
| | | | | | | Correct issues reported by checkpatch.pl. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: remove AVerMedia eeprom overrideAntti Palosaari2014-09-211-19/+0Star
| | | | | | | | | | | | | Reverts commit 3ab25123373270152a9fae98e3c48ef1b2a878c0 [media] af9035: override tuner for AVerMedia A835B devices Original commit itself is correct, but it was replaced by more general solution (commit 1cbbf90d0406913ad4b44194b07f4f41bde84e54). This old solution was committed by a accident and is not needed anymore. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: enable AF9033 demod clock source for IT9135Antti Palosaari2014-09-211-3/+6
| | | | | | | | | | Integrated RF tuner of IT9135 is connected to demod clock source named dyn0_clk. Enable that clock source in order to provide stable clock early enough. Cc: Bimow Chen <Bimow.Chen@ite.com.tw> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] af9035: new IDs: add support for PCTV 78e and PCTV 79eMalcolm Priestley2014-09-041-0/+4
| | | | | | | | | | | | | | add the following IDs USB_PID_PCTV_78E (0x025a) for PCTV 78e USB_PID_PCTV_79E (0x0262) for PCTV 79e For these it9135 devices. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Cc: Antti Palosaari <crope@iki.fi> Cc: <stable@vger.kernel.org> # v3.14+ Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: override tuner for AVerMedia A835B devicesAntti Palosaari2014-07-261-0/+19
| | | | | | | | | Tuner ID set into EEPROM is wrong, which causes driver to select wrong tuner profile. That leads device non-working. Fix issue by overriding known bad tuner IDs with suitable default value. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] rc-core: document the protocol typeDavid Härdeman2014-07-241-4/+5
| | | | | | | | | | | | | | | Right now the protocol information is not preserved, rc-core gets handed a scancode but has no idea which protocol it corresponds to. This patch (which required reading through the source/keymap for all drivers, not fun) makes the protocol information explicit which is important documentation and makes it easier to e.g. support multiple protocols with one decoder (think rc5 and rc-streamzap). The information isn't used yet so there should be no functional changes. [m.chehab@samsung.com: rebased, added cxusb and removed bad whitespacing] Signed-off-by: David Härdeman <david@hardeman.nu> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: override tuner id when bad value set into eepromAntti Palosaari2014-07-041-7/+33
| | | | | | | | | | | | | Tuner ID set into EEPROM is wrong in some cases, which causes driver to select wrong tuner profile. That leads device non-working. Fix issue by overriding known bad tuner IDs with suitable default value. Thanks to MX-NET Telekomunikace s.r.o. for providing non-working DTV stick, that I could fix the bug! Cc: stable@vger.kernel.org # v3.15+ Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9033: Don't export functions for the hardware filterMauro Carvalho Chehab2014-03-151-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | Exporting functions for hardware filter is a bad idea, as it breaks compilation if: CONFIG_DVB_USB_AF9035=y CONFIG_DVB_AF9033=m Because the PID filter function calls would be hardcoded at af9035. The same doesn't happen with af9033_attach() because the dvb_attach() doesn't hardcode it. Instead, it dynamically links it at runtime. However, calling dvb_attach() multiple times is problematic, as it increments module kref. So, the better is to pass one parameter for the af9033 module to fill the hardware filters, and then use it inside af9035. Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: use af9033 PID filtersAntti Palosaari2014-03-151-51/+10Star
| | | | | | | | | | | PID filters are property of af9033 demod. Use PID filters from af9033 driver as it provides those now. Allow possible dual mode on USB 1.1 mode too as bandwidth could be just enough when filters are used on both frontends. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: use default i2c slave address for af9035 tooAntti Palosaari2014-02-241-8/+7Star
| | | | | | | | Some device vendors has forgotten set correct slave demod I2C address to eeprom. Use default I2C address when eeprom has no address at all. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: Add remaining it913x dual ids to af9035Malcolm Priestley2014-02-241-0/+8
| | | | | | | | | | | | | | | | As follow on to patch af9035: Move it913x single devices to af9035 and patch 1. SNR is reported as db/10 values. All dual ids are added to af9035 and it913x driver disabled. it913x/it913x-fe removal patches to follow. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: add default 0x9135 slave I2C addressMalcolm Priestley2014-02-241-0/+8
| | | | | | | | | | | On some devices the vendor has not set EEPROM_2ND_DEMOD_ADDR. Checks tmp is not zero after call to get EEPROM_2ND_DEMOD_ADDR and sets the default slave address of 0x3a on 0x9135 devices. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: Move it913x single devices to af9035Malcolm Priestley2014-02-241-6/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The generic v1 and v2 devices have been all tested. IDs tested USB_PID_ITETECH_IT9135 v1 & v2 USB_PID_ITETECH_IT9135_9005 v1 USB_PID_ITETECH_IT9135_9006 v2 Current Issues There is no signal on USB_PID_ITETECH_IT9135 v2 No SNR reported all devices. All single devices tune and scan fine. All remotes tested okay. Dual device failed to register second adapter USB_PID_KWORLD_UB499_2T_T09 It is not clear what the problem is at the moment. So only single IDs are transferred in this patch. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: add ID [2040:f900] Hauppauge WinTV-MiniStick 2Antti Palosaari2014-02-041-0/+2
| | | | | | | | | Add USB ID [2040:f900] for Hauppauge WinTV-MiniStick 2. Device is build upon IT9135 chipset. Tested-by: Stefan Becker <schtefan@gmx.net> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: unlock on error in af9035_i2c_master_xfer()Dan Carpenter2013-12-041-2/+5
| | | | | | | | | | | We introduced a couple new error paths which are missing unlocks. Fixes: 7760e148350b ('[media] af9035: Don't use dynamic static allocation') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: stable@vger.kernel.org
* [media] af9035: fix broken I2C and USB I/OAntti Palosaari2013-12-041-4/+4
| | | | | | | | | | | There was three small buffer len calculation bugs which caused driver non-working. These are coming from recent commit: commit 7760e148350bf6df95662bc0db3734e9d991cb03 [media] af9035: Don't use dynamic static allocation Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Cc: stable@vger.kernel.org
* [media] af9035: add [0413:6a05] Leadtek WinFast DTV Dongle DualAntti Palosaari2013-11-291-0/+2
| | | | | | | | | | It is IT9135 dual design. Thanks to Michael Piko for reporting that! Reported-by: Michael Piko <michael@piko.com.au> Signed-off-by: Antti Palosaari <crope@iki.fi> Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] af9035: Don't use dynamic static allocationMauro Carvalho Chehab2013-11-081-3/+26
| | | | | | | | | | | | | | Dynamic static allocation is evil, as Kernel stack is too low, and compilation complains about it on some archs: drivers/media/usb/dvb-usb-v2/af9035.c:142:1: warning: 'af9035_wr_regs' uses dynamic stack allocation [enabled by default] drivers/media/usb/dvb-usb-v2/af9035.c:305:1: warning: 'af9035_i2c_master_xfer' uses dynamic stack allocation [enabled by default] Instead, let's enforce a limit for the buffer to be the max size of a control URB payload data (64 bytes). Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com> Reviewed-by: Hans Verkuil <hans.verkuil@cisco.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>