summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb-frontends/ds3000.c
Commit message (Collapse)AuthorAgeFilesLines
* media: dvb-frontends: delete jump targetsMarkus Elfring2017-09-231-7/+3Star
| | | | | | | | | | | | * Return directly after a call of the function "kzalloc" failed at the beginning. * Move a bit of exception handling code into an if branch. * Delete jump targets which became unnecessary with this refactoring. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
* media: drivers: improve a size determinationMarkus Elfring2017-09-231-1/+1
| | | | | | | | | | | | | Replace the specification of a data structure by a pointer dereference as the parameter for the operator "sizeof" to make the corresponding size determination a bit safer according to the Linux coding style convention. This issue was detected by using the Coccinelle software. [mchehab@s-opensoure.com: merge similar patches into one] Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
* media: drivers: delete unnecessary variable initialisationsMarkus Elfring2017-09-231-1/+1
| | | | | | | | | | The variables will be set to an appropriate value before usage. Thus omit the explicit initialisation at the beginning. [mchehab@s-opensource.com: fold similar patches into one] Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com>
* media: drivers: delete error messages for failed memory allocationMarkus Elfring2017-09-231-6/+2Star
| | | | | | | | | | | | Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. [mchehab@s-opensource.com: fold several similar patches into one] Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Hans Verkuil <hansverk@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] dvb: make DVB frontend *_ops instances "const"Max Kellermann2016-11-181-2/+2
| | | | | | | | | | | | | These are immutable. Making them "const" allows the compiler to move them to the "rodata" section. Note that cxd2841er_t_c_ops cannot be made "const", because cxd2841er_attach() modifies it. Ouch! [mchehab@s-opensource.com: fix merge conflicts] Signed-off-by: Max Kellermann <max.kellermann@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] dvb-frontends: don't break long linesMauro Carvalho Chehab2016-10-211-8/+7Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the 80-cols restrictions, and latter due to checkpatch warnings, several strings were broken into multiple lines. This is not considered a good practice anymore, as it makes harder to grep for strings at the source code. As we're right now fixing other drivers due to KERN_CONT, we need to be able to identify what printk strings don't end with a "\n". It is a way easier to detect those if we don't break long lines. So, join those continuation lines. The patch was generated via the script below, and manually adjusted if needed. </script> use Text::Tabs; while (<>) { if ($next ne "") { $c=$_; if ($c =~ /^\s+\"(.*)/) { $c2=$1; $next =~ s/\"\n$//; $n = expand($next); $funpos = index($n, '('); $pos = index($c2, '",'); if ($funpos && $pos > 0) { $s1 = substr $c2, 0, $pos + 2; $s2 = ' ' x ($funpos + 1) . substr $c2, $pos + 2; $s2 =~ s/^\s+//; $s2 = ' ' x ($funpos + 1) . $s2 if ($s2 ne ""); print unexpand("$next$s1\n"); print unexpand("$s2\n") if ($s2 ne ""); } else { print "$next$c2\n"; } $next=""; next; } else { print $next; } $next=""; } else { if (m/\"$/) { if (!m/\\n\"$/) { $next=$_; next; } } } print $_; } </script> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
* [media] ds3000: return error if invalid symbol rate is setOlli Salonen2016-06-071-0/+9
| | | | | | | | | Return -EINVAL if ds3000_set_frontend is called with invalid parameters. v1 of the patch series got incorrect subject lines. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] ds3000: return meaningful return codesOlli Salonen2016-05-071-7/+7
| | | | | | | The ds3000 driver returned 1 as an error code in many places. Signed-off-by: Olli Salonen <olli.salonen@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] dvb: Get rid of typedev usage for enumsMauro Carvalho Chehab2015-06-091-6/+7
| | | | | | | | | | | | | | | | | The DVB API was originally defined using typedefs. This is against Kernel CodingStyle, and there's no good usage here. While we can't remove its usage on userspace, we can avoid its usage in Kernelspace. So, let's do it. This patch was generated by this shell script: for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done While here, make CodingStyle fixes on the affected lines. Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Acked-by: Stefan Richter <stefanr@s5r6.in-berlin.de> # for drivers/media/firewire/*
* [media] ds3000: fix LNB supply voltage on Tevii S480 on initializationUlrich Eckhardt2014-10-301-0/+7
| | | | | | | | | | | | | | | The Tevii S480 outputs 18V on startup for the LNB supply voltage and does not automatically power down. This blocks other receivers connected to a satellite channel router (EN50494), since the receivers can not send the required DiSEqC sequences when the Tevii card is connected to a the same SCR. This patch switches off the LNB supply voltage on initialization of the frontend. [mchehab@osg.samsung.com: add a comment about why we're explicitly turning off voltage at device init] Cc: stable@vger.kernel.org Signed-off-by: Ulrich Eckhardt <uli@uli-eckhardt.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
* [media] ds3000: fix reading array out of bound in ds3000_read_snrHeinrich Schuchardt2014-02-281-1/+1
| | | | | | | | | An attempt was made to read dvbs2_snr_tab[80], though dvbs2_snr_tab has only 80 elements. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Michael Krufky <mkrufky@linuxtv.org> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
* [media] ts2020: call get_rf_strength from frontendMalcolm Priestley2013-01-061-0/+10
| | | | | | | | | | | | Restore ds3000.c read_signal_strength. Call tuner get_rf_strength from frontend read_signal_strength. We are able to do a NULL check and doesn't limit the tuner attach to the frontend attach area. At the moment the lmedm04 tuner attach is stuck in frontend attach area. Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ds3000: lock led procedure addedIgor M. Liplianin2012-12-291-0/+12
| | | | | | | | TeVii s660 and others have LED for lock indication. Let's use it in right order. Signed-off-by: Igor M. Liplianin <liplianin@me.by> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ds3000: bail out early on i2c failures during firmware loadRémi Cardona2012-12-271-5/+7
| | | | | | | | | | | | - if kmalloc() returns NULL, we can return immediately without trying to kfree() a NULL pointer. - if i2c_transfer() fails, error out immediately instead of trying to upload the remaining bytes of the firmware. - the error code is then properly propagated down to ds3000_initfe(). Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] make the other drivers take use of the new ts2020 driverKonstantin Dimitrov2012-12-271-0/+1
| | | | | | | make the other drivers take use of the separate ts2020 driver Signed-off-by: Konstantin Dimitrov <kosio.dimitrov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ds3000: remove ts2020 tuner related codeKonstantin Dimitrov2012-12-271-219/+23Star
| | | | | | | | remove ts2020 tuner related code from ds3000 driver prepare ds3000 driver for using external tuner driver Signed-off-by: Konstantin Dimitrov <kosio.dimitrov@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ds3000: remove useless 'locking'Rémi Cardona2012-11-221-14/+0Star
| | | | | | | | | | | | | | | Since b9bf2eafaad9c1ef02fb3db38c74568be601a43a, the function ds3000_firmware_ondemand() is called only once during init. This locking scheme may have been useful when the firmware was loaded at each tune. Furthermore, it looks like this 'lock' was put in to prevent concurrent access (and not recursion as the comments suggest). However, this open- coded mechanism is anything but race-free and should have used a proper mutex. Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ds3000: Declare MODULE_FIRMWARE usageRémi Cardona2012-11-221-0/+1
| | | | | | Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] ds3000: add module parameter to force firmware uploadRémi Cardona2012-10-071-3/+9
| | | | | | | [mchehab@redhat.com: Fix a merge conflict] Signed-off-by: Rémi Cardona <remi.cardona@smartjog.com> Reviewed-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* [media] move the dvb/frontends to drivers/media/dvb-frontendsMauro Carvalho Chehab2012-08-141-0/+1312
Raise the DVB frontends one level up, as the intention is to remove the drivers/media/dvb directory. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>