summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2013-03-21[media] af9035: fix af9033 demod sampling frequencyAntti Palosaari
ADC needs to be also multiplied to 2 as it9135. Fixes bug I introduced few commits ago. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9035: add auto configuration heuristic for it9135Antti Palosaari
Detect automatically multiple chip versions and select configuration according to that. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9035: add support for 1st gen it9135Antti Palosaari
Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] af9033: support for it913x tunersAntti Palosaari
Add support for tuners integrated to the IT9135 and IT9137. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] ITE IT913X silicon tuner driverAntti Palosaari
It is tuner driver for tuner integrated to the ITE IT9135 and IT9137 chips. I split it out from the current it913x-fe driver. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] media/rc/imon.c: avoid flooding syslog with "unknown keypress" when ↵Kevin Baradon
keypad is pressed My 15c2:0036 device floods syslog when a keypad key is pressed: Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fff2 Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fef2 Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fff2 Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fff2 Feb 18 19:00:57 homeserver kernel: imon 5-1:1.0: imon_incoming_packet: unknown keypress, code 0x100fff2 This patch removes those messages from imon, following suggestion from Mauro. Unknown keys shall be correctly handled by rc/input layer. Signed-off-by: Kevin Baradon <kevin.baradon@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] media/rc/imon.c: make send_packet() delay larger for 15c2:0036Kevin Baradon
Some imon devices (like 15c2:0036) need a higher delay between send_packet calls. Default value is still 5ms to avoid regressions on already working hardware. Also use interruptible wait to avoid load average going too high (and let caller handle signals). Signed-off-by: Kevin Baradon <kevin.baradon@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] Corrected Oops on omap_vout when no manager is connectedFederico Fuga
If no manager is connected to the vout device, the omapvid_init() function fails. No error condition is checked, and the device is started. Later on, when irq is serviced, a NULL pointer dereference occurs. Also, the isr routine must be registered only if no error occurs, otherwise the isr triggers without the proper setup, and the kernel oops again. To prevent this, the error condition is checked, and the streamon function exits with error. Also the isr registration call is moved after the setup procedure is completed. Reviewed-by: Prabhakar Lad <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] xc5000: fix incorrect debug printnkDmitri Belimov
I found very small bug in xc5000 source. When set option debug=1 and listen a radio we see in dmesg xc5000: xc_SetTVStandard() Standard = M/N-NTSC/PAL-BTSC at all times. However, it should be, instead "FM Radio-INPUT1_MONO". That happens because xc5000_set_radio_freq() gets the correct value for VideoMode and AudioMode for radio and calls xc_SetTVStandard() where name of standard comes from the incorrect place priv->video_standard. This incorrect debug message makes debugging a little difficult. Signed-off-by: Dmitry Belimov <d.belimov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] soc_camera: remove two outdated selectsPaul Bolle
Release v2.6.30 removed the MT9M001_PCA9536_SWITCH and MT9V022_PCA9536_SWITCH Kconfig symbols, in commits 36034dc325ecab63c8cfb992fbf9a1a8e94738a2 ("V4L/DVB (11032): mt9m001: allow setting of bus width from board code") and e958e27adeade7fa085dd396a8a0dfaef7e338c1 ("V4L/DVB (11033): mt9v022: allow setting of bus width from board code"). These two commits removed all gpio related code from these two drivers. But they skipped removing their two selects of GPIO_PCA953X. Remove these now as they are outdated. Their dependencies can never evaluate to true anyhow. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] sh_vou: Use module_platform_driver_probe macroSachin Kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] sh_veu: Use module_platform_driver_probe macroSachin Kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] soc_camera/mx1_camera: Use module_platform_driver_probe macroSachin Kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] sh_veu.c: Convert to devm_ioremap_resource()Sachin Kamat
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] soc_camera/pxa_camera: Convert to devm_ioremap_resource()Sachin Kamat
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] soc_camera/sh_mobile_csi2: Convert to devm_ioremap_resource()Sachin Kamat
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] soc_camera/sh_mobile_ceu_camera: Convert to devm_ioremap_resource()Sachin Kamat
Use the newly introduced devm_ioremap_resource() instead of devm_request_and_ioremap() which provides more consistent error handling. devm_ioremap_resource() provides its own error messages; so all explicit error messages can be removed from the failure code paths. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] mt9v022 driver: send valid HORIZONTAL_BLANKING values to mt9v024 soc ↵Andrei Andreyanau
camera This patch fixes the issue that appears when mt9v024 camera is used with the mt9v022 soc camera driver. The minimum total row time is 690 columns (horizontal width + horizontal blanking). The minimum horizontal blanking is 61. Thus, when the window width is set below 627, horizontal blanking must be increased. For the mt9v024 camera the values above are correct and for the mt9v022 camera the correct values are in the existing kernel driver. Signed-off-by: Andrei Andreyanau <a.andreyanau@sam-solutions.net> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] mt9m111: fix Oops - initialise context before dereferencingGuennadi Liakhovetski
A recent commit "[media] soc-camera: Push probe-time power management to drivers" causes an Oops during mt9m111 driver probing because its .ctx private data field is now dereferenced before it is initialised. Fix this by initialising the field earlier. Reported-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Tested-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] soc-camera: mt9m111: Fix auto-exposure controlBenoît Thébaudeau
Commit f9bd5843658e18a7097fc7258c60fb840109eaa8 changed V4L2_CID_EXPOSURE_AUTO from boolean to enum, and commit af8425c54beb3c32cbb503a379132b3975535289 changed the creation of this control into a menu for the mt9m111. However, mt9m111_set_autoexposure() is still interpreting the value set for this control as a boolean, which also conflicts with the default value of this control set to V4L2_EXPOSURE_AUTO (0). This patch makes mt9m111_set_autoexposure() interpret the value set for V4L2_CID_EXPOSURE_AUTO as defined by enum v4l2_exposure_auto_type. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Tested-by: Javier Martin <javier.martin@vista-silicon.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] ts2020: use customise option correctlyPaul Bolle
The Kconfig entry for "TS2020 based tuners" defaults to modular if DVB_FE_CUSTOMISE is set. But that Kconfig symbol was replaced with MEDIA_SUBDRV_AUTOSELECT as of v3.7. So use the new symbol. And negate the logic, so we are in line with all the similar entries in this file. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] media: tvp514x: enable TVP514X for media controller based usageManjunath Hadli
add support for TVP514x as a media entity and support for pad operations. The decoder supports 1 output pad. The default format code was V4L2_MBUS_FMT_YUYV10_2X10 changed it to V4L2_MBUS_FMT_UYVY8_2X8. Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] media: add support for decoder as one of media entity typesManjunath Hadli
A lot of SOCs including Texas Instruments Davinci family mainly use video decoders as input devices. This patch adds a flag 'MEDIA_ENT_T_V4L2_SUBDEV_DECODER' media entity type for decoder's. Along side updates the documentation for this media entity type. Signed-off-by: Manjunath Hadli <manjunath.hadli@ti.com> Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] media: ths7353: add support for ths7353 video amplifierLad, Prabhakar
The patch adds support for THS7353 video amplifier. The the THS7353 amplifier is very much similar to the existing THS7303 video amplifier driver. This patch appropriately makes changes to the existing ths7303 driver and adds support for the THS7353. This patch also adds V4L2_IDENT_THS7353 for the THS7353 chip and appropriate changes to Kconfig file for building. Signed-off-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Martin Bugge <marbugge@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] davinci_vpfe: Use module_platform_driver macroSachin Kamat
module_platform_driver() eliminates the boilerplate and simplifies the code. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Acked-by: Lad, Prabhakar <prabhakar.lad@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] Drivers: staging: media: davinci_vpfe: Use resource_size functionAlexandru Gheorghiu
Use resource_size function on resource object instead of explicit computation. Signed-off-by: Alexandru Gheorghiu <gheorghiuandru@gmail.com> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] solo6x10: Update TODO (maintainer change)Ismael Luceno
Signed-off-by: Ismael Luceno <ismael.luceno@corp.bluecherry.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] vb2-dma-sg: add debug module optionHans Verkuil
This prevents the kernel log from being spammed with these messages. By turning on the debug option you will see them again. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] videobuf2: add gfp_flagsHans Verkuil
Some drivers have special memory requirements for their buffers, usually related to DMA (e.g. GFP_DMA or __GFP_DMA32). Make it possible to specify additional GFP flags for those buffers by adding a gfp_flags field to vb2_queue. Note that this field will be replaced in the future with a different mechanism, but that is still work in progress and we need this feature now so we won't be able to convert drivers with such requirements to vb2. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Acked-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Federico Vaga <federico.vaga@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] dvb-core: don't clear stats at DTV_CLEARMauro Carvalho Chehab
The stats are cleared by the frontend. Don't do it at DTV_CLEAR. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: Fix bogus signal strength indicatorMauro Carvalho Chehab
The DVBv3 signal strength indicator is bogus: it doesn't range from 0 to 65535 as it would be expected. Also, 0 means the max signal strength. Now that a better way to estimate it was added, use the new way. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: use a better calculus for RF strengthMauro Carvalho Chehab
The AZ6007 driver released by Terratec has a better way to estimate the signal strength, at CtrlSigStrength(). Port it to the driver. It should be noticed that there are two parameters there that are tuner-specific. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: Add pre/post BER and PER/UCB statsMauro Carvalho Chehab
The original az6007 driver has the code to calculate such stats. Add it to the driver, reporting them via DVBv5 stats API. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] drxk: remove dummy BER read codeMauro Carvalho Chehab
The BER code does nothing but filling it with zero. Remove it. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: make some functions staticMauro Carvalho Chehab
drivers/media/common/siano/smsdvb-debugfs.c:51:6: warning: no previous prototype for 'smsdvb_print_dvb_stats' [-Wmissing-prototypes] drivers/media/common/siano/smsdvb-debugfs.c:154:6: warning: no previous prototype for 'smsdvb_print_isdb_stats' [-Wmissing-prototypes] drivers/media/common/siano/smsdvb-debugfs.c:244:6: warning: no previous prototype for 'smsdvb_print_isdb_stats_ex' [-Wmissing-prototypes] drivers/media/common/siano/smscoreapi.c:832:5: warning: no previous prototype for 'smscore_configure_board' [-Wmissing-prototypes] drivers/media/common/siano/smscoreapi.c:1301:5: warning: no previous prototype for 'smscore_init_device' [-Wmissing-prototypes] Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: Fix the remaining checkpatch.pl compliantsMauro Carvalho Chehab
Fix all other remaining checkpatch.pl compliants on the Siano driver, except for the 80-cols (soft) limit. Those are harder to fix, and probably not worth to do right now. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: remove the remaining CamelCase compliantsMauro Carvalho Chehab
Remove the remaining CamelCase checkpatch.pl compliants. There are still a few left, but those are due to USB and DVB APIs. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: fix checkpatch.pl compliants on smscoreapi.hMauro Carvalho Chehab
Fix the remaining checkpatch.pl compliants at smscoreapi.h, except by the "line over 80 characters" on comments. Fixing those would require more time, as the better is to convert them into the struct descriptions used inside the kernel, as described at: Documentation/kernel-doc-nano-HOWTO.txt Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: convert structure names to lowercaseMauro Carvalho Chehab
There are several structures defined in uppercase. Convert them to lowercase, and simplify their names, when possible. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: get rid of CammelCase from smscoreapi.hMauro Carvalho Chehab
It is almost impossible to see a compliant with checkpatch.pl on those Siano drivers, as there are simply too much violations on it. So, now that a big change was done, the better is to cleanup the checkpatch compliants. Let's first replace all CammelCase symbols found at smscoreapi.h using camel_case namespace. That removed 144 checkpatch.pl compliants on this file. Of course, the other files need to be fixed accordingly. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: add MODULE_FIRMWARE() macrosMauro Carvalho Chehab
This driver can use several firmwares. Provide such info at module firmware metadata. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: use defines for firmware namesMauro Carvalho Chehab
There are too many firmwares there. As we need to add MODULE_FIMWARE() macros, the better is to define their names on just one place and use the macros for both cards/device type tables and MODULE_FIRMWARE(). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: Remove bogus complain about MSG_SMS_DVBT_BDA_DATAMauro Carvalho Chehab
When the driver is tuned into chanel, and it is removed/reinserted, the message stream data may be arriving during device probe: [ 5680.162004] smscore_set_device_mode: set device mode to 6 [ 5680.162267] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.162391] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.162641] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.162891] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.163016] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.163266] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.163516] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.163640] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.163891] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.164016] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.164265] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.164515] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.164519] smscore_onresponse: Firmware id 6 prots 0x40 ver 8.1 [ 5680.164766] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.166018] smscore_onresponse: message MSG_SMS_DVBT_BDA_DATA(693) not handled. [ 5680.166438] DVB: registering new adapter (Siano Rio Digital Receiver) Instead of complaining, just silently discard those messages, instead of complaining. A proper fix is to put the device on suspend/power down mode when the module is removed. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: remove doubled new lineMauro Carvalho Chehab
sms_debug() and sms_info() already adds a '\n' at the printed strings. No need to add more. That helps to cleanup stuff like: [ 4868.205648] smscore_onresponse: message not handled. [ 4868.205898] smscore_onresponse: message not handled. and: [ 5467.959769] smscore_onresponse: data rate 143069 bytes/secs While here, provides the message name, when the message is not handled by the smsmdtv core. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: remove a bogus printk lineMauro Carvalho Chehab
The logic that detects the types of sms devices is bogus. It returns [ 4645.187790] smsusb_init_device: line: 372: Unspecified sms device type! For several devices, including the one I have (SMS_RIO). In a matter of fact, the right thing to do there is to print an error only if the device is really unknown (SMS_UNKNOWN_TYPE). Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: add a MAINTAINERS entry for itMauro Carvalho Chehab
Nobody is maintaining this driver. The project started by a developer that used to work at Hauppauge. A Siano developer assumed its maintainership after that, but he left the company. Another Siano developer sent several patches updating it, but, after upstream feedback, it seems he gave up merging the driver, as he never answered back to the received feedbacks. As I have a few siano devices here that work with ISDB-T, I can help to keep it into a good shape. So, better to take its maintainership. I don't have any siano SDIO setup here, trough. So, I'll just apply without any test any patch that looks sane and touches only drivers/media/mmc/siano. So, let's tag it as "Odd fixes". Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: reorder smscore_get_fw_filename() functionMauro Carvalho Chehab
Put this function earlier in the code, to avoid the need of defining a function stub. No functional changes. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: remove the bogus firmware lookup codeMauro Carvalho Chehab
There is an special lookup code that is called when SMS_BOARD_UNKNOWN. The logic there is bogus and will cause an oops, as .type is SMS_UNKNOWN_TYPE (-1). As the code would do: return smscore_fw_lkup[type][mode]; That would mean that it would try to go past the smscore_fw_lkup table. So, just remove that bogus code, simplifying the logic. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: honour per-card default modeMauro Carvalho Chehab
Instead of using a global default_mode, passed via modprobe parameter, use the one defined inside the cards struct. That will prevent the need of manually specify it for each board, except, of course, if the user wants to do something different, on boards that accept multiple types. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2013-03-21[media] siano: simplify firmware lookup logicMauro Carvalho Chehab
There are two ways to specify firmware for siano devices: a per-device ID and a per-device type. The per-device type logic is currently made by a 11x9 string table, sparsely filled. It is very hard to read the table at the source code, as there are too much "none" filling there ("none" there is a way to tell NULL). Instead of using such problematic table, convert it into an easy to read table, where the unused values will be defaulted to NULL. While here, also simplifies a little bit the logic and print a message if an user-selected mode doesn't exist. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>