]> Pileus Git - ~andy/linux/log
~andy/linux
14 years agoseq_file: use proc_create() in documentation
Alexey Dobriyan [Wed, 16 Dec 2009 00:47:00 +0000 (16:47 -0800)]
seq_file: use proc_create() in documentation

Using create_proc_entry() + ->proc_fops assignment is racy because
->proc_fops will be NULL for some time, use proc_create() to avoid race.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoproc: remove docbook and example
Alexey Dobriyan [Wed, 16 Dec 2009 00:46:59 +0000 (16:46 -0800)]
proc: remove docbook and example

Example is outdated, it still uses old ->read_proc interfaces and "fb"
example is plain racy.  There are better examples all over the tree.

Docbook itself says almost nothing about /proc and contain quite a number
of simply wrong facts, e.g.  device nodes support.  What it does is
describing at great length interface which are going to be removed.

There are Documentation/filesystems/seq_file.txt in exchange.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Erik Mouw <mouw@nl.linux.org>
Cc: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodoc: SubmitChecklist, add ioctls, remove OSDL reference
Randy Dunlap [Wed, 16 Dec 2009 00:46:59 +0000 (16:46 -0800)]
doc: SubmitChecklist, add ioctls, remove OSDL reference

If a patch adds ioctls, then Documentation/ioctl/ioctl-number.txt
should also be updated.

Remove reference to the OSDL PLM build farm.

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>
14 years agofatfs: use common time_to_tm in fat_time_unix2fat()
Zhaolei [Wed, 16 Dec 2009 00:46:57 +0000 (16:46 -0800)]
fatfs: use common time_to_tm in fat_time_unix2fat()

It is not necessary to write custom code for convert calendar time to
broken-down time.  time_to_tm() is more generic to do that.

Signed-off-by: Zhao Lei <zhaolei@cn.fujitsu.com>
Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agohpfs: use bitmap_weight()
Akinobu Mita [Wed, 16 Dec 2009 00:46:56 +0000 (16:46 -0800)]
hpfs: use bitmap_weight()

Use bitmap_weight instead of doing hweight32 for each 32bit in bitmap.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agohpfs: use hweight32
Akinobu Mita [Wed, 16 Dec 2009 00:46:55 +0000 (16:46 -0800)]
hpfs: use hweight32

Use hweight32 instead of counting for each bit

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoreiserfs: don't compile procfs.o at all if no support
Alexey Dobriyan [Wed, 16 Dec 2009 00:46:54 +0000 (16:46 -0800)]
reiserfs: don't compile procfs.o at all if no support

* small define cleanup in header
* fix #ifdeffery in procfs.c via Kconfig

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoreiserfs: remove /proc/fs/reiserfs/version
Alexey Dobriyan [Wed, 16 Dec 2009 00:46:52 +0000 (16:46 -0800)]
reiserfs: remove /proc/fs/reiserfs/version

/proc/fs/reiserfs/version is on the way of removing ->read_proc interface.
 It's empty however, so simply remove it instead of doing dummy
conversion.  It's hard to see what information userspace can extract from
empty file.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoufs: NFS support
Alexey Dobriyan [Wed, 16 Dec 2009 00:46:51 +0000 (16:46 -0800)]
ufs: NFS support

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoufs: pass qstr instead of dentry where necessary for NFS
Alexey Dobriyan [Wed, 16 Dec 2009 00:46:50 +0000 (16:46 -0800)]
ufs: pass qstr instead of dentry where necessary for NFS

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Evgeniy Dushistov <dushistov@mail.ru>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoext2: report metadata errors during fsync
Jan Kara [Wed, 16 Dec 2009 00:46:49 +0000 (16:46 -0800)]
ext2: report metadata errors during fsync

When an IO error happens while writing metadata buffers, we should better
report it and call ext2_error since the filesystem is probably no longer
consistent.  Sometimes such IO errors happen while flushing thread does
background writeback, the buffer gets later evicted from memory, and thus
the only trace of the error remains as AS_EIO bit set in blockdevice's
mapping.  So we check this bit in ext2_fsync and report the error although
we cannot be really sure which buffer we failed to write.

Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Chris Mason <chris.mason@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoext2: avoid WARN() messages when failing to write to the superblock
Theodore Ts'o [Wed, 16 Dec 2009 00:46:48 +0000 (16:46 -0800)]
ext2: avoid WARN() messages when failing to write to the superblock

This fixes a common warning reported by kerneloops.org

[Kernel summit hacking hour]
[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoconst: constify remaining pipe_buf_operations
Alexey Dobriyan [Wed, 16 Dec 2009 00:46:48 +0000 (16:46 -0800)]
const: constify remaining pipe_buf_operations

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agopnpbios: convert to seq_file
Alexey Dobriyan [Wed, 16 Dec 2009 00:46:47 +0000 (16:46 -0800)]
pnpbios: convert to seq_file

Convert code away from ->read_proc/->write_proc interfaces.  Switch to
proc_create()/proc_create_data() which make addition of proc entries
reliable wrt NULL ->proc_fops, NULL ->data and so on.

Problem with ->read_proc et al is described here commit
786d7e1612f0b0adb6046f19b906609e4fe8b1ba "Fix rmmod/read/write races in
/proc entries"

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Cc: Adam Belay <abelay@mit.edu>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoda850/omap-l138: add callback to control LCD panel power
Chaithrika U S [Wed, 16 Dec 2009 00:46:46 +0000 (16:46 -0800)]
da850/omap-l138: add callback to control LCD panel power

Add the platform specific callback to control LCD panel and backlight
power.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agointelfb: fix setting of active pipe with LVDS displays
Krzysztof Helt [Wed, 16 Dec 2009 00:46:45 +0000 (16:46 -0800)]
intelfb: fix setting of active pipe with LVDS displays

The intelfb driver sets color map depending on currently active pipe.
However, if an LVDS display is attached (like in laptop) the active pipe
variable is never set.  The default value is PIPE_A and can be wrong.  Set
up the pipe variable during driver initialization after hardware state was
read.

Also, the detection of the active display (and hence the pipe) is wrong.
The pipes are assigned to so called planes.  Both pipes are always enabled
on my laptop but only one plane is enabled (the plane A for the CRT or the
plane B for the LVDS).  Change active pipe detection code to take into
account a status of the plane assigned to each pipe.

The problem is visible in the 8 bpp mode if colors above 15 are used.  The
first 16 color entries are displayed correctly.

The graphics chip description is here (G45 vol. 3):
http://intellinuxgraphics.org/documentation.html

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=13285

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: Michal Suchanek <hramrach@centrum.cz>
Cc: Dean Menezes <samanddeanus@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoviafb: cosmetic cleanup of function integrated_lvds_enable()
Harald Welte [Wed, 16 Dec 2009 00:46:44 +0000 (16:46 -0800)]
viafb: cosmetic cleanup of function integrated_lvds_enable()

A humble attempt to simplify the coding style to improve readability

Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoviafb: documentation update
Harald Welte [Wed, 16 Dec 2009 00:46:42 +0000 (16:46 -0800)]
viafb: documentation update

We now support the VX855, and the VX800 is no longer unaccellerated.
viafb_video_dev was removed as it was useless.

Signed-off-by: Harald Welte <HaraldWelte@viatech.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomatroxfb: fix problems with display stability
Alan Cox [Wed, 16 Dec 2009 00:46:40 +0000 (16:46 -0800)]
matroxfb: fix problems with display stability

Regression caused in 2.6.23 and then despite repeated requests never fixed
or dealt with (Petr promised to sort it in 2008 but seems to have
forgotten).

Enough is enough - remove the problem line that was added.  If it upsets
someone they've had two years to deal with it and at the very least it'll
rattle their cage and wake them up.

Addresses http://bugzilla.kernel.org/show_bug.cgi?id=9709

Signed-off-by: Alan Cox <alan@linux.intel.com>
Reported-by: Damon <account@bugzilla.kernel.org.juxtaposition.net>
Tested-by: Ruud van Melick <rvm1974@raketnet.nl>
Cc: Petr Vandrovec <VANDROVE@vc.cvut.cz>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Paul A. Clarke <pc@us.ibm.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodavinci: fb: add framebuffer blank operation
Chaithrika U S [Wed, 16 Dec 2009 00:46:39 +0000 (16:46 -0800)]
davinci: fb: add framebuffer blank operation

Implement frame buffer blank operation feature for DA8xx/OMAP-L1xx driver.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodavinci: fb : add suspend/resume suuport for DA8xx/OMAP-L1xx fb driver
Chaithrika U S [Wed, 16 Dec 2009 00:46:39 +0000 (16:46 -0800)]
davinci: fb : add suspend/resume suuport for DA8xx/OMAP-L1xx fb driver

Suspend/resume support DA8xx/OMAP-L1xx frame buffer driver.  This feature
has been tested on DA850/OMAP-L138 EVM.  For the purpose of testing, the
patch series[1] which adds suspend support for DA850/OMAP-L138 SoC was
applied.

[1] http://patchwork.kernel.org/patch/60260/

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodavinci: fb: update the driver in preparation for addition of power management features
Chaithrika U S [Wed, 16 Dec 2009 00:46:38 +0000 (16:46 -0800)]
davinci: fb: update the driver in preparation for addition of power management features

Add a helper function to enable raster.  Also add one member in the
private data structure to track the current blank status, another function
pointer which takes in the platform specific callback function to control
panel power.

These updates will help in adding suspend/resume and frame buffer blank
operation features.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoclps711xfb: convert to proc_fops
Alexey Dobriyan [Wed, 16 Dec 2009 00:46:37 +0000 (16:46 -0800)]
clps711xfb: convert to proc_fops

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodrivers/video/via/viafbdev.c: fix oops with no /proc
Dan Carpenter [Wed, 16 Dec 2009 00:46:36 +0000 (16:46 -0800)]
drivers/video/via/viafbdev.c: fix oops with no /proc

Fixed a typo: missing *.  This would lead to a kernel oops if the kernel
was compiled without support for the /proc file system.

Found with a static checker.  Compile tested.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Cc: Joseph Chan <JosephChan@via.com.tw>
Cc: Scott Fang <ScottFang@viatech.com.cn>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosm501: implement acceleration features
Vincent Sanders [Wed, 16 Dec 2009 00:46:35 +0000 (16:46 -0800)]
sm501: implement acceleration features

This patch provides the acceleration entry points for the SM501
framebuffer driver.

This patch provides the sync, copyarea and fillrect entry points, using
the SM501's 2D acceleration engine to perform the operations in-chip
rather than across the bus.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Signed-off-by: Vincent Sanders <vince@simtec.co.uk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosm501: fix use of old <asm/io.h> instead of <linux/io.h>
Ben Dooks [Wed, 16 Dec 2009 00:46:34 +0000 (16:46 -0800)]
sm501: fix use of old <asm/io.h> instead of <linux/io.h>

Fix the old style use of <asm/io.h> by replacing it with <linux/io.h>.

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Cc: Vincent Sanders <vince@simtec.co.uk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agosm501: fix missing uses of resource_size()
Ben Dooks [Wed, 16 Dec 2009 00:46:33 +0000 (16:46 -0800)]
sm501: fix missing uses of resource_size()

There are several places in the SM501 fb driver that could do with using
resource_size() to calculate the size of a resource.

Also fix a bug where request_mem_region() is being passed one too few
bytes when requesting the register memory region, which was causing the
following in /proc/iomem:

 13e80000-13e8ffff : sm501-fb.0
   13e80000-13e8fffe : sm501-fb

fixed, this reads:

 13e80000-13e8ffff : sm501-fb.0
   13e80000-13e8ffff : sm501-fb

Signed-off-by: Ben Dooks <ben@simtec.co.uk>
Signed-off-by: Simtec Linux Team <linux@simtec.co.uk>
Cc: Vincent Sanders <vince@simtec.co.uk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoi810fb: fix stack exploding
Krzysztof Helt [Wed, 16 Dec 2009 00:46:32 +0000 (16:46 -0800)]
i810fb: fix stack exploding

Alan Cox has found that the i810fb function "uses a whopping 2.5K of stack".

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Reported-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agolxfb: add copyright/license info
Andres Salomon [Wed, 16 Dec 2009 00:46:31 +0000 (16:46 -0800)]
lxfb: add copyright/license info

The GRUB folks requested copyright/license info for lxfb.h, so here it is.

Signed-off-by: Andres Salomon <dilinger@collabora.co.uk>
Cc: Jordan Crouse <jordan@cosmicpenguin.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodavinci: fb: add cpufreq support
Chaithrika U S [Wed, 16 Dec 2009 00:46:29 +0000 (16:46 -0800)]
davinci: fb: add cpufreq support

Add cpufreq support for DA8xx/OMAP-L1xx frame buffer driver

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Dave Jones <davej@codemonkey.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodavinci: fb: calculate the clock divider from pixel clock info
Chaithrika U S [Wed, 16 Dec 2009 00:46:29 +0000 (16:46 -0800)]
davinci: fb: calculate the clock divider from pixel clock info

The clock divider value can be calculated from the pixel clock value for
the panel.  This gives more flexiblity to the driver to change the divider
value on the fly as in the case of cpufreq feature- support for which will
be added shortly.

Signed-off-by: Chaithrika U S <chaithrika@ti.com>
Cc: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Cc: Steve Chen <schen@mvista.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agomb862xxfb: add acceleration support for Coral-P/Coral-PA. * imageblt * copyarea ...
Valentin Sitdikov [Wed, 16 Dec 2009 00:46:28 +0000 (16:46 -0800)]
mb862xxfb: add acceleration support for Coral-P/Coral-PA. * imageblt * copyarea * fillrect

[akpm@linux-foundation.org: clean up comments, remove do-nothing tests, use min()]
[akpm@linux-foundation.org: fix Alexandr's email address]
[akpm@linux-foundation.org: export mb862xxfb_init_accel]
Signed-off-by: Valentin Sitdikov <valentin.sitdikov@siemens.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Anatolij Gustschin <agust@denx.de>
Signed-off-by: Alexander Shishkin <virtuoso@slind.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agodrivers/video: Move dereference after NULL test
Julia Lawall [Wed, 16 Dec 2009 00:46:26 +0000 (16:46 -0800)]
drivers/video: Move dereference after NULL test

If the NULL test on fbi is needed, then the dereference should be after the
NULL test.

A simplified version of the semantic match that detects this problem is as
follows (http://coccinelle.lip6.fr/):

// <smpl>
@match exists@
expression x, E;
identifier fld;
@@

* x->fld
  ... when != \(x = E\|&x\)
* x == NULL
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Cc: Eric Miao <eric.y.miao@gmail.com>
Cc: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofbdev: add palette register check to several drivers
Krzysztof Helt [Wed, 16 Dec 2009 00:46:25 +0000 (16:46 -0800)]
fbdev: add palette register check to several drivers

Add check if palette register number is in correct range for few drivers
which miss it.  The regno value comes indirectly from user space.

Two drivers has converted check from BUG_ON() macro to just return an
error (non-zero value).

Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofbdev: drop custom atoi from drivers/video/modedb.c
Andy Shevchenko [Wed, 16 Dec 2009 00:46:24 +0000 (16:46 -0800)]
fbdev: drop custom atoi from drivers/video/modedb.c

Kernel has simple_strtol() implementation which could be used as atoi().

Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofbdev: TV_PALN bit set twice in sisfb_detect_VB_connect()
Roel Kluin [Wed, 16 Dec 2009 00:46:23 +0000 (16:46 -0800)]
fbdev: TV_PALN bit set twice in sisfb_detect_VB_connect()

The TV_PALN bit was tested twice, replace one by TV_PALM.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Thomas Winischhofer <thomas@winischhofer.net>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofbdev: bfin-t350mcqb-fb: fix LCD dimensions
Michael Hennerich [Wed, 16 Dec 2009 00:46:22 +0000 (16:46 -0800)]
fbdev: bfin-t350mcqb-fb: fix LCD dimensions

The height/width framebuffer members need to be set in millimeters so that
software can do proper scaling.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofbdev: bfin-t350mcqb-fb: handle all resources in suspend/resume
Michael Hennerich [Wed, 16 Dec 2009 00:46:21 +0000 (16:46 -0800)]
fbdev: bfin-t350mcqb-fb: handle all resources in suspend/resume

The LCD commands DMA/timers as well as PPI which we need to save/restore.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driver
Michael Hennerich [Wed, 16 Dec 2009 00:46:21 +0000 (16:46 -0800)]
fbdev: bfin-lq035q1-fb: new Blackfin Landscape LCD EZ-Extender driver

Framebuffer driver for the Landscape LCD EZ-Extender (ADZS-BFLLCD-EZEXT)
http://docs.blackfin.uclinux.org/doku.php?id=hw:cards:landscape_lcd_ez-extender

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agogpiolib: add support for changing value polarity in sysfs
Jani Nikula [Wed, 16 Dec 2009 00:46:20 +0000 (16:46 -0800)]
gpiolib: add support for changing value polarity in sysfs

Drivers may use gpiolib sysfs as part of their public user space
interface. The GPIO number and polarity might change from board to
board. The gpio_export_link() call can be used to hide the GPIO number
from user space. Add support for also hiding the GPIO line polarity
changes from user space.

Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agogpio: add GPIO driver for the Timberdale FPGA
Richard Röjfors [Wed, 16 Dec 2009 00:46:18 +0000 (16:46 -0800)]
gpio: add GPIO driver for the Timberdale FPGA

A GPIO driver for the Timberdale FPGA found on the Intel Atom board
Russellville.

The GPIO driver also has an IRQ-chip to support interrupts on the pins.

Signed-off-by: Richard Röjfors <richard.rojfors@mocean-labs.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agogpio: fix test on unsigned in lnw_irq_type()
Roel Kluin [Wed, 16 Dec 2009 00:46:18 +0000 (16:46 -0800)]
gpio: fix test on unsigned in lnw_irq_type()

The wrong test was used, gpio is unsigned and it had an off-by-one.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Cc: Alek Du <alek.du@intel.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoARM: NUC900: add RTC driver support for nuc910 and nuc920
Wan ZongShun [Wed, 16 Dec 2009 00:46:17 +0000 (16:46 -0800)]
ARM: NUC900: add RTC driver support for nuc910 and nuc920

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Hu Ruihuan <specter118@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: "jack wang" <jack_wang@usish.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc-x1205: unconditionally set date when setting clock
Johannes Weiner [Wed, 16 Dec 2009 00:46:16 +0000 (16:46 -0800)]
rtc-x1205: unconditionally set date when setting clock

All callsites of x1205_set_datetime() want the date to be set as well, so
remove the flag parameter and set it unconditionally.

Signed-off-by: Johannes Weiner <jw@emlix.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc-vr41xx: use resource_size()
Yoichi Yuasa [Wed, 16 Dec 2009 00:46:15 +0000 (16:46 -0800)]
rtc-vr41xx: use resource_size()

Signed-off-by: Yoichi Yuasa <yuasa@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: ds1307 make it possible to share an irq
Dmitry Eremin-Solenikov [Wed, 16 Dec 2009 00:46:14 +0000 (16:46 -0800)]
rtc: ds1307 make it possible to share an irq

It's possible to have RTC irq shared with other device (e.g.
mpc8349e-mitx board shares ds1339 irq with phy one).  Handle this in
driver.

Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: remove __raw_* accessors from PL031 RTC
Linus Walleij [Wed, 16 Dec 2009 00:46:13 +0000 (16:46 -0800)]
rtc: remove __raw_* accessors from PL031 RTC

This switches __raw_[read|write]l() for plain [read|write]l in the PL031
RTC driver.  The sister driver for PL030 use the simple accessors as most
PrimeCell drivers.

Signed-off-by: Linus Walleij <linus.walleij@stericsson.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: add driver for BQ32000 I2C RTC
Piotr Ziecik [Wed, 16 Dec 2009 00:46:12 +0000 (16:46 -0800)]
rtc: add driver for BQ32000 I2C RTC

This patch adds basic support for Texas Instruments BQ32000 I2C RTC.  Only
time reading/writing is implemented.  Advanced features, such as trickle
charger and crystal calibration are not supported.

Signed-off-by: Piotr Ziecik <kosmo@semihalf.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: make rtc-omap driver ioremap its register space
Mark A. Greer [Wed, 16 Dec 2009 00:46:11 +0000 (16:46 -0800)]
rtc: make rtc-omap driver ioremap its register space

The rtc-omap driver currently assumes that the rtc's registers are at a
fixed address and already mapped into virtual memory space.  Remove those
assumptions so the same driver can be used for similar devices that reside
at different physical addresses (e.g., TI's DA8xx/OMAP-L13x SoC's).

Also allow the possibility for the timer and alarm interrupts to use the
same IRQ.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: Kevin Hilman <khilman@deeprootsystems.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: add Freescale MC13783 RTC driver
Uwe Kleine-König [Wed, 16 Dec 2009 00:46:09 +0000 (16:46 -0800)]
rtc: add Freescale MC13783 RTC driver

This driver provides support for the RTC part integrated into the
Freescale MC13783 PMIC and bases on patch created earlier by Sascha
Hauer.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Valentin Longchamp <valentin.longchamp@epfl.ch>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: convert WM8350 RTC driver to dev_pm_ops
Mark Brown [Wed, 16 Dec 2009 00:46:09 +0000 (16:46 -0800)]
rtc: convert WM8350 RTC driver to dev_pm_ops

Convert WM8350 RTC driver to dev_pm_ops

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc-mv: add support for Alarm
Saeed Bishara [Wed, 16 Dec 2009 00:46:08 +0000 (16:46 -0800)]
rtc-mv: add support for Alarm

This patch adds the Alarm support, this mode enabled when adding
IORESOURCE_IRQ to the platform device resources.

The patch also enables the wakeup mode, so the wakealarm sysfs file (under
/sys/class/rtc/rtcX/) can be used to configure the alarm clock.

Signed-off-by: Saeed Bishara <saeed@marvell.com>
Signed-off-by: Nicolas Pitre <nico@marvell.com>
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: pcf50633: manage RTC alarm "pending" flag
Werner Almesberger [Wed, 16 Dec 2009 00:46:07 +0000 (16:46 -0800)]
rtc: pcf50633: manage RTC alarm "pending" flag

Add setting and clearing of the "pending" flag of the RTC alarm.  The
semantics follow the UEFI specification 2.2 available at
http://www.uefi.org/specs/, i.e., the "pending" flag is cleared by
disabling the alarm, but not by any other condition (such as the passing
of time, a successful wakeup, or setting of a new alarm.)

Signed-off-by: Werner Almesberger <werner@openmoko.org>
Signed-off-by: Paul Fertser <fercerpav@gmail.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Paul Gortmaker <p_gortmaker@yahoo.com>
Cc: Balaji Rao <balajirrao@openmoko.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoefirtc: explicitly set llseek to no_llseek
John Kacur [Wed, 16 Dec 2009 00:46:06 +0000 (16:46 -0800)]
efirtc: explicitly set llseek to no_llseek

Now that we've removed the BKL here, let's explicitly set llseek to
no_llseek since the default llseek is not used here.

The default_llseek function still contains the BKL.  When we are auditing
code to see if we can remove the BKL, this is one of the hidden
considerations we need to take into account.  i.e., is there
syncronization between code that has the BKL and llseek.

At the same time we remove the BKL it would be a good idea to do indicate
when no llseek function is required, so we don't have to revisit this code
again, when we are trying to determine if we can remove the BKL from the
default_llseek.

Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: do not use container_of macro as an argument for to_platform_device
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:04 +0000 (16:46 -0800)]
rtc: do not use container_of macro as an argument for to_platform_device

The to_platform_device macro itself uses container_of macro.  Nested use
of container_of macro causes following sparse warnings:

rtc-ds1553.c:259:3: warning: symbol '__mptr' shadows an earlier one
rtc-ds1553.c:259:3: originally declared here

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alessandro Zummo <alessandro.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Andrew Sharp <andy.sharp@lsi.com>
Cc: Thomas Hommel <thomas.hommel@gefanuc.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc-stk17ta8: fix races around device registration
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:04 +0000 (16:46 -0800)]
rtc-stk17ta8: fix races around device registration

- Call dev_set_drvdata before rtc device creation.

- Use its own spinlock instead of rtc->irq_lock.  Because pdata->rtc
  must be initialized to use the irq_lock (pdata->rtc->irq_lock).  There
  is a small window which rtc methods can be called before pdata->rtc is
  initialized.

  And there is no need use the irq_lock to protect hardware registers.
  The driver's own spinlock shoule be enough.

- Check pdata->rtc before calling rtc_update_irq.

- Use alarm_irq_enable and remove ioctl routine.

- Use devres APIs and simplify error/remove path.

These fixes are ported from ds1553 driver and just compile-tested only.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alessandro Zummo <alessandro.zummo@towertech.it>
Cc: Thomas Hommel <thomas.hommel@gefanuc.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc-ds1742: fix races around device registration
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:02 +0000 (16:46 -0800)]
rtc-ds1742: fix races around device registration

* Call dev_set_drvdata before rtc device creation
* Use devres APIs and simplify error/remove path

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc-ds1553: fix races around device registration
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:01 +0000 (16:46 -0800)]
rtc-ds1553: fix races around device registration

* Call dev_set_drvdata before rtc device creation
* Use its own spinlock instead of rtc->irq_lock
* Check pdata->rtc before calling rtc_update_irq
* Use {alarm,update}_irq_enable and remove ioctl routine
* Use devres APIs and simplify error/remove path

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc-tx4939: fix races around device registration
Atsushi Nemoto [Wed, 16 Dec 2009 00:46:00 +0000 (16:46 -0800)]
rtc-tx4939: fix races around device registration

* Use its own spinlock instead of rtc->irq_lock
* Check pdata->rtc before calling rtc_update_irq
* Disable interrupt after rtc_device_unregister

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc-ds1511: fix races around device registration
Atsushi Nemoto [Wed, 16 Dec 2009 00:45:58 +0000 (16:45 -0800)]
rtc-ds1511: fix races around device registration

- Call dev_set_drvdata before rtc device creation.

- Use its own spinlock instead of rtc->irq_lock.  Because pdata->rtc
  must be initialized to use the irq_lock (pdata->rtc->irq_lock).  There
  is a small window which rtc methods can be called before pdata->rtc is
  initialized.

  And there is no need use the irq_lock to protect hardware registers.
  The driver's own spinlock shoule be enough.

- Check pdata->rtc before calling rtc_update_irq.

- Use {alarm,update}_irq_enable and remove ioctl routine.

- Use devres APIs and simplify error/remove path.

These fixes are ported from ds1553 driver and just compile-tested only.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Andrew Sharp <andy.sharp@lsi.com>
Cc: Thomas Hommel <thomas.hommel@gefanuc.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc-cmos: convert RTC_AIE/RTC_UIE to rtc irq API
Herton Ronaldo Krzesinski [Wed, 16 Dec 2009 00:45:56 +0000 (16:45 -0800)]
rtc-cmos: convert RTC_AIE/RTC_UIE to rtc irq API

Drop ioctl function that handles RTC_AIE/RTC_UIE, and use instead the
rtc subsystem API (alarm_irq_enable/update_irq_enable callbacks).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: fix driver data issues in several rtc drivers
Alessandro Zummo [Wed, 16 Dec 2009 00:45:53 +0000 (16:45 -0800)]
rtc: fix driver data issues in several rtc drivers

Herton Ronaldo Krzesinski recently raised up, and fixed, an issue with the
rtc_cmos driver, which was referring to an inconsistent driver data.

This patch ensures that driver data registration happens before
rtc_device_register().

Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Thomas Hommel <thomas.hommel@gefanuc.com>
Acked-by: Hans-Christian Egtvedt <hcegtvedt@atmel.com>
Acked-by: Paul Mundt <lethal@linux-sh.org>
Cc: David S. Miller <davem@davemloft.net>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Andrew Sharp <andy.sharp@onstor.com>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Alexander Bigga <ab@mycable.de>
Cc: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Cc: Mark Zhan <rongkai.zhan@windriver.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agortc: disable hpet emulation on suspend
Maxim Levitsky [Wed, 16 Dec 2009 00:45:52 +0000 (16:45 -0800)]
rtc: disable hpet emulation on suspend

I noticed that rtc wont generate interrupts after a resume from disk.
Here hpet rtc emulation is used.

Problem is that rtc hpet comparator, isn't reinitialized after resume.
Easiest way to solve this, is always mask all hpet interrupts on suspend
This is triggered, when suspending with alarm set.

Otherwise, hpet driver will think it doesn't need to reinitialize
the rtc comparator, thus rtc interrupts won't work.

This emulation isn't need for wakealarm.

Signed-off-by: Maxim Levitsky <maximlevitsky@gmail.com>
Cc: David Brownell <david-b@pacbell.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: always use lookup for lookup
Ian Kent [Wed, 16 Dec 2009 00:45:51 +0000 (16:45 -0800)]
autofs4: always use lookup for lookup

We need to be able to cope with the directory mutex being held during
->d_revalidate() in some cases, but not all cases, and not necessarily by
us.  Because we need to release the mutex when we call back to the daemon
to do perform a mount we must be sure that it is us who holds the mutex so
we must redirect mount requests to ->lookup() if the mutex is held.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: rename dentry to expiring in autofs4_lookup_expiring()
Ian Kent [Wed, 16 Dec 2009 00:45:50 +0000 (16:45 -0800)]
autofs4: rename dentry to expiring in autofs4_lookup_expiring()

In autofs4_lookup_expiring() a declaration within the list traversal loop
uses a declaration that has the same name as the function parameter.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: rename dentry to active in autofs4_lookup_active()
Ian Kent [Wed, 16 Dec 2009 00:45:49 +0000 (16:45 -0800)]
autofs4: rename dentry to active in autofs4_lookup_active()

In autofs4_lookup_active() a declaration within the list traversal loop
uses a declaration that has the same name as the function parameter.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: eliminate d_unhashed in path walk checks
Ian Kent [Wed, 16 Dec 2009 00:45:48 +0000 (16:45 -0800)]
autofs4: eliminate d_unhashed in path walk checks

We unhash the dentry (in a subsequent patch) in ->d_revalidate() in order
to send mount requests to ->lookup().  But then we can not rely on
d_unhased() to give reliable results because it may be called at any time
by any code path.  The d_unhashed() function is used by __simple_empty()
in the path walking callbacks but autofs mount point dentrys should have
no directories at all so a list_empty() on d_subdirs should be (and is)
sufficient.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: cleanup active and expire lookup
Ian Kent [Wed, 16 Dec 2009 00:45:47 +0000 (16:45 -0800)]
autofs4: cleanup active and expire lookup

The lookup functions for active and expiring dentrys use parameters that
can be easily obtained on entry so we change the call to to take just the
dentry.  This makes the subsequent change, to send all lookups to
->lookup(), a bit cleaner.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: renamer unhashed to active in autofs4_lookup()
Ian Kent [Wed, 16 Dec 2009 00:45:46 +0000 (16:45 -0800)]
autofs4: renamer unhashed to active in autofs4_lookup()

Rename the variable unhashed to active in autofs4_lookup() to better
reflect its usage.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: use autofs_info for pending flag
Ian Kent [Wed, 16 Dec 2009 00:45:45 +0000 (16:45 -0800)]
autofs4: use autofs_info for pending flag

Eliminate the use of the d_lock spin lock by using the autofs super block
info spin lock.  This reduces the number of spin locks we use by one and
makes the code for the following patch (to redirect ->d_revalidate() to
->lookup()) a little simpler.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: use helper function for need mount check
Ian Kent [Wed, 16 Dec 2009 00:45:44 +0000 (16:45 -0800)]
autofs4: use helper function for need mount check

Define simple helper function for checking if we need to trigger a mount.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: use helper functions for expiring list
Ian Kent [Wed, 16 Dec 2009 00:45:43 +0000 (16:45 -0800)]
autofs4: use helper functions for expiring list

Define some simple helper functions for adding and deleting entries on the
expiring dentry list.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoautofs4: use helper functions for active list handling
Ian Kent [Wed, 16 Dec 2009 00:45:42 +0000 (16:45 -0800)]
autofs4: use helper functions for active list handling

Define some simple helper functions for adding and deleting entries on the
active (and unhashed) dentry list.

Signed-off-by: Ian Kent <raven@themaw.net>
Cc: Sage Weil <sage@newdream.net>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: Andreas Dilger <adilger@sun.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Yehuda Saheh <yehuda@newdream.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agovt: make the default cursor shape configurable
Clemens Ladisch [Wed, 16 Dec 2009 00:45:39 +0000 (16:45 -0800)]
vt: make the default cursor shape configurable

For embedded systems, the blinking cursor at startup time can be annoying
and unintended.  Add a new kernel parameter to change the default cursor
shape.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Cc: Daniel Mack <daniel@caiaq.de>
Acked-by: Pavel Machek <pavel@ucw.cz>
Cc: David Newall <davidn@davidnewall.com>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoproc: rename de_get() to pde_get() and inline it
Alexey Dobriyan [Wed, 16 Dec 2009 00:45:39 +0000 (16:45 -0800)]
proc: rename de_get() to pde_get() and inline it

* de_get() is trivial -- make inline, save a few bits of code, drop
  "refcount is 0" check -- it should be done in some generic refcount
  code, don't recall it's was helpful

* rename GET and PUT functions to pde_get(), pde_put() for cool prefix!

* remove obvious and incorrent comments

* in remove_proc_entry() use pde_put(), when I fixed PDE refcounting to
  be normal one, remove_proc_entry() was supposed to do "-1" and code now
  reflects that.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agotimecompare: fix half-Y2K38 problem in timecompare_update while calculating offset
Barry Song [Wed, 16 Dec 2009 00:45:34 +0000 (16:45 -0800)]
timecompare: fix half-Y2K38 problem in timecompare_update while calculating offset

ktime will overflow from 03:14:07 UTC on Tuesday, 19 January 2038,
ktime_add() in timecompare_update() will overflow a half earlier.  As a
result, wrong offset will be gotten, then cause some strange problems.

Signed-off-by: Barry Song <21cnbao@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Patrick Ohly <patrick.ohly@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agooom-kill: fix NUMA constraint check with nodemask
KAMEZAWA Hiroyuki [Wed, 16 Dec 2009 00:45:33 +0000 (16:45 -0800)]
oom-kill: fix NUMA constraint check with nodemask

Fix node-oriented allocation handling in oom-kill.c I myself think of this
as a bugfix not as an ehnancement.

In these days, things are changed as
  - alloc_pages() eats nodemask as its arguments, __alloc_pages_nodemask().
  - mempolicy don't maintain its own private zonelists.
  (And cpuset doesn't use nodemask for __alloc_pages_nodemask())

So, current oom-killer's check function is wrong.

This patch does
  - check nodemask, if nodemask && nodemask doesn't cover all
    node_states[N_HIGH_MEMORY], this is CONSTRAINT_MEMORY_POLICY.
  - Scan all zonelist under nodemask, if it hits cpuset's wall
    this faiulre is from cpuset.
And
  - modifies the caller of out_of_memory not to call oom if __GFP_THISNODE.
    This doesn't change "current" behavior. If callers use __GFP_THISNODE
    it should handle "page allocation failure" by itself.

  - handle __GFP_NOFAIL+__GFP_THISNODE path.
    This is something like a FIXME but this gfpmask is not used now.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hioryu@jp.fujitsu.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agooom-kill: show virtual size and rss information of the killed process
KOSAKI Motohiro [Wed, 16 Dec 2009 00:45:32 +0000 (16:45 -0800)]
oom-kill: show virtual size and rss information of the killed process

In a typical oom analysis scenario, we frequently want to know whether the
killed process has a memory leak or not at the first step.  This patch
adds vsz and rss information to the oom log to help this analysis.  To
save time for the debugging.

example:
===================================================================
rsyslogd invoked oom-killer: gfp_mask=0x201da, order=0, oom_adj=0
Pid: 1308, comm: rsyslogd Not tainted 2.6.32-rc6 #24
Call Trace:
[<ffffffff8132e35b>] ?_spin_unlock+0x2b/0x40
[<ffffffff810f186e>] oom_kill_process+0xbe/0x2b0

(snip)

492283 pages non-shared
Out of memory: kill process 2341 (memhog) score 527276 or a child
Killed process 2341 (memhog) vsz:1054552kB, anon-rss:970588kB, file-rss:4kB
===========================================================================
                             ^
                             |
                            here

[rientjes@google.com: fix race, add pid & comm to message]
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agofix ksm.h breakage of nommu build
Hugh Dickins [Wed, 16 Dec 2009 08:56:57 +0000 (08:56 +0000)]
fix ksm.h breakage of nommu build

Commit 5ad6468801d28c4d4ac9f48ec19297817c915f6a "ksm: let shared pages
be swappable" breaks the build on m68knommu and I suspect on any nommu:

  In file included from kernel/fork.c:52:
  include/linux/ksm.h:129: warning: 'enum ttu_flags' declared inside parameter list
  include/linux/ksm.h:129: warning: its scope is only this definition or declaration, which is probably not what you want
  include/linux/ksm.h:129: error: parameter 2 ('flags') has incomplete type
  make[1]: *** [kernel/fork.o] Error 1
  make[1]: *** Waiting for unfinished jobs....

Let's fix that with CONFIG_MMU around most of the !CONFIG_KSM declarations.

Reported-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk>
Tested-by: Steven King <sfking@fdwdc.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
14 years agoV4L/DVB (13698): pms: replace asm/uaccess.h to linux/uaccess.h
Mauro Carvalho Chehab [Mon, 14 Dec 2009 19:43:13 +0000 (16:43 -0300)]
V4L/DVB (13698): pms: replace asm/uaccess.h to linux/uaccess.h

Fix a checkpatch.pl warning:

WARNING: Use #include <linux/uaccess.h> instead of <asm/uaccess.h>

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13690): radio/si470x: #include <sched.h>
Randy Dunlap [Mon, 14 Dec 2009 17:08:13 +0000 (14:08 -0300)]
V4L/DVB (13690): radio/si470x: #include <sched.h>

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>
14 years agoV4L/DVB (13688): au8522: modify the attributes of local filter coefficients
Márton Németh [Sun, 13 Dec 2009 20:19:37 +0000 (17:19 -0300)]
V4L/DVB (13688): au8522: modify the attributes of local filter coefficients

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>
14 years agoV4L/DVB (13687): cx231xx: use NULL when pointer is needed
Márton Németh [Sun, 13 Dec 2009 20:06:10 +0000 (17:06 -0300)]
V4L/DVB (13687): cx231xx: use NULL when pointer is needed

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>
14 years agoV4L/DVB: Davinci VPFE Capture: remove unused #include <linux/version.h>
Huang Weiyi [Sun, 13 Dec 2009 14:05:21 +0000 (11:05 -0300)]
V4L/DVB: Davinci VPFE Capture: remove unused #include <linux/version.h>

Remove unused #include <linux/version.h>('s) in
  drivers/media/video/davinci/vpfe_capture.c

Cc: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Huang Weiyi <weiyi.huang@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13685): Correct code taking the size of a pointer
Julia Lawall [Sun, 13 Dec 2009 11:41:12 +0000 (08:41 -0300)]
V4L/DVB (13685): Correct code taking the size of a pointer

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>
14 years agoV4L/DVB (13684): Fix some cut-and-paste noise in dib0090.h
Duncan Gibb [Sat, 12 Dec 2009 12:52:01 +0000 (09:52 -0300)]
V4L/DVB (13684): Fix some cut-and-paste noise in dib0090.h

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>
14 years agoV4L/DVB (13683): sanio-ms: clean up init, exit and id_table
Márton Németh [Fri, 11 Dec 2009 23:05:10 +0000 (20:05 -0300)]
V4L/DVB (13683): sanio-ms: clean up init, exit and id_table

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>
14 years agoV4L/DVB (13682): dib8000: make some constant static
Márton Németh [Fri, 11 Dec 2009 22:35:40 +0000 (19:35 -0300)]
V4L/DVB (13682): dib8000: make some constant static

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>
14 years agoV4L/DVB: lgs8gxx: Use shifts rather than multiply/divide when possible
David Howells [Fri, 11 Dec 2009 16:11:05 +0000 (13:11 -0300)]
V4L/DVB: lgs8gxx: Use shifts rather than multiply/divide when possible

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>
14 years agoV4L/DVB (13680b): DocBook/media: create links for included sources
Ben Hutchings [Thu, 3 Dec 2009 22:51:09 +0000 (19:51 -0300)]
V4L/DVB (13680b): DocBook/media: create links for included sources

If docs are being built in a separate directory, xmlto and xsltproc
can't find included sources.  Make links back to the source directory.

I would much prefer to have xmlto and xsltproc look in the source
directory for included entities but couldn't see how to do that.  This
needs to be solved in some way for 2.6.32, even if this patch isn't the
right way to do it.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13680a): DocBook/media: copy images after building HTML
Ben Hutchings [Thu, 3 Dec 2009 22:50:35 +0000 (19:50 -0300)]
V4L/DVB (13680a): DocBook/media: copy images after building HTML

The rule for %.html removes the output directory, so there is no point
in copying images before building HTML.

Documentation/DocBook/Makefile |   10 +++++-----

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13678): Add support for yet another DvbWorld, TeVii and Prof USB devices
Igor M. Liplianin [Fri, 27 Nov 2009 17:37:35 +0000 (14:37 -0300)]
V4L/DVB (13678): Add support for yet another DvbWorld, TeVii and Prof USB devices

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>
14 years agoV4L/DVB (13676): configurable IRQ mode on NetUP Dual DVB-S2 CI; IRQ from CAM processi...
Abylay Ospan [Sat, 12 Dec 2009 15:16:56 +0000 (12:16 -0300)]
V4L/DVB (13676): configurable IRQ mode on NetUP Dual DVB-S2 CI; IRQ from CAM processing (CI interface works faster)

Signed-off-by: Abylay Ospan <aospan@netup.ru>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13674): stv090x: Add DiSEqC envelope mode
Oliver Endriss [Sun, 13 Dec 2009 12:02:39 +0000 (09:02 -0300)]
V4L/DVB (13674): stv090x: Add DiSEqC envelope mode

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>
14 years agoV4L/DVB (13673): lnbp21: Implement 22 kHz tone control
Oliver Endriss [Sun, 13 Dec 2009 11:58:38 +0000 (08:58 -0300)]
V4L/DVB (13673): lnbp21: Implement 22 kHz tone control

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>
14 years agoV4L/DVB (13671): sh_mobile_ceu_camera: Remove frame size page alignment
Magnus Damm [Fri, 11 Dec 2009 14:53:56 +0000 (11:53 -0300)]
V4L/DVB (13671): sh_mobile_ceu_camera: Remove frame size page alignment

This patch updates the SuperH Mobile CEU driver to
not page align the frame size. Useful in the case of
USERPTR with non-page aligned frame sizes and offsets.

Signed-off-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13670): soc-camera: Add mt9t112 camera driver
Kuninori Morimoto [Fri, 11 Dec 2009 14:53:55 +0000 (11:53 -0300)]
V4L/DVB (13670): soc-camera: Add mt9t112 camera driver

 create mode 100644 drivers/media/video/mt9t112.c
 create mode 100644 include/media/mt9t112.h

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13669): tw9910: Add sync polarity support
Kuninori Morimoto [Fri, 11 Dec 2009 14:53:55 +0000 (11:53 -0300)]
V4L/DVB (13669): tw9910: Add sync polarity support

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13668): tw9910: remove cropping
Kuninori Morimoto [Fri, 11 Dec 2009 14:53:55 +0000 (11:53 -0300)]
V4L/DVB (13668): tw9910: remove cropping

Cropping is used for data input, and it is not needed now

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
14 years agoV4L/DVB (13667): tw9910: modify output format
Kuninori Morimoto [Fri, 11 Dec 2009 14:53:54 +0000 (11:53 -0300)]
V4L/DVB (13667): tw9910: modify output format

Correct tw9910 output format is Cb - Y - Cr - Y
which is defined in ITU-R BT.656.

Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>