Commit graph

171 commits

Author SHA1 Message Date
Julia Lawall 5ce005002c V4L/DVB: drivers/media: drop redundant memset
The region set by the call to memset is immediately overwritten by the
subsequent call to memcpy.

The semantic patch that makes this change is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e1,e2,e3,e4;
@@

- memset(e1,e2,e3);
  memcpy(e1,e4,e3);
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-05-18 00:46:51 -03:00
Tejun Heo 5a0e3ad6af include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files.  percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.

percpu.h -> slab.h dependency is about to be removed.  Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability.  As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.

  http://userweb.kernel.org/~tj/misc/slabh-sweep.py

The script does the followings.

* Scan files for gfp and slab usages and update includes such that
  only the necessary includes are there.  ie. if only gfp is used,
  gfp.h, if slab is used, slab.h.

* When the script inserts a new include, it looks at the include
  blocks and try to put the new include such that its order conforms
  to its surrounding.  It's put in the include block which contains
  core kernel includes, in the same order that the rest are ordered -
  alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
  doesn't seem to be any matching order.

* If the script can't find a place to put a new include (mostly
  because the file doesn't have fitting include block), it prints out
  an error message indicating which .h file needs to be added to the
  file.

The conversion was done in the following steps.

1. The initial automatic conversion of all .c files updated slightly
   over 4000 files, deleting around 700 includes and adding ~480 gfp.h
   and ~3000 slab.h inclusions.  The script emitted errors for ~400
   files.

2. Each error was manually checked.  Some didn't need the inclusion,
   some needed manual addition while adding it to implementation .h or
   embedding .c file was more appropriate for others.  This step added
   inclusions to around 150 files.

3. The script was run again and the output was compared to the edits
   from #2 to make sure no file was left behind.

4. Several build tests were done and a couple of problems were fixed.
   e.g. lib/decompress_*.c used malloc/free() wrappers around slab
   APIs requiring slab.h to be added manually.

5. The script was run on all .h files but without automatically
   editing them as sprinkling gfp.h and slab.h inclusions around .h
   files could easily lead to inclusion dependency hell.  Most gfp.h
   inclusion directives were ignored as stuff from gfp.h was usually
   wildly available and often used in preprocessor macros.  Each
   slab.h inclusion directive was examined and added manually as
   necessary.

6. percpu.h was updated not to include slab.h.

7. Build test were done on the following configurations and failures
   were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
   distributed build env didn't work with gcov compiles) and a few
   more options had to be turned off depending on archs to make things
   build (like ipr on powerpc/64 which failed due to missing writeq).

   * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
   * powerpc and powerpc64 SMP allmodconfig
   * sparc and sparc64 SMP allmodconfig
   * ia64 SMP allmodconfig
   * s390 SMP allmodconfig
   * alpha SMP allmodconfig
   * um on x86_64 SMP allmodconfig

8. percpu.h modifications were reverted so that it could be applied as
   a separate patch and serve as bisection point.

Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.

Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-30 22:02:32 +09:00
Klaas de Waal f0289efa19 V4L/DVB: dst: fixes for DVB-C Twinhan VP2031
Remove check  "state->dst_type == DST_DTYPE_IS_CABLE"  in function
dst_get_tuna (around line 1352) to select the correct checksum
computation

Fill in the .caps field in struct dst_dvbc_ops (around line 1824) with
all the supported QAM modulation methods to match the capabilities of
the card as implemented in function dst_set_modulation (around line
502). Note that beginning with linux kernel version 2.6.32 the
modulation method is checked (by function
dvb_frontend_check_parameters in file
drivers/media/dvb/dvb-core/dvb_frontend.c) and thus tuning fails if
you use a modulation method that is not present in the .caps field.

This patch has been tested on a Twinhan VP2031A DVB-C card with the
2.6.32.2 kernel.

Signed-off-by: Klaas de Waal <klaas.de.waal@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:57 -03:00
Jean Delvare 2abf6dd8e8 V4L/DVB: dvb/bt8xx: Clean-up init and exit functions
The init and exit functions are needlessly complex. Remove the bloat:
* Drop irrelevant/outdated comments.
* Remove useless bt878_pci_driver_registered global variable.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho chehab <mchehab@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:49 -03:00
Peter Huewe 310b26286e V4L/DVB (13947): add __init/__exit macros to drivers/media/dvb/bt8xx/bt878.c
Trivial patch which adds the __init/__exit macros to the module_init/
module_exit functions of

drivers/media/dvb/bt8xx/bt878.c

Please have a look at the small patch and either pull it through
your tree, or please ack' it so Jiri can pull it through the trivial
tree.

Patch against linux-next-tree, 22. Dez 08:38:18 CET 2009
but also present in linus tree.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2010-02-26 15:10:35 -03:00
Hans Verkuil 491aa96a8c V4L/DVB (13523): dvb-bt8xx: fix compile warning
Fix this compile warning:

v4l/dvb-bt8xx.c: In function 'cx24108_tuner_set_params':
v4l/dvb-bt8xx.c:221: warning: array subscript is above array bounds

Make sure that we never get past the last element in the array.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-12-05 18:42:15 -02:00
Julia Lawall 3227c860b6 V4L/DVB (12477): Use dst_type field instead of type_flags
It seems from other code that it is the dst_type field rather than the
type_flags field that contains values of the form DST_TYPE_IS...
The type_flags field contains values of the form DST_TYPE_HAS...

The semantic match that finds this problem is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@ struct dst_state E; @@

(
*E.type_flags ==
  \( DST_TYPE_IS_SAT\|DST_TYPE_IS_TERR\|DST_TYPE_IS_CABLE\|DST_TYPE_IS_ATSC \)
|
*E.type_flags !=
  \( DST_TYPE_IS_SAT\|DST_TYPE_IS_TERR\|DST_TYPE_IS_CABLE\|DST_TYPE_IS_ATSC \)
)
// </smpl>

Cc: Manu Abraham <abraham.manu@gmail.com>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-09-12 12:19:03 -03:00
Alexey Dobriyan 405f55712d headers: smp_lock.h redux
* Remove smp_lock.h from files which don't need it (including some headers!)
* Add smp_lock.h to files which do need it
* Make smp_lock.h include conditional in hardirq.h
  It's needed only for one kernel_locked() usage which is under CONFIG_PREEMPT

  This will make hardirq.h inclusion cheaper for every PREEMPT=n config
  (which includes allmodconfig/allyesconfig, BTW)

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-07-12 12:22:34 -07:00
Jean Delvare e36bc31f82 V4L/DVB (11992): Add missing __devexit_p()
Add missing __devexit_p() to several drivers. Also add a few missing
__init, __devinit and __exit markers. These errors could result in
build failures depending on the kernel configuration.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-06-16 19:07:51 -03:00
Hans Verkuil ce18c48593 V4L/DVB (11255): dst_ca: fix compile warning.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:44 -03:00
Stoyan Gaydarov 5ed2b6419e V4L/DVB (11235): changed ioctls to unlocked
Signed-off-by: Stoyan Gaydarov <stoyboyker@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:42 -03:00
Mauro Carvalho Chehab 1398ae1fe6 V4L/DVB (11127): Kconfig: replace all occurrences of CUSTOMIZE to CUSTOMISE
There are several Kconfig items using CUSTOMIZE. Yet, most use the English
writing CUSTOMISE. This generates lots of trouble, because people sometimes type
the Kbuild item different.

Let's standardise every occurrence using the same syntax.

The changes were generated by this small shell script:

for i in `find linux -type f`; do sed s,CUSTOMIZE,CUSTOMISE,g $i >/tmp/a && mv /tmp/a $i; done

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:31 -03:00
Hans Verkuil 74fc7bd9ce V4L/DVB (11046): bttv: convert to v4l2_device.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:43:23 -03:00
Jan Engelhardt 784e29d203 V4L/DVB (10391): dvb: constify VFTs
dvb: constify VFTs

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-30 12:42:34 -03:00
Matthias Schwarzzot a00d0bb86b V4L/DVB (10978): Report tuning algorith correctly
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2009-03-13 13:19:42 -03:00
Linus Torvalds 0191b625ca Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next-2.6: (1429 commits)
  net: Allow dependancies of FDDI & Tokenring to be modular.
  igb: Fix build warning when DCA is disabled.
  net: Fix warning fallout from recent NAPI interface changes.
  gro: Fix potential use after free
  sfc: If AN is enabled, always read speed/duplex from the AN advertising bits
  sfc: When disabling the NIC, close the device rather than unregistering it
  sfc: SFT9001: Add cable diagnostics
  sfc: Add support for multiple PHY self-tests
  sfc: Merge top-level functions for self-tests
  sfc: Clean up PHY mode management in loopback self-test
  sfc: Fix unreliable link detection in some loopback modes
  sfc: Generate unique names for per-NIC workqueues
  802.3ad: use standard ethhdr instead of ad_header
  802.3ad: generalize out mac address initializer
  802.3ad: initialize ports LACPDU from const initializer
  802.3ad: remove typedef around ad_system
  802.3ad: turn ports is_individual into a bool
  802.3ad: turn ports is_enabled into a bool
  802.3ad: make ntt bool
  ixgbe: Fix set_ringparam in ixgbe to use the same memory pools.
  ...

Fixed trivial IPv4/6 address printing conflicts in fs/cifs/connect.c due
to the conversion to %pI (in this networking merge) and the addition of
doing IPv6 addresses (from the earlier merge of CIFS).
2008-12-28 12:49:40 -08:00
Mauro Carvalho Chehab 8b21c1e90e V4L/DVB (9885): drivers/media Kconfig's: fix bugzilla #12204
When the tuner modules were moved to common/tuners, a separate customize
option were added for tuners. However, the automatic selection of the
tuners were still using the older option.

This causes that the automatic selection to fail, if DVB_FE_CUSTOMISE is
selected. Also, since those tuners are now under MEDIA_TUNER_CUSTOMIZE
menu, if you unset MEDIA_TUNER_CUSTOMIZE, you can't manually select the
tuners.

This patch fixes this error by replacing DVB_FE_CUSTOMISE by
MEDIA_TUNER_CUSTOMIZE on all places were a tuner is selected.

The patch were generated by this small script:

for i in `find drivers/media -name Kconfig`; do
  cat $i|perl -ne 's/(MEDIA_TUNER.*)DVB_FE_CUSTOMISE/\1MEDIA_TUNER_CUSTOMIZE/; print $_' >a
  mv a $i
done

Also, manually reordered the tuner entries.

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-12-16 16:43:59 -02:00
Johannes Berg 7c510e4b73 net: convert more to %pM
A number of places still use %02x:...:%02x because it's
in debug statements or for no real reason. Make a few
of them use %pM.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2008-10-27 17:47:26 -07:00
Bjorn Helgaas 29e66a6ce8 V4L/DVB: follow lspci device/vendor style
Use "[%04x:%04x]" for PCI vendor/device IDs to follow the format
used by lspci(8).

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-10-12 09:36:46 -02:00
Thierry MERLE c4e3fd940c V4L/DVB (8877): b2c2 and bt8xx: udelay to mdelay
b2c2-flexcop, dvb/bt8xx and video/bt8xx fails to build on ARM with:

__bad_udelay is specifically designed on ARM to fail when udelay is
called in a bad way.  arch/arm/include/asm/delay.h has this to say
about __bad_udelay:

/*
 * This function intentionally does not exist; if you see references to
 * it, it means that you're calling udelay() with an out of range value.
 *
 * With currently imposed limits, this means that we support a max delay
 * of 2000us. Further limits: HZ<=1000 and bogomips<=3355
 */
extern void __bad_udelay(void);

Solution is to replace udelay by a mdelay and udelay with value less than 2000

Signed-off-by: Thierry MERLE <thierry.merle@free.fr>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
2008-09-04 18:27:03 -03:00
Adrian Bunk 445c2714cf V4L/DVB (8534): remove select's of FW_LOADER
After commit d9b19199e4
(always enable FW_LOADER unless EMBEDDED=y) we can remove
the FW_LOADER select's and corresponding dependencies
on HOTPLUG.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-27 12:24:37 -03:00
Al Viro 3aa7110e1c V4L/DVB (8132): bt8xx endianness annotations and fixes
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-07-20 07:13:31 -03:00
Mauro Carvalho Chehab 755a18baad V4L/DVB (7851): Fix FW_LOADER depencency at v4l/dvb
Since:
1) FW_LOADER is defined as:

config FW_LOADER
        tristate "Userspace firmware loading support"
        depends on HOTPLUG

2) several V4L/DVB driver just selects it;

3) select is not smart enough to auto-select HOTPLUG, if select FW_LOADER.

So, All drivers that select FW_LOADER should also depend on HOTPLUG.

An easier solution (for the end-user perspective) would be to "select HOTPLUG".
However, live is not simple. This would cause recursive dependency issues like
this one:

drivers/usb/Kconfig:62:error: found recursive dependency: USB -> USB_OHCI_HCD
-> I2C -> MEDIA_TUNER -> MEDIA_TUNER_XC2028 -> HOTPLUG -> PCCARD -> PCMCIA ->
USB_ARCH_HAS_HCD -> MOUSE_APPLETOUCH -> USB

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-05-14 02:54:08 -03:00
Mauro Carvalho Chehab 149ef72dee Rename common tuner Kconfig names to use the same
namespace for all of them.
2008-04-29 18:41:38 -03:00
Mauro Carvalho Chehab 7c91f0624a V4L/DVB(7767): Move tuners to common/tuners
There were several issues in the past, caused by the hybrid tuner design, since
now, the same tuner can be used by drivers/media/dvb and drivers/media/video.

Kconfig items were rearranged, to split V4L/DVB core from their drivers.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-29 18:41:37 -03:00
Janne Grunau 78e92006f4 V4L/DVB (7538): Adds selectable adapter numbers as per module option
The adapter_nr module options can be used to allocate static adapter
numbers on a driver level. It avoids problems with changing DVB apapter
numbers after warm/cold boot or device unplugging and repluging.

Each driver holds DVB_MAX_ADAPTER long array of the preferred order of
adapter numbers.

options dvb-usb-dib0700 adapter_nr=7,6,5,4,3,2,1,0 would result in a
reversed allocation of adapter numbers.

With adapter_nr=2,5 it tries first to get adapter number 2 and 5. If
both are already in use it will allocate the lowest free adapter number.

Signed-off-by: Janne Grunau <janne-dvb@grunau.be>
Acked-by: Hermann Pitton <hermann.pitton@arcor.de>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:08:00 -03:00
Harvey Harrison b2e62e7cdb V4L/DVB (7510): media/dvb/bt8xx replace remaining __FUNCTION__ occurrences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:58 -03:00
Michael Krufky 2c4963d4fb V4L/DVB (7441): kconfig fixes for tuner-simple
Update Kconfig for the hybrid devices recently converted
to use tuner-simple rather than dvb-pll.

dvb-bt8xx no longer uses dvb-pll at all, so remove all
references to dvb-pll within that driver.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky a03402d8ad V4L/DVB (7440): dvb-bt8xx: fix build error
Fix the following build error:

In file included from dvb-bt8xx.c:35:
dvb-bt8xx.h:42:26: error: tuner-simple.h: No such file or directory
dvb-bt8xx.c: In function 'frontend_init':
dvb-bt8xx.c:612: error: 'simple_tuner_attach' undeclared (first use in this function)
dvb-bt8xx.c:612: error: (Each undeclared identifier is reported only once
dvb-bt8xx.c:612: error: for each function it appears in.)
dvb-bt8xx.c:612: warning: type defaults to 'int' in declaration of '__a'
dvb-bt8xx.c:612: warning: type defaults to 'int' in declaration of 'type name'
dvb-bt8xx.c:612: warning: cast from pointer to integer of different size
dvb-bt8xx.c:612: warning: type defaults to 'int' in declaration of 'type name'
dvb-bt8xx.c:612: warning: cast from pointer to integer of different size
dvb-bt8xx.c:612: error: called object '__a' is not a function
dvb-bt8xx.c:696: warning: type defaults to 'int' in declaration of '__a'
dvb-bt8xx.c:696: warning: type defaults to 'int' in declaration of 'type name'
dvb-bt8xx.c:696: warning: cast from pointer to integer of different size
dvb-bt8xx.c:696: warning: type defaults to 'int' in declaration of 'type name'
dvb-bt8xx.c:696: warning: cast from pointer to integer of different size
dvb-bt8xx.c:696: error: called object '__a' is not a function

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:55 -03:00
Michael Krufky 827855d397 V4L/DVB (7412): use tuner-simple for LG TDVS-H06xF digital tuning support
Convert cx88-dvb, dvb-bt8xx, b2c2-flexcop, cxusb and cx23885 to use
tuner-simple instead of dvb-pll for LG TDVS-H06xF

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Michael Krufky 967be9a9cd V4L/DVB (7411): use tuner-simple for Philips FCV1236D digital tuning support
Convert dvb-bt8xx to use tuner-simple instead of dvb-pll for Philips FCV1236D

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:53 -03:00
Harvey Harrison 1744a7770c V4L/DVB (7273): suppress compound statement warning in dvb-bt8xx.c
Prevailing kernel style seems to prefer always using braces
for do {} while ().

Add braces to dprintk to suppress the sparse warnings:
drivers/media/dvb/bt8xx/dvb-bt8xx.c:73:2: warning: do-while statement is not a compound statement
drivers/media/dvb/bt8xx/dvb-bt8xx.c:93:2: warning: do-while statement is not a compound statement
drivers/media/dvb/bt8xx/dvb-bt8xx.c:529:2: warning: do-while statement is not a compound statement
drivers/media/dvb/bt8xx/dvb-bt8xx.c:614:4: warning: do-while statement is not a compound statement
drivers/media/dvb/bt8xx/dvb-bt8xx.c:629:4: warning: do-while statement is not a compound statement
drivers/media/dvb/bt8xx/dvb-bt8xx.c:639:4: warning: do-while statement is not a compound statement
drivers/media/dvb/bt8xx/dvb-bt8xx.c:883:2: warning: do-while statement is not a compound statement
drivers/media/dvb/bt8xx/dvb-bt8xx.c:917:2: warning: do-while statement is not a compound statement

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-04-24 14:07:45 -03:00
Akinobu Mita 46c9fc861f V4L/DVB (7076): bt878: include KERN_ facility level
printk should use KERN_* levels.

CC: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-02-18 11:14:53 -03:00
Akinobu Mita 3869007812 V4L/DVB (7077): bt878: remove handcrafted PCI subsystem ID check
This patch moves the subsystem ID and subsystem vendor ID check from probing
function to the PCI generic function by describing subsystem IDs in
pci_device_id table. This enables to add new PCI IDs to a device driver pci_ids
table at runtime by new_id file in sysfs pci driver tree.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:05:22 -02:00
Adrian Bunk b00ef4b8d8 V4L/DVB (6569): bt8xx/dst.c: make code static
This patch makes the following needlessly global code static:
- dst_gpio_outb()
- dst_gpio_inb()
- rdc_8820_reset()
- dst_pio_enable()
- dst_command()
- struct tuner_list[]

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2008-01-25 19:02:03 -02:00
Robert P. J. Day 3a4fa0a25d Fix misspellings of "system", "controller", "interrupt" and "necessary".
Fix the various misspellings of "system", controller", "interrupt" and
"[un]necessary".

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Adrian Bunk <bunk@kernel.org>
2007-10-19 23:10:43 +02:00
Mauro Carvalho Chehab 9c12224a60 V4L/DVB (6079): Cleanup: remove linux/moduleparam.h from drivers/media files
Since at least kernel 2.6.12-rc2, module.h includes moduleparm.h. This
patch removes all occurences of moduleparm.h from drivers/media files.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:06:17 -03:00
Kumar Gala e9f668dd12 V4L/DVB (6010): Use inline functions instead of inline asm for powerpc
Change io_st_le32() to use inline functions rather than
direct inline assembly code.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:07 -03:00
Adrian Bunk fbd8af0706 V4L/DVB (6009): Bt8xx: "extern inline" -> "static inline"
"extern inline" will have different semantics with gcc 4.3.

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-10-09 22:05:05 -03:00
Mauro Carvalho Chehab 3ea9661538 V4L/DVB (5840): fix dst and cx24123: tune() callback changed signess for delay
tune() dvb_frontend callback changed delay signess:
        int (*tune)(struct dvb_frontend* fe,
                    struct dvb_frontend_parameters* params,
                    unsigned int mode_flags,
-                   int *delay,
+                   unsigned int *delay,

This change caused warnings on cx24123 and dst modules:

/home/v4l/master/v4l/cx24123.c:1034: warning: initialization from incompatible pointer type
/home/v4l/master/v4l/dst.c:1782: warning: initialization from incompatible pointer type
/home/v4l/master/v4l/dst.c:1808: warning: initialization from incompatible pointer type
/home/v4l/master/v4l/dst.c:1837: warning: initialization from incompatible pointer type
/home/v4l/master/v4l/dst.c:1860: warning: initialization from incompatible pointer type

This patch corrects the function prototype on both modules to follow the
core change.

Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:24:46 -03:00
Michael Krufky cd2cd0aad0 V4L/DVB (5799): Or51211: remove hardcoded fcv1236d tuner programming
- Remove hardcoded fcv1236d tuner programmming from or51211.c
- Alter dvb-bt8xx for the pcHDTV-2000 to use dvb-pll for fcv1236d support.
Thanks to Jarom Hatch <jshatch@gmail.com> for testing this change.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:24:24 -03:00
Michael Krufky 47a9991e80 V4L/DVB (5780): Dvb: Remove static dependencies on dvb-pll
This patch removes all static dependencies on the dvb-pll module.
All exported dvb_pll_desc's have been UNexported, and the caller
will reference the individual dvb_pll_desc by it's index in the
pll_list array.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Acked-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:24:16 -03:00
Trent Piepho f3a0d86f1d V4L/DVB (5745): Dvb: use '+=' instead of '=' for EXTRA_CFLAGS
The Makefiles in the dvb directory tree used '=' when defining EXTRA_CFLAGS
rather than '+=', which is far more common in the rest of the kernel source.
  =  14 times (9 of which this patch removes)
 :=  25 times
 += 123 times
This change also has certain advantages for the out of kernel v4l-dvb build
system.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-07-18 14:23:56 -03:00
Manu Abraham a6d7613226 V4L/DVB (5639a): Fix dst usage count
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-05-22 16:00:14 -03:00
Randy Dunlap e63340ae6b header cleaning: don't include smp_lock.h when not used
Remove includes of <linux/smp_lock.h> where it is not used/needed.
Suggested by Al Viro.

Builds cleanly on x86_64, i386, alpha, ia64, powerpc, sparc,
sparc64, and arm (all 59 defconfigs).

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08 11:15:07 -07:00
Akinobu Mita 66ab6e023e V4L/DVB (5513): Bt878: prevent probing wrong card entry
I got strange message when I did modprobe bt878:
bt878_probe: card id=[0x0],[ <NULL> ] has DVB functions.
The card_list array is terminated by sentinel entry.
But this list is traversed by:
for (i = 0, dvb_cards = card_list; i < ARRAY_SIZE(card_list);
     i++, dvb_cards++) {
...
}
in bt878_probe().
So this loop checks dummy sentinel entry, too.
This patch removes unnecessary sentinel entry.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:45:39 -03:00
Trent Piepho 6bdcc6e6db V4L/DVB (5363): Dvb: Remove lgh06xf driver
The code of the dvb-pll driver and the lgh06xf driver is nearly
identical.  The main difference is that the lgh06xf driver would set the
AGC TOP value on every tune call.  The dvb-pll driver now has the ability
to set the AGC TOP when the front-end device is opened, which is a better
way to go about it.  By using this ability of dvb-pll, the lgh06xf driver
is made unnecessary.

There is one other difference.  dvb-pll will probe for the presence of an
I2C pll chip by doing a one byte read, the lgh06xf driver did not do
this.  In some devices the PLL is not reachable over I2C at the timer the
tuner is attached.  Some more initialization, such as firmware loading,
must take place first.  None of the devices using a LG-H06xF should have
this problem.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Acked-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-04-27 15:44:05 -03:00
Ahmed S. Darwish 0496daa7d8 V4L/DVB (5202): DVB: Use ARRAY_SIZE macro when appropriate
Use ARRAY_SIZE macro already defined in kernel.h

Signed-off-by: Ahmed S. Darwish <darwish.07@gmail.com>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:35:18 -02:00
Michael Krufky 19790db00b V4L/DVB (5061): Bt8xx: add support for Ultraview DVB-T Lite
Ultraview DVB-T Lite is a clone of DViCO FusionHDTV DVB-T Lite

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-02-21 13:34:19 -02:00
Robert P. J. Day 5cbded585d [PATCH] getting rid of all casts of k[cmz]alloc() calls
Run this:

	#!/bin/sh
	for f in $(grep -Erl "\([^\)]*\) *k[cmz]alloc" *) ; do
	  echo "De-casting $f..."
	  perl -pi -e "s/ ?= ?\([^\)]*\) *(k[cmz]alloc) *\(/ = \1\(/" $f
	done

And then go through and reinstate those cases where code is casting pointers
to non-pointers.

And then drop a few hunks which conflicted with outstanding work.

Cc: Russell King <rmk@arm.linux.org.uk>, Ian Molton <spyro@f2s.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>
Cc: Roman Zippel <zippel@linux-m68k.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Kyle McMartin <kyle@mcmartin.ca>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Greg KH <greg@kroah.com>
Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: Paul Fulghum <paulkf@microgate.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Karsten Keil <kkeil@suse.de>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Ian Kent <raven@themaw.net>
Cc: Steven French <sfrench@us.ibm.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Neil Brown <neilb@cse.unsw.edu.au>
Cc: Jaroslav Kysela <perex@suse.cz>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-12-13 09:05:58 -08:00