GitHub/mt8127/android_kernel_alcatel_ttab.git
15 years agox86, ds: use single debug store cpu configuration
Markus Metzger [Fri, 3 Apr 2009 14:43:47 +0000 (16:43 +0200)]
x86, ds: use single debug store cpu configuration

Use a single configuration for all cpus.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144602.191165000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, ds: add leakage warning
Markus Metzger [Fri, 3 Apr 2009 14:43:46 +0000 (16:43 +0200)]
x86, ds: add leakage warning

Add a warning in case a debug store context is not removed before
the task it is attached to is freed.

Remove the old warning at thread exit. It is too early.

Declare the debug store context field in thread_struct unconditionally.

Remove ds_copy_thread() and ds_exit_thread() and do the work directly
in process*.c.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144601.254472000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, ds: add task tracing selftest
Markus Metzger [Fri, 3 Apr 2009 14:43:45 +0000 (16:43 +0200)]
x86, ds: add task tracing selftest

Add selftests to cover per-task branch tracing.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144600.329346000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, ds: selftest each cpu
Markus Metzger [Fri, 3 Apr 2009 14:43:44 +0000 (16:43 +0200)]
x86, ds: selftest each cpu

Perform debug store selftests on each cpu.

Cover both the normal and the _noirq variant of the debug store interface.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144559.394583000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, ds: fix bounds check in ds selftest
Markus Metzger [Fri, 3 Apr 2009 14:43:43 +0000 (16:43 +0200)]
x86, ds: fix bounds check in ds selftest

Fix a bad bounds check in the debug store selftest.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144558.450027000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, ds: fix compiler warning
Markus Metzger [Fri, 3 Apr 2009 14:43:42 +0000 (16:43 +0200)]
x86, ds: fix compiler warning

Size_t is defined differently on i386 and x86_64.
Change type to avoid compiler warning.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144557.523964000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, hw-branch-tracer: allocate selftest iterator on heap
Markus Metzger [Fri, 3 Apr 2009 14:43:41 +0000 (16:43 +0200)]
x86, hw-branch-tracer: allocate selftest iterator on heap

Allocate the trace_iterator for the hw-branch-tracer selftest on the heap.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144556.578777000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts, hw-branch-tracer: add _noirq variants to the debug store interface
Markus Metzger [Fri, 3 Apr 2009 14:43:40 +0000 (16:43 +0200)]
x86, bts, hw-branch-tracer: add _noirq variants to the debug store interface

The hw-branch-tracer uses debug store functions from an on_each_cpu()
context, which is simply wrong since the functions may sleep.

Add _noirq variants for most functions, which  may be called with
interrupts disabled.

Separate per-cpu and per-task tracing and allow per-cpu tracing to be
controlled from any cpu.

Make the hw-branch-tracer use the new debug store interface, synchronize
with hotplug cpu event using get/put_online_cpus(), and remove the
unnecessary spinlock.

Make the ptrace bts and the ds selftest code use the new interface.

Defer the ds selftest.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144555.658136000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, debugctlmsr: add _on_cpu variants to debugctlmsr functions
Markus Metzger [Fri, 3 Apr 2009 14:43:39 +0000 (16:43 +0200)]
x86, debugctlmsr: add _on_cpu variants to debugctlmsr functions

Add functions to get and set the debugctlmsr on different cpus.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144554.738772000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: use trace_clock_global() for timestamps
Markus Metzger [Fri, 3 Apr 2009 14:43:38 +0000 (16:43 +0200)]
x86, bts: use trace_clock_global() for timestamps

Rename the bts_struct timestamp field to event.

Use trace_clock_global() for time measurement.

Reported-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144553.773216000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: fix race between per-task and per-cpu branch tracing
Markus Metzger [Fri, 3 Apr 2009 14:43:37 +0000 (16:43 +0200)]
x86, bts: fix race between per-task and per-cpu branch tracing

Per-task branch tracing installs a debug store context with the traced
task. This immediately results in the branch trace control bits to be
cleared for the next context switch of that task, if not set before.

Either per-cpu or per-task tracing are allowed at the same time.

An active per-cpu tracing would be disabled even if the per-task tracing
request is rejected and the task debug store context removed.

Check the tracing type (per-cpu or per-task) before installing a task
debug store context.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144552.856000000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: wait until traced task has been scheduled out
Markus Metzger [Fri, 3 Apr 2009 14:43:36 +0000 (16:43 +0200)]
x86, bts: wait until traced task has been scheduled out

In order to stop branch tracing for a running task, we need to first
clear the branch tracing control bits before we may free the tracing
buffer.

If the traced task is running, the cpu might still trace that task
after the branch trace control bits have cleared.

Wait until the traced task has been scheduled out before proceeding.

A similar problem affects the task debug store context. We first remove
the context, then we need to wait until the task has been scheduled
out before we can free the context memory.

Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144551.919636000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agomm, x86, ptrace, bts: defer branch trace stopping
Markus Metzger [Fri, 3 Apr 2009 14:43:35 +0000 (16:43 +0200)]
mm, x86, ptrace, bts: defer branch trace stopping

When a ptraced task is unlinked, we need to stop branch tracing for
that task.

Since the unlink is called with interrupts disabled, and we need
interrupts enabled to stop branch tracing, we defer the work.

Collect all branch tracing related stuff in a branch tracing context.

Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144550.712401000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agosched, hw-branch-tracer: add wait_task_context_switch() function to sched.h
Markus Metzger [Fri, 3 Apr 2009 14:43:34 +0000 (16:43 +0200)]
sched, hw-branch-tracer: add wait_task_context_switch() function to sched.h

Add a function to wait until some other task has been
switched out at least once.

This differs from wait_task_inactive() subtly, in that the
latter will wait until the task has left the CPU.

Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: markus.t.metzger@gmail.com
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: oleg@redhat.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144549.794157000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agox86, bts: fix race when bts tracer is removed
Markus Metzger [Fri, 3 Apr 2009 14:43:33 +0000 (16:43 +0200)]
x86, bts: fix race when bts tracer is removed

When the bts tracer is removed while the traced task is running,
the write to clear the bts tracer pointer races with context switch code.

Read the tracer once during a context switch.

When a new tracer is installed, the bts tracer is set in the ds context
before the tracer is initialized in order to claim the context for that
tracer.

This may result in write accesses using an uninitialized trace configuration
when scheduling timestamps have been requested.

Store active tracing flags separately and only set active flags after
the tracing configuration has been initialized.

Reviewed-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Markus Metzger <markus.t.metzger@intel.com>
Cc: roland@redhat.com
Cc: eranian@googlemail.com
Cc: juan.villacis@intel.com
Cc: ak@linux.jf.intel.com
LKML-Reference: <20090403144548.881338000@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoMerge branch 'linus' into tracing/hw-branch-tracing
Ingo Molnar [Tue, 7 Apr 2009 11:34:26 +0000 (13:34 +0200)]
Merge branch 'linus' into tracing/hw-branch-tracing

Merge reason: update to latest tracing and ptrace APIs

Signed-off-by: Ingo Molnar <mingo@elte.hu>
15 years agoNFS: Fix a double free in nfs_parse_mount_options()
Trond Myklebust [Mon, 6 Apr 2009 23:41:35 +0000 (16:41 -0700)]
NFS: Fix a double free in nfs_parse_mount_options()

Due to an apparent typo, commit a67d18f89f5782806135aad4ee012ff78d45aae7
(NFS: load the rpc/rdma transport module automatically) lead to the
'proto=' mount option doing a double free, while Opt_mountproto leaks a
string.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoext3: make default data ordering mode configurable
Linus Torvalds [Tue, 7 Apr 2009 00:16:47 +0000 (17:16 -0700)]
ext3: make default data ordering mode configurable

This makes the defautl ext3 data ordering mode (when no explicit
ordering is set) configurable, so as to allow people to default to
'data=writeback' and get the resulting latency improvements.

This is a non-issue if a filesystem has been explicitly set to some
ordering (with 'tune2fs').

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'linux-next' of git://git.infradead.org/ubifs-2.6
Linus Torvalds [Mon, 6 Apr 2009 22:00:19 +0000 (15:00 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubifs-2.6

* 'linux-next' of git://git.infradead.org/ubifs-2.6:
  UBIFS: fix recovery bug
  UBIFS: add R/O compatibility
  UBIFS: fix compiler warnings
  UBIFS: fully sort GCed nodes
  UBIFS: fix commentaries
  UBIFS: introduce a helpful variable
  UBIFS: use KERN_CONT
  UBIFS: fix lprops committing bug
  UBIFS: fix bogus assertion
  UBIFS: fix bug where page is marked uptodate when out of space
  UBIFS: amend key_hash return value
  UBIFS: improve find function interface
  UBIFS: list usage cleanup
  UBIFS: fix dbg_chk_lpt_sz()

15 years agoMerge branch 'linux-next' of git://git.infradead.org/ubi-2.6
Linus Torvalds [Mon, 6 Apr 2009 22:00:00 +0000 (15:00 -0700)]
Merge branch 'linux-next' of git://git.infradead.org/ubi-2.6

* 'linux-next' of git://git.infradead.org/ubi-2.6:
  UBI: add fsync capability

15 years agoexit_notify: kill the wrong capable(CAP_KILL) check
Oleg Nesterov [Mon, 6 Apr 2009 14:16:02 +0000 (16:16 +0200)]
exit_notify: kill the wrong capable(CAP_KILL) check

The CAP_KILL check in exit_notify() looks just wrong, kill it.

Whatever logic we have to reset ->exit_signal, the malicious user
can bypass it if it execs the setuid application before exiting.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Serge Hallyn <serue@us.ibm.com>
Acked-by: Roland McGrath <roland@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.infradead.org/mtd-2.6
Linus Torvalds [Mon, 6 Apr 2009 21:56:26 +0000 (14:56 -0700)]
Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6: (53 commits)
  [MTD] struct device - replace bus_id with dev_name(), dev_set_name()
  [MTD] [NOR] Fixup for Numonyx M29W128 chips
  [MTD] mtdpart: Make ecc_stats more realistic.
  powerpc/85xx: TQM8548: Update DTS file for multi-chip support
  powerpc: NAND: FSL UPM: document new bindings
  [MTD] [NAND] FSL-UPM: Add wait flags to support board/chip specific delays
  [MTD] [NAND] FSL-UPM: add multi chip support
  [MTD] [NOR] Add device parent info to physmap_of
  [MTD] [NAND] Add support for NAND on the Socrates board
  [MTD] [NAND] Add support for 4KiB pages.
  [MTD] sysfs support should not depend on CONFIG_PROC_FS
  [MTD] [NAND] Add parent info for CAFÉ controller
  [MTD] support driver model updates
  [MTD] driver model updates (part 2)
  [MTD] driver model updates
  [MTD] [NAND] move gen_nand's probe function to .devinit.text
  [MTD] [MAPS] move sa1100 flash's probe function to .devinit.text
  [MTD] fix use after free in register_mtd_blktrans
  [MTD] [MAPS] Drop now unused sharpsl-flash map
  [MTD] ofpart: Check name property to determine partition nodes.
  ...

Manually fix trivial conflict in drivers/mtd/maps/Makefile

15 years agoLANANA: Fix dates
Alan Cox [Mon, 6 Apr 2009 13:55:50 +0000 (14:55 +0100)]
LANANA: Fix dates

As noted by Janne Grunau it would be good if the date was also right.

(Web site also resynched)

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomd/raid1: fix build breakage
Alexander Beregalov [Mon, 6 Apr 2009 21:35:56 +0000 (01:35 +0400)]
md/raid1: fix build breakage

Fix this build error:

  drivers/md/raid1.c: In function 'raid1_congested':
  drivers/md/raid1.c:589: error: 'BDI_write_congested' undeclared

BDI_write_congested was changed in commit 1faa16d228 ("block: change the
request allocation/congestion logic to be sync/async based")

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Neil Brown <neilb@suse.de>
Cc: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250: Fix warning
Alan Cox [Mon, 6 Apr 2009 16:35:42 +0000 (17:35 +0100)]
8250: Fix warning

The 8430 patch was short a const so caused a warning.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agorio: addition has higher precedence than ?:
Roel Kluin [Mon, 6 Apr 2009 16:35:34 +0000 (17:35 +0100)]
rio: addition has higher precedence than ?:

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agosymbol: Remove various bits of left over junk
Alan Cox [Mon, 6 Apr 2009 16:35:25 +0000 (17:35 +0100)]
symbol: Remove various bits of left over junk

There are various bits of code here that are unfinished and instead of
being harmless either confuse or spew stuff into the logs at higher than
debug level. They can and should go away.

Also remove the bogus use of tty->lowlatency. We fixed the need for this hack
long ago (with the flip buffer rewrite) but people keep copying it into drivers.

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: pl2303 needs identifiers for Siemens S81 as well as EF81
Alan Cox [Mon, 6 Apr 2009 16:35:12 +0000 (17:35 +0100)]
tty: pl2303 needs identifiers for Siemens S81 as well as EF81

Closes bug 9065

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocdc-acm: zydas 1602 identifier needed
Alan Cox [Mon, 6 Apr 2009 16:35:01 +0000 (17:35 +0100)]
cdc-acm: zydas 1602 identifier needed

Bugzilla #9095 and a couple of other confirmations

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoicom: remove unused variables
Breno Leitao [Mon, 6 Apr 2009 16:34:53 +0000 (17:34 +0100)]
icom: remove unused variables

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomux: fix build problem
Alexander Beregalov [Mon, 6 Apr 2009 16:34:34 +0000 (17:34 +0100)]
mux: fix build problem

Fixes:

  In file included from drivers/serial/mux.c:37:
  include/linux/serial_core.h: In function 'uart_handle_sysrq_char':
  include/linux/serial_core.h:467: error: 'struct uart_port' has no member named 'sysrq'
  include/linux/serial_core.h:468: error: 'struct uart_port' has no member named 'sysrq'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojsm: Fix the return variable and removing the unused retval.
Breno Leitao [Mon, 6 Apr 2009 16:34:27 +0000 (17:34 +0100)]
jsm: Fix the return variable and removing the unused retval.

As it was, the retval was never returned, so its assignments were silly.
Just consolidate everything to rc, and remove the unused retval variable.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@etchedpixels.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojsm: define init function as __devinit
Breno Leitao [Mon, 6 Apr 2009 16:34:17 +0000 (17:34 +0100)]
jsm: define init function as __devinit

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agomxser: remove tty_port_tty_get from mxser_check_modem_status
Jiri Slaby [Mon, 6 Apr 2009 16:34:10 +0000 (17:34 +0100)]
mxser: remove tty_port_tty_get from mxser_check_modem_status

mxser_check_modem_status is called with tty parameter, so the
reference should be increased by callers already -- for ioctl
syscall it is held whole time gap since open to close, for
interrupt, the reference count is increased in the irq handler.

There is no tty_kref_put in that function, so this also fixes
a refcounting bug.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agotty: moxa, fix refcounting in moxa_poll_port
Jiri Slaby [Mon, 6 Apr 2009 16:34:04 +0000 (17:34 +0100)]
tty: moxa, fix refcounting in moxa_poll_port

There is missing tty_kref_put on some paths in moxa_poll_port,
although the reference is always taken. Fix it.

Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Reported-by: Jan 'Yenya' Kasprzak <kas@fi.muni.cz>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoisicom: isicom kref leak fix
Alan Cox [Mon, 6 Apr 2009 16:33:55 +0000 (17:33 +0100)]
isicom: isicom kref leak fix

The isicom driver leaks a kref on the shutdown path. Drop the additional
kref we took

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoucc: Fix leaky error path
Alan Cox [Mon, 6 Apr 2009 16:33:48 +0000 (17:33 +0100)]
ucc: Fix leaky error path

Found by Daniel Marjamäki using cppcheck

Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoriscom8: Auto-load riscom8 module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:33:26 +0000 (17:33 +0100)]
riscom8: Auto-load riscom8 module when device opened.

The riscom8 module is missing the char-major-48-* alias that would cause
it to be auto-loaded when a device of that type is opened.  This patch
adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agousb: Auto-load cdc_acm module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:33:18 +0000 (17:33 +0100)]
usb: Auto-load cdc_acm module when device opened.

The cdc_acm module is missing the char-major-166-* alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agospecialix: Auto-load specialix module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:33:11 +0000 (17:33 +0100)]
specialix: Auto-load specialix module when device opened.

The specialix module is missing the char-major-75-* alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agocyclades: Auto-load cyclades module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:33:04 +0000 (17:33 +0100)]
cyclades: Auto-load cyclades module when device opened.

The cyclades module is missing the char-major-19-* alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoapplicom: Auto-load applicom module when device opened.
Scott James Remnant [Mon, 6 Apr 2009 16:32:58 +0000 (17:32 +0100)]
applicom: Auto-load applicom module when device opened.

The applicom module is missing the char-major-10-157 alias that would
cause it to be auto-loaded when a device of that type is opened.  This
patch adds the alias.

Signed-off-by: Scott James Remnant <scott@canonical.com>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: Subtract ANOMALY_05000230 on quot
Graf Yang [Mon, 6 Apr 2009 16:32:49 +0000 (17:32 +0100)]
blackfin: Subtract ANOMALY_05000230 on quot

Fix bug - up arrow key works abnormal for bf561 ezkit board

Signed-off-by: Graf Yang <graf.yang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFix DMA rx ring buffer handling
Sonic Zhang [Mon, 6 Apr 2009 16:32:42 +0000 (17:32 +0100)]
Fix DMA rx ring buffer handling

Reported-by: Qian Zhang <zhangq@sansitech.com>
Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: Fix tty compile error in PIO mode
Sonic Zhang [Mon, 6 Apr 2009 16:32:35 +0000 (17:32 +0100)]
blackfin: Fix tty compile error in PIO mode

Fixes this compile issue:

  drivers/serial/bfin_5xx.c: In function bfin_serial_rx_chars:
  drivers/serial/bfin_5xx.c:178: error: struct uart_info has no member named tty

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: Use unsigned long for flags with irq functions
Mike Frysinger [Mon, 6 Apr 2009 16:32:28 +0000 (17:32 +0100)]
blackfin: Use unsigned long for flags with irq functions

Signed-off-by: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblackfin: BF538/9 serial uart support
Michael Hennerich [Mon, 6 Apr 2009 16:32:21 +0000 (17:32 +0100)]
blackfin: BF538/9 serial uart support

Enable third UART on BF538/9

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Bryan Wu <cooloney@kernel.org>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250_pci: add support for National Instruments legacy 8420 RS232 boards
Will Page [Mon, 6 Apr 2009 16:32:15 +0000 (17:32 +0100)]
8250_pci: add support for National Instruments legacy 8420 RS232 boards

Signed-off-by: Will Page <will.page@ni.com>
Signed-off-by: Shawn Bohrer <shawn.bohrer@ni.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250_pci: add support for National Instruments 843x RS232 devices
Shawn Bohrer [Mon, 6 Apr 2009 16:32:07 +0000 (17:32 +0100)]
8250_pci: add support for National Instruments 843x RS232 devices

This implements basic support for all 843x RS232 devices, but does not
add DMA support.  This means that sustained data transfers at high baud
rates may not be possible on multiple ports simultaneously.

Signed-off-by: Shawn Bohrer <shawn.bohrer@ni.com>
Signed-off-by: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoserial: Update PNP IDs
Matthew Garrett [Mon, 6 Apr 2009 16:32:01 +0000 (17:32 +0100)]
serial: Update PNP IDs

Add new Wacom device IDs to the 8250_pnp serial driver, to support
autoconfig on some newer tablet PCs.  Also add a comment to clarify that
the FUJ02E6 device is a custom protocol, not a Wacom tablet.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alan Cox <alan@etchedpixels.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years ago8250_pnp.c: add another Wacom tablet
Danny Kukawka [Mon, 6 Apr 2009 16:31:54 +0000 (17:31 +0100)]
8250_pnp.c: add another Wacom tablet

Add another serial Wacom tablet with pnp_id: WACF009.

Signed-off-by: Danny Kukawka <dkukawka@suse.de>
Signed-off-by: Alan Cox <alan@etchedpixels.co.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMake CONFIG_SLOW_WORK an automatic rather than manual config option
David Howells [Mon, 6 Apr 2009 14:47:25 +0000 (15:47 +0100)]
Make CONFIG_SLOW_WORK an automatic rather than manual config option

Make CONFIG_SLOW_WORK an automatic rather than manual config option so that
people configuring their kernels don't have to make the choice.  It can be
selected automatically by those things that require it (such as FS-Cache).

Signed-off-by: David Howells <dhowells@redhat.com>
Acked-by: Jeff Garzik <jgarzik@redhat.com>
Acked-by: Kyle McMartin <kyle@mcmartin.ca>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoFRV: Fix compile breakage
Adrian Bunk [Mon, 6 Apr 2009 14:36:04 +0000 (15:36 +0100)]
FRV: Fix compile breakage

This patch fixes the follwing build error caused by
commit 7ca43e7564679604d86e9ed834e7bbcffd8a4a3f
(mm: use debug_kmap_atomic):

  ...
    AS      arch/frv/mm/tlb-miss.o
  In file included from
  arch/frv/mm/tlb-miss.S:13:
  ...
  Assembler messages:
  include/asm-generic/ioctl.h:73:
  Error: unrecognized instruction `extern unsigned int __invalid_size_argument_for_IO...'
  ...

Signed-off-by: Adrian Bunk <bunk@kernel.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge git://git.infradead.org/iommu-2.6
Linus Torvalds [Mon, 6 Apr 2009 21:26:05 +0000 (14:26 -0700)]
Merge git://git.infradead.org/iommu-2.6

* git://git.infradead.org/iommu-2.6:
  drivers/pci/intr_remapping.c: include acpi.h
  intel-iommu: Fix oops in device_to_iommu() when devices not found.
  intel-iommu: Handle PCI domains appropriately.
  intel-iommu: Fix device-to-iommu mapping for PCI-PCI bridges.
  x2apic/intr-remap: decouple interrupt remapping from x2apic
  x86, dmar: check if it's initialized before disable queue invalidation
  intel-iommu: set compatibility format interrupt
  Intel IOMMU Suspend/Resume Support - Interrupt Remapping
  Intel IOMMU Suspend/Resume Support - Queued Invalidation
  Intel IOMMU Suspend/Resume Support - DMAR
  intel-iommu: Add for_each_iommu() and for_each_active_iommu() macros

15 years agoMerge branch 'for-linus' of git://neil.brown.name/md
Linus Torvalds [Mon, 6 Apr 2009 20:46:27 +0000 (13:46 -0700)]
Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md/raid1 - don't assume newly allocated bvecs are initialised.

15 years agodrivers/pci/intr_remapping.c: include acpi.h
Alexander Beregalov [Mon, 6 Apr 2009 15:45:28 +0000 (16:45 +0100)]
drivers/pci/intr_remapping.c: include acpi.h

Fix this build error:
drivers/pci/intr_remapping.c: In function 'ir_parse_ioapic_scope':
drivers/pci/intr_remapping.c:617: error: invalid use of undefined type
         'struct acpi_dmar_hardware_unit'

Signed-off-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agopercpu: __percpu_depopulate_mask can take a const mask
Stephen Rothwell [Mon, 6 Apr 2009 05:08:29 +0000 (15:08 +1000)]
percpu: __percpu_depopulate_mask can take a const mask

This eliminates a compiler warning:

  mm/allocpercpu.c: In function 'free_percpu':
  mm/allocpercpu.c:146: warning: passing argument 2 of '__percpu_depopulate_mask' discards qualifiers from pointer target type

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodocs: alphabetize entries in kernel-parameters.txt
Randy Dunlap [Sun, 5 Apr 2009 22:55:22 +0000 (15:55 -0700)]
docs: alphabetize entries in kernel-parameters.txt

Move entries to be in alpha order as specified near the beginning
of this file.

Clean up some whitespace and line-length miscues.

Add '=' to "selinux" option syntax.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agodocbook: fix fatal filename error
Randy Dunlap [Sun, 5 Apr 2009 22:45:34 +0000 (15:45 -0700)]
docbook: fix fatal filename error

Fix docbook fatal error:

docproc: block/blktrace.c: No such file or directory

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agokernel/sysctl.c: avoid annoying warnings
Linus Torvalds [Mon, 6 Apr 2009 20:38:46 +0000 (13:38 -0700)]
kernel/sysctl.c: avoid annoying warnings

Some of the limit constants are used only depending on some complex
configuration dependencies, yet it's not worth making the simple
variables depend on those configuration details.  Just mark them as
perhaps not being unused, and avoid the warning.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoMerge branch 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 6 Apr 2009 20:37:30 +0000 (13:37 -0700)]
Merge branch 'locking-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'locking-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  lockdep: add stack dumps to asserts
  hrtimer: fix rq->lock inversion (again)

15 years agointel-iommu: Fix oops in device_to_iommu() when devices not found.
David Woodhouse [Mon, 6 Apr 2009 20:30:01 +0000 (13:30 -0700)]
intel-iommu: Fix oops in device_to_iommu() when devices not found.

It's possible for a device in the drhd->devices[] array to be NULL if
it wasn't found at boot time, which means we have to check for that
case.

Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
15 years agoMerge branch 'kmemtrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Mon, 6 Apr 2009 20:30:00 +0000 (13:30 -0700)]
Merge branch 'kmemtrace-for-linus' of git://git./linux/kernel/git/tip/linux-2.6-tip

* 'kmemtrace-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  kmemtrace: trace kfree() calls with NULL or zero-length objects
  kmemtrace: small cleanups
  kmemtrace: restore original tracing data binary format, improve ABI
  kmemtrace: kmemtrace_alloc() must fill type_id
  kmemtrace: use tracepoints
  kmemtrace, rcu: don't include unnecessary headers, allow kmemtrace w/ tracepoints
  kmemtrace, rcu: fix rcupreempt.c data structure dependencies
  kmemtrace, rcu: fix rcu_tree_trace.c data structure dependencies
  kmemtrace, rcu: fix linux/rcutree.h and linux/rcuclassic.h dependencies
  kmemtrace, mm: fix slab.h dependency problem in mm/failslab.c
  kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_unlzma.c
  kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_bunzip2.c
  kmemtrace, kbuild: fix slab.h dependency problem in lib/decompress_inflate.c
  kmemtrace, squashfs: fix slab.h dependency problem in squasfs
  kmemtrace, befs: fix slab.h dependency problem
  kmemtrace, security: fix linux/key.h header file dependencies
  kmemtrace, fs: fix linux/fdtable.h header file dependencies
  kmemtrace, fs: uninline simple_transaction_set()
  kmemtrace, fs, security: move alloc_secdata() and free_secdata() to linux/security.h

15 years agoMerge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux
Linus Torvalds [Mon, 6 Apr 2009 20:25:56 +0000 (13:25 -0700)]
Merge branch 'for-2.6.30' of git://linux-nfs.org/~bfields/linux

* 'for-2.6.30' of git://linux-nfs.org/~bfields/linux: (81 commits)
  nfsd41: define nfsd4_set_statp as noop for !CONFIG_NFSD_V4
  nfsd41: define NFSD_DRC_SIZE_SHIFT in set_max_drc
  nfsd41: Documentation/filesystems/nfs41-server.txt
  nfsd41: CREATE_EXCLUSIVE4_1
  nfsd41: SUPPATTR_EXCLCREAT attribute
  nfsd41: support for 3-word long attribute bitmask
  nfsd: dynamically skip encoded fattr bitmap in _nfsd4_verify
  nfsd41: pass writable attrs mask to nfsd4_decode_fattr
  nfsd41: provide support for minor version 1 at rpc level
  nfsd41: control nfsv4.1 svc via /proc/fs/nfsd/versions
  nfsd41: add OPEN4_SHARE_ACCESS_WANT nfs4_stateid bmap
  nfsd41: access_valid
  nfsd41: clientid handling
  nfsd41: check encode size for sessions maxresponse cached
  nfsd41: stateid handling
  nfsd: pass nfsd4_compound_state* to nfs4_preprocess_{state,seq}id_op
  nfsd41: destroy_session operation
  nfsd41: non-page DRC for solo sequence responses
  nfsd41: Add a create session replay cache
  nfsd41: create_session operation
  ...

15 years agoMerge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6
Linus Torvalds [Mon, 6 Apr 2009 20:25:27 +0000 (13:25 -0700)]
Merge branch 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6

* 'i2c-for-linus' of git://jdelvare.pck.nerim.net/jdelvare-2.6:
  i2c: Delete unused i2c-algo-sgi helper module
  i2c: Delete many unused driver IDs
  i2c: Deprecate client_register and client_unregister methods

15 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6
Linus Torvalds [Mon, 6 Apr 2009 20:24:49 +0000 (13:24 -0700)]
Merge git://git./linux/kernel/git/jejb/scsi-misc-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (74 commits)
  [SCSI] sg: fix q->queue_lock on scsi_error_handler path
  [SCSI] replace __inline with inline
  [SCSI] a2091: make 2 functions static
  [SCSI] a3000: make 2 functions static
  [SCSI] ses: #if 0 the unused ses_match_host()
  [SCSI] use kmem_cache_zalloc instead of kmem_cache_alloc/memset
  [SCSI] sg: fix iovec bugs introduced by the block layer conversion
  [SCSI] qlogicpti: use request_firmware
  [SCSI] advansys: use request_firmware
  [SCSI] qla1280: use request_firmware
  [SCSI] libiscsi: fix iscsi pool error path
  [SCSI] cxgb3i: call ddp release function directly
  [SCSI] cxgb3i: merge cxgb3i_ddp into cxgb3i module
  [SCSI] cxgb3i: close all tcp connections upon chip reset
  [SCSI] cxgb3i: re-read ddp settings information after chip reset
  [SCSI] cxgb3i: re-initialize ddp settings after chip reset
  [SCSI] cxgb3i: subscribe to error notification from cxgb3 driver
  [SCSI] aacraid driver update
  [SCSI] mptsas: remove unneeded check
  [SCSI] config: Make need for SCSI_CDROM clearer
  ...

15 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
Linus Torvalds [Mon, 6 Apr 2009 20:24:00 +0000 (13:24 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight:
  backlight: Adds HP Jornada 700 series backlight driver
  backlight: Add HP Jornada 700 series LCD driver
  backlight: fix pwm_bl.c when multiple PWM backlights exist
  backlight: mbp_nvidia_bl - Add a debug switch
  backlight: Add support for MacBook 5, MacBook Air 2, and MacBook Pro 5

15 years agoMerge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds
Linus Torvalds [Mon, 6 Apr 2009 20:22:45 +0000 (13:22 -0700)]
Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds

* 'for-linus' of git://git.o-hand.com/linux-rpurdie-leds:
  leds: introduce lp5521 led driver
  leds: just ignore invalid GPIOs in leds-gpio
  leds: Fix &&/|| confusion in leds-pca9532.c
  leds: move h1940-leds's probe function to .devinit.text
  leds: remove an unnecessary "goto" on drivers/leds/leds-s3c24.c
  leds: add BD2802GU LED driver
  leds: remove experimental flag from leds-clevo-mail
  leds: Prevent multiple LED triggers with the same name
  leds: Add gpio-led trigger
  leds: Add rb532 LED driver for the User LED
  leds: Add suspend/resume state flags to leds-gpio
  leds: simple driver for pwm driven LEDs
  leds: Fix leds-gpio driver multiple module_init/exit usage
  leds: Add dac124s085 driver
  leds: allow led-drivers to use a variable range of brightness values
  leds: Add openfirmware platform device support

15 years agonfsd41: define nfsd4_set_statp as noop for !CONFIG_NFSD_V4
Benny Halevy [Mon, 6 Apr 2009 09:00:49 +0000 (12:00 +0300)]
nfsd41: define nfsd4_set_statp as noop for !CONFIG_NFSD_V4

Fixes following modpost error:
ERROR: "nfsd4_set_statp" [fs/nfsd/nfsd.ko] undefined!

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agonfsd41: define NFSD_DRC_SIZE_SHIFT in set_max_drc
Benny Halevy [Mon, 6 Apr 2009 09:00:36 +0000 (12:00 +0300)]
nfsd41: define NFSD_DRC_SIZE_SHIFT in set_max_drc

Fixes the following compiler error:
fs/nfsd/nfssvc.c: In function 'set_max_drc':
fs/nfsd/nfssvc.c:240: error: 'NFSD_DRC_SIZE_SHIFT' undeclared

CONFIG_NFSD_V4 is not set

Reported-by: Alexander Beregalov <a.beregalov@gmail.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
15 years agoi2c: Delete unused i2c-algo-sgi helper module
Jean Delvare [Mon, 6 Apr 2009 16:12:25 +0000 (18:12 +0200)]
i2c: Delete unused i2c-algo-sgi helper module

The i2c-algo-sgi code was merged into the vino driver, so we can
delete it now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Delete many unused driver IDs
Jean Delvare [Mon, 6 Apr 2009 16:12:25 +0000 (18:12 +0200)]
i2c: Delete many unused driver IDs

Delete many unused I2C driver IDs. We should be able to get rid of
i2c_driver.id pretty soon now.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agoi2c: Deprecate client_register and client_unregister methods
Jean Delvare [Mon, 6 Apr 2009 16:12:24 +0000 (18:12 +0200)]
i2c: Deprecate client_register and client_unregister methods

The new i2c binding model makes the client_register and
client_unregister methods of struct i2c_adapter useless, so we can
remove them with the rest of the legacy model.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
15 years agobacklight: Adds HP Jornada 700 series backlight driver
Kristoffer Ericson [Wed, 18 Feb 2009 11:50:43 +0000 (11:50 +0000)]
backlight: Adds HP Jornada 700 series backlight driver

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agobacklight: Add HP Jornada 700 series LCD driver
Kristoffer Ericson [Wed, 18 Feb 2009 11:47:26 +0000 (11:47 +0000)]
backlight: Add HP Jornada 700 series LCD driver

Signed-off-by: Kristoffer Ericson <kristoffer.ericson@gmail.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agobacklight: fix pwm_bl.c when multiple PWM backlights exist
Eric Miao [Tue, 10 Feb 2009 05:30:37 +0000 (13:30 +0800)]
backlight: fix pwm_bl.c when multiple PWM backlights exist

When multiple PWMs are used as backlights, the current code uses
pdev->name as the backlight name when registering, which will be
conflicting, use dev_name() instead.

Signed-off-by: Peter Edwards <sweetlilmre@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agobacklight: mbp_nvidia_bl - Add a debug switch
Mario Schwalbe [Sun, 11 Jan 2009 00:19:31 +0000 (00:19 +0000)]
backlight: mbp_nvidia_bl - Add a debug switch

This patch adds a debug switch to enable (little) diagnostic
output, to help to trace down the remaining problems.

Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agobacklight: Add support for MacBook 5, MacBook Air 2, and MacBook Pro 5
Mario Schwalbe [Sun, 11 Jan 2009 00:11:34 +0000 (00:11 +0000)]
backlight: Add support for MacBook 5, MacBook Air 2, and MacBook Pro 5

This patch adds support for the new Apple models incorporating an Nvidia
chipset.  Apple still uses the same protocol as on older models, but the
registers moved to a different address. To do this, two sets of functions
are added for the Intel/Nvidia chipset models and passed by the DMI_MATCH
function.

The initial code has been contributed by Hu Gang <hugang@soulinfo.com>.

The driver is known to work on MacBook Pro 3, MacBook Pro 4 and MacBook
Pro 5.

Its known to work with limitations on MacBook 5 / MacBook Air 2. Changing
brightness within X doesn't work, if using Nvidia's proprietary graphics
driver with no known fix at present. Changing brightness on a text console
or using the open-source driver does work.

MacBook Pro 5 has a known bug where the initial brightness after bootup is
the last recently used brightness (in Mac OSX), while the firmware reports
maximum. Impossible to fix.

[akpm@linux-foundation.org: build fix]
[rpurdie@linux.intel.com: Rebased the patch against latest git]
Signed-off-by: Mario Schwalbe <schwalbe@inf.tu-dresden.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: introduce lp5521 led driver
Felipe Balbi [Wed, 18 Feb 2009 12:05:54 +0000 (14:05 +0200)]
leds: introduce lp5521 led driver

LP5521 is a three channel led driver with support
for hardware accelerated patterns (currently used
via lp5521-only sysfs interface).

Currently, it's used on n810 device.

Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: just ignore invalid GPIOs in leds-gpio
David Brownell [Fri, 6 Mar 2009 00:46:44 +0000 (16:46 -0800)]
leds: just ignore invalid GPIOs in leds-gpio

Sometimes it's awkward to make sure that the array in the
platform_data handed to the leds-gpio driver has only valid
data ... some leds may not be always available, and coping
with that currently requires patching or rebuilding the array.

This patch fixes that by making it be OK to pass an invalid
GPIO (such as "-EINVAL") ... such table entries are skipped.

[rpurdie@linux.intel.com: adjusted to apply against other led tree changes]
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Tested-by: Diego Dompe <diego.dompe@ridgerun.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Fix &&/|| confusion in leds-pca9532.c
Riku Voipio [Tue, 3 Mar 2009 20:13:06 +0000 (22:13 +0200)]
leds: Fix &&/|| confusion in leds-pca9532.c

This fixes the expression in the driver to do the correct thing,
not that I think anyone would send SND_* without EV_SND.

Thanks to Roel Kluin <roel.kluin@gmail.com> for noticing.

Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: move h1940-leds's probe function to .devinit.text
Uwe Kleine-König [Fri, 27 Mar 2009 23:26:38 +0000 (00:26 +0100)]
leds: move h1940-leds's probe function to .devinit.text

A pointer to h1940leds_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded.  Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.

An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: remove an unnecessary "goto" on drivers/leds/leds-s3c24.c
Zhenwen Xu [Fri, 3 Apr 2009 14:35:52 +0000 (15:35 +0100)]
leds: remove an unnecessary "goto" on drivers/leds/leds-s3c24.c

This goto is unnecessary.

Signed-off-by: Zhenwen Xu <helight.xu@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: add BD2802GU LED driver
Kim Kyuwon [Wed, 4 Mar 2009 19:59:29 +0000 (11:59 -0800)]
leds: add BD2802GU LED driver

ROHM BD2802GU is a RGB LED controller attached to i2c bus and specifically
engineered for decoration purposes.  This RGB controller incorporates
lighting patterns and illuminates.

This driver is designed to minimize power consumption, so when there is no
emitting LED, it enters to reset state.  And because the BD2802GU has lots
of features that can't be covered by the current LED framework, it
provides Advanced Configuration Function(ADF) mode, so that user
applications can set registers of BD2802GU directly.

Here are basic usage examples :
; to turn on LED (not blink)
$ echo 1 > /sys/class/leds/led1_R/brightness
; to blink LED
$ echo timer > /sys/class/leds/led1_R/trigger
$ echo 1 > /sys/class/leds/led1_R/delay_on
$ echo 1 > /sys/class/leds/led1_R/delay_off
; to turn off LED
$ echo 0 > /sys/class/leds/led1_R/brightness

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Kim Kyuwon <chammoru@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: remove experimental flag from leds-clevo-mail
Németh Márton [Fri, 3 Apr 2009 05:42:47 +0000 (07:42 +0200)]
leds: remove experimental flag from leds-clevo-mail

The leds-clevo-mail driver is in the mainline kernel since 2.6.25 and works
without severe problems. Make this driver available for a larger audience.

Signed-off-by: Márton Németh <nm127@freemail.hu>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Prevent multiple LED triggers with the same name
Adam Nielsen [Tue, 17 Feb 2009 22:18:04 +0000 (08:18 +1000)]
leds: Prevent multiple LED triggers with the same name

Signed-off-by: Adam Nielsen <a.nielsen@shikadi.net>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add gpio-led trigger
Felipe Balbi [Tue, 17 Feb 2009 11:18:11 +0000 (13:18 +0200)]
leds: Add gpio-led trigger

The gpio led trigger will allow leds to be triggered by
gpio events.

When we give the led a gpio number, the trigger will
request_irq() on that so we don't have to keep polling
for gpio state.

It's useful for usecases as n810's keypad leds that could
be triggered by the gpio event generated when user slides
up to show the keypad.

We also provide means for userland to tell us what is the
desired brightness for that special led when it goes on
so userland could use information from ambient light sensors
and not set led brightness too high if it's not necessary.

Signed-off-by: Felipe Balbi <me@felipebalbi.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add rb532 LED driver for the User LED
Phil Sutter [Thu, 22 Jan 2009 18:35:48 +0000 (19:35 +0100)]
leds: Add rb532 LED driver for the User LED

Mikrotik built six LEDs into the Routerboard 532, from which one is
destined for custom use, the so called "User LED". This patch adds a
driver for it, based on the LEDs class.

Signed-off-by: Phil Sutter <n0-1@freewrt.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add suspend/resume state flags to leds-gpio
Richard Purdie [Tue, 17 Feb 2009 15:04:07 +0000 (15:04 +0000)]
leds: Add suspend/resume state flags to leds-gpio

Add an option to preserve LED state when suspending/resuming to the LED
gpio driver. Based on a suggestion from Robert Jarzmik.

Tested-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: simple driver for pwm driven LEDs
Luotao Fu [Wed, 11 Feb 2009 21:24:40 +0000 (13:24 -0800)]
leds: simple driver for pwm driven LEDs

Add a simple driver for pwm driver LEDs.  pwm_id and period can be defined
in board file.  It is developed for pxa, however it is probably generic
enough to be used on other platforms with pwm.

Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Fix leds-gpio driver multiple module_init/exit usage
Richard Purdie [Mon, 2 Feb 2009 23:04:42 +0000 (23:04 +0000)]
leds: Fix leds-gpio driver multiple module_init/exit usage

You can't have multiple module_init()/module_exit calls so resort to messy
ifdefs potentially pending some code refactoring.

Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add dac124s085 driver
Guennadi Liakhovetski [Sat, 10 Jan 2009 18:58:28 +0000 (18:58 +0000)]
leds: Add dac124s085 driver

Add an LED driver using the DAC124S085 DAC from NatSemi

[randy.dunlap@oracle.com: use header files for interfaces]
Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: allow led-drivers to use a variable range of brightness values
Guennadi Liakhovetski [Sat, 10 Jan 2009 18:54:39 +0000 (18:54 +0000)]
leds: allow led-drivers to use a variable range of brightness values

This patch allows drivers to override the default maximum brightness value
of 255.  We take care to preserve backwards-compatibility as much as
possible, so that user-space ABI doesn't change for existing drivers.
LED trigger code has also been updated to use the per-LED maximum.

Signed-off-by: Guennadi Liakhovetski <lg@denx.de>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoleds: Add openfirmware platform device support
Trent Piepho [Sat, 10 Jan 2009 17:26:01 +0000 (17:26 +0000)]
leds: Add openfirmware platform device support

Add bindings to support LEDs defined as of_platform devices in addition to
the existing bindings for platform devices.

New options in Kconfig allow the platform binding code and/or the
of_platform code to be turned on.  The of_platform code is of course only
available on archs that have OF support.

The existing probe and remove methods are refactored to use new functions
create_gpio_led(), to create and register one led, and delete_gpio_led(),
to unregister and free one led.  The new probe and remove methods for the
of_platform driver can then share most of the common probe and remove code
with the platform driver.

The suspend and resume methods aren't shared, but they are very short.  The
actual led driving code is the same for LEDs created by either binding.

The OF bindings are based on patch by Anton Vorontsov
<avorontsov@ru.mvista.com>.  They have been extended to allow multiple LEDs
per device.

Signed-off-by: Trent Piepho <tpiepho@freescale.com>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Acked-by: Sean MacLennan <smaclennan@pikatech.com>
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
15 years agoblock: switch sync_dirty_buffer() over to WRITE_SYNC
Jens Axboe [Mon, 6 Apr 2009 12:48:08 +0000 (14:48 +0200)]
block: switch sync_dirty_buffer() over to WRITE_SYNC

We should now have the logic in place to handle this properly
without regressing on the write performance, so re-enable
the sync writes.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblock: Add flag for telling the IO schedulers NOT to anticipate more IO
Jens Axboe [Mon, 6 Apr 2009 12:48:07 +0000 (14:48 +0200)]
block: Add flag for telling the IO schedulers NOT to anticipate more IO

By default, CFQ will anticipate more IO from a given io context if the
previously completed IO was sync. This used to be fine, since the only
sync IO was reads and O_DIRECT writes. But with more "normal" sync writes
being used now, we don't want to anticipate for those.

Add a bio/request flag that informs the IO scheduler that this is a sync
request that we should not idle for. Introduce WRITE_ODIRECT specifically
for O_DIRECT writes, and make sure that the other sync writes set this
flag.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblock: enabling plugging on SSD devices that don't do queuing
Jens Axboe [Mon, 6 Apr 2009 12:48:06 +0000 (14:48 +0200)]
block: enabling plugging on SSD devices that don't do queuing

For the older SSD devices that don't do command queuing, we do want to
enable plugging to get better merging.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojbd2: use WRITE_SYNC_PLUG instead of WRITE_SYNC
Jens Axboe [Mon, 6 Apr 2009 12:48:05 +0000 (14:48 +0200)]
jbd2: use WRITE_SYNC_PLUG instead of WRITE_SYNC

When you are going to be submitting several sync writes, we want to
give the IO scheduler a chance to merge some of them. Instead of
using the implicitly unplugging WRITE_SYNC variant, use WRITE_SYNC_PLUG
and rely on sync_buffer() doing the unplug when someone does a
wait_on_buffer()/lock_buffer().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agojbd: use WRITE_SYNC_PLUG instead of WRITE_SYNC
Jens Axboe [Mon, 6 Apr 2009 12:48:04 +0000 (14:48 +0200)]
jbd: use WRITE_SYNC_PLUG instead of WRITE_SYNC

When you are going to be submitting several sync writes, we want to
give the IO scheduler a chance to merge some of them. Instead of
using the implicitly unplugging WRITE_SYNC variant, use WRITE_SYNC_PLUG
and rely on sync_buffer() doing the unplug when someone does a
wait_on_buffer()/lock_buffer().

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
15 years agoblock: fsync_buffers_list() should use SWRITE_SYNC_PLUG
Jens Axboe [Mon, 6 Apr 2009 12:48:03 +0000 (14:48 +0200)]
block: fsync_buffers_list() should use SWRITE_SYNC_PLUG

Then it can submit all the buffers without unplugging for each one.
We will kick off the pending IO if we come across a new address space.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>