Thanks to hotwings <user.vdr@gmail.com> for pointing out the bug
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Marko Ristola <marko.ristola@kolumbus.fi>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
* Demodulator status check made reliable
* Code simplification for Viterbi Sync check, makes
acquisition more reliable
* Implement a BER monitor
* Implement a Signal strength monitor
* Implement a "simple" UCB monitor, no real UCB monitor
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
You know, the worst endianness errors are not the cases where
people forget to byte-swap, but the cases where they either byte-swap
with the wrong size, or byte-swap when they shouldn't have done so at
all. Those ones defeat the casual reader of the code.
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Marko Ristola <marko.ristola@kolumbus.fi>
Signed-off-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Control of more than one AV/C device at once --- e.g. camcorders, tape
decks, audio devices, TV tuners --- failed or worked only unreliably,
depending on driver implementation. This affected kernelspace and
userspace drivers alike and was caused by firewire-core's inability to
accept multiple registrations of FCP listeners.
The fix allows multiple address handlers to be registered for the FCP
command and response registers. When a request for these registers is
received, all handlers are invoked, and the Firewire response is
generated by the core and not by any handler.
The cdev API does not change, i.e., userspace is still expected to send
a response for FCP requests; this response is silently ignored.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (changelog, rebased, whitespace)
Fix the cx23888 driver to use the new kfifo API. Using kfifo_reset()
may result in a possible race conditions. This patch fixes it by using
a spinlock around the kfifo_reset() function.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Reviewed-by: Andy Walls <awalls@radix.net>
Acked-by: Andy Walls <awalls@radix.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix the "ignoring return value of '...', declared with attribute
warn_unused_result" compiler warning in several users of the new kfifo
API.
It removes the __must_check attribute from kfifo_in() and
kfifo_in_locked() which must not necessary performed.
Fix the allocation bug in the nozomi driver file, by moving out the
kfifo_alloc from the interrupt handler into the probe function.
Fix the kfifo_out() and kfifo_out_locked() users to handle a unexpected
end of fifo.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
rename kfifo_put... into kfifo_in... to prevent miss use of old non in
kernel-tree drivers
ditto for kfifo_get... -> kfifo_out...
Improve the prototypes of kfifo_in and kfifo_out to make the kerneldoc
annotations more readable.
Add mini "howto porting to the new API" in kfifo.h
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Move the pointer to the spinlock out of struct kfifo. Most users in
tree do not actually use a spinlock, so the few exceptions now have to
call kfifo_{get,put}_locked, which takes an extra argument to a
spinlock.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This is a new generic kernel FIFO implementation.
The current kernel fifo API is not very widely used, because it has to
many constrains. Only 17 files in the current 2.6.31-rc5 used it.
FIFO's are like list's a very basic thing and a kfifo API which handles
the most use case would save a lot of development time and memory
resources.
I think this are the reasons why kfifo is not in use:
- The API is to simple, important functions are missing
- A fifo can be only allocated dynamically
- There is a requirement of a spinlock whether you need it or not
- There is no support for data records inside a fifo
So I decided to extend the kfifo in a more generic way without blowing up
the API to much. The new API has the following benefits:
- Generic usage: For kernel internal use and/or device driver.
- Provide an API for the most use case.
- Slim API: The whole API provides 25 functions.
- Linux style habit.
- DECLARE_KFIFO, DEFINE_KFIFO and INIT_KFIFO Macros
- Direct copy_to_user from the fifo and copy_from_user into the fifo.
- The kfifo itself is an in place member of the using data structure, this save an
indirection access and does not waste the kernel allocator.
- Lockless access: if only one reader and one writer is active on the fifo,
which is the common use case, no additional locking is necessary.
- Remove spinlock - give the user the freedom of choice what kind of locking to use if
one is required.
- Ability to handle records. Three type of records are supported:
- Variable length records between 0-255 bytes, with a record size
field of 1 bytes.
- Variable length records between 0-65535 bytes, with a record size
field of 2 bytes.
- Fixed size records, which no record size field.
- Preserve memory resource.
- Performance!
- Easy to use!
This patch:
Since most users want to have the kfifo as part of another object,
reorganize the code to allow including struct kfifo in another data
structure. This requires changing the kfifo_alloc and kfifo_init
prototypes so that we pass an existing kfifo pointer into them. This
patch changes the implementation and all existing users.
[akpm@linux-foundation.org: fix warning]
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Driver needs to #include <sched.h>:
drivers/media/radio/si470x/radio-si470x-common.c:452: error: 'TASK_INTERRUPTIBLE' undeclared (first use in this function)
drivers/media/radio/si470x/radio-si470x-common.c:452: error: implicit declaration of function 'signal_pending'
drivers/media/radio/si470x/radio-si470x-common.c:452: error: implicit declaration of function 'schedule'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Make the local filter coefficients static and const. This will eliminate the
following sparse warnings (see "make C=1"):
* au8522_decoder.c:71:31: warning: symbol 'filter_coef' was not declared. Should it be static?
* au8522_decoder.c:113:31: warning: symbol 'lpfilter_coef' was not declared. Should it be static?
Signed-off-by: Márton Németh <nm127@freemail.hu>
Acked-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
The gpio field in the cx231xx_board.input structure is a pointer. Eliminate the
following sparse warnings (see "make C=1"):
* cx231xx-cards.c:72:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:77:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:84:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:111:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:116:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:123:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:151:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:156:13: warning: Using plain integer as NULL pointer
* cx231xx-cards.c:163:13: warning: Using plain integer as NULL pointer
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
sizeof(print_buf) is just the size of the pointer. Change it to the size
used in the allocation of print_buf earlier in the same function.
A simplified version of the semantic patch that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression *x;
expression f;
type T;
@@
*f(...,(T)x,...)
// </smpl>
Cc: Janne Grunau <j@jannau.net>
Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Remove duplicated line on driver
[mchehab@redhat.com: second hunk of the original patch were already applied by another patch - remove it]
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Duncan Gibb <dg@duncangibb.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Make module_init static and mark it with __init.
Make module_exit static and mark it with __exit.
Mark probe functions with __devinit.
Make id table static and mark with __devinitconst.
This will eliminate the following sparse warnings (see "make C=1"):
* smsdvb.c:668:5: warning: symbol 'smsdvb_module_init' was not declared. Should it be static?
* smsdvb.c:682:6: warning: symbol 'smsdvb_module_exit' was not declared. Should it be static?
* smsusb.c:491:22: warning: symbol 'smsusb_id_table' was not declared. Should it be static?
* smsusb.c:567:5: warning: symbol 'smsusb_module_init' was not declared. Should it be static?
* smsusb.c:578:6: warning: symbol 'smsusb_module_exit' was not declared. Should it be static?
* smssdio.c:341:5: warning: symbol 'smssdio_module_init' was not declared. Should it be static?
* smssdio.c:353:6: warning: symbol 'smssdio_module_exit' was not declared. Should it be static?
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Eliminate the following sparse warnings (see "make C=1"):
* dib8000.c:125:15: warning: symbol 'coeff_2k_sb_1seg_dqpsk' was not declared. Should it be static?
* dib8000.c:130:15: warning: symbol 'coeff_2k_sb_1seg' was not declared. Should it be static?
* dib8000.c:134:15: warning: symbol 'coeff_2k_sb_3seg_0dqpsk_1dqpsk' was not declared. Should it be static?
* dib8000.c:139:15: warning: symbol 'coeff_2k_sb_3seg_0dqpsk' was not declared. Should it be static?
* dib8000.c:144:15: warning: symbol 'coeff_2k_sb_3seg_1dqpsk' was not declared. Should it be static?
* dib8000.c:149:15: warning: symbol 'coeff_2k_sb_3seg' was not declared. Should it be static?
* dib8000.c:154:15: warning: symbol 'coeff_4k_sb_1seg_dqpsk' was not declared. Should it be static?
* dib8000.c:159:15: warning: symbol 'coeff_4k_sb_1seg' was not declared. Should it be static?
* dib8000.c:164:15: warning: symbol 'coeff_4k_sb_3seg_0dqpsk_1dqpsk' was not declared. Should it be static?
* dib8000.c:169:15: warning: symbol 'coeff_4k_sb_3seg_0dqpsk' was not declared. Should it be static?
* dib8000.c:174:15: warning: symbol 'coeff_4k_sb_3seg_1dqpsk' was not declared. Should it be static?
* dib8000.c:179:15: warning: symbol 'coeff_4k_sb_3seg' was not declared. Should it be static?
* dib8000.c:184:15: warning: symbol 'coeff_8k_sb_1seg_dqpsk' was not declared. Should it be static?
* dib8000.c:189:15: warning: symbol 'coeff_8k_sb_1seg' was not declared. Should it be static?
* dib8000.c:194:15: warning: symbol 'coeff_8k_sb_3seg_0dqpsk_1dqpsk' was not declared. Should it be static?
* dib8000.c:199:15: warning: symbol 'coeff_8k_sb_3seg_0dqpsk' was not declared. Should it be static?
* dib8000.c:204:15: warning: symbol 'coeff_8k_sb_3seg_1dqpsk' was not declared. Should it be static?
* dib8000.c:209:15: warning: symbol 'coeff_8k_sb_3seg' was not declared. Should it be static?
* dib8000.c:214:15: warning: symbol 'ana_fe_coeff_3seg' was not declared. Should it be static?
* dib8000.c:218:15: warning: symbol 'ana_fe_coeff_1seg' was not declared. Should it be static?
* dib8000.c:222:15: warning: symbol 'ana_fe_coeff_13seg' was not declared. Should it be static?
Cc: Patrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
If val is a u64, then following:
val *= (u64)1 << 32;
val /= (u64)1 << 32;
should surely be better represented as:
val <<= 32;
val >>= 32;
Especially as, for the division, the compiler might want to actually do a
division:
drivers/built-in.o: In function `lgs8gxx_get_afc_phase':
drivers/media/dvb/frontends/lgs8gxx.c:250: undefined reference to `__udivdi3'
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Patch to support DvbWorld DW2104 device modifications
with STV0903 and DS3000 demods as well as TeVii S660 and Prof 1100
Also replace some magic numbers with meaningfull variables.
Signed-off-by: Igor M. Liplianin <liplianin@me.by>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Support DiSEqC envelope mode. Feature is enabled by setting
config->diseqc_envelope_mode = true (default: disabled).
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Support 22 kHz tone control for lnbp21 and lnbh24.
(Overrides the 'set_tone' hook of the frontend driver.)
Signed-off-by: Oliver Endriss <o.endriss@gmx.de>
Acked-by: Manu Abraham <manu@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>