openwrt/staging/blogic.git
13 years agotile: Use generic show_interupts()
Thomas Gleixner [Fri, 25 Mar 2011 14:21:17 +0000 (14:21 +0000)]
tile: Use generic show_interupts()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
LKML-Reference: <20110325142049.536190130@linutronix.de>

13 years agotile: Convert to new irq function names
Thomas Gleixner [Fri, 25 Mar 2011 14:21:16 +0000 (14:21 +0000)]
tile: Convert to new irq function names

Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Chris Metcalf <cmetcalf@tilera.com>
LKML-Reference: <20110325142049.441954268@linutronix.de>

13 years agodma: Ipu: Convert interupt code
Thomas Gleixner [Fri, 25 Mar 2011 11:21:38 +0000 (12:21 +0100)]
dma: Ipu: Convert interupt code

Convert to the new irq chip functions and cleanup the name space.

[ Guennadi reported: irq_data_get_chip_data is undefined. Yes, I screwed up.
 it needs to be irq_data_get_irq_chip_data ]

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Dan Williams <dan.j.williams@intel.com>
LKML-Reference: <alpine.LFD.2.00.1103251220000.31464@localhost6.localdomain6>

13 years agogenirq: Expand generic show_interrupts()
Thomas Gleixner [Fri, 25 Mar 2011 15:48:50 +0000 (16:48 +0100)]
genirq: Expand generic show_interrupts()

Some archs want to print extra information for certain irq_chips which
is per irq and not per chip. Allow them to provide a chip callback to
print the chip name and the extra information.

PowerPC wants to print the LEVEL/EDGE type information. Make it configurable.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handler
Thomas Gleixner [Thu, 24 Mar 2011 21:27:37 +0000 (21:27 +0000)]
gpio: Fold irq_set_chip/irq_set_handler to irq_set_chip_and_handler

Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
LKML-Reference: <20110324212509.118888535@linutronix.de>

13 years agogpio: Cleanup genirq namespace
Thomas Gleixner [Thu, 24 Mar 2011 21:27:36 +0000 (21:27 +0000)]
gpio: Cleanup genirq namespace

Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
LKML-Reference: <20110324212509.025730689@linutronix.de>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoarm: ep93xx: Add basic interrupt info
Ryan Mallon [Thu, 24 Mar 2011 22:46:46 +0000 (23:46 +0100)]
arm: ep93xx: Add basic interrupt info

For the time being can we fix up the ep93xx gpio code with the amended
patch below. It keeps the information that the pin is also configured
as an interrupt and cleans the code up a bit.

[ tglx: Rebased it on the removal patch ]

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoarm/gpio: Remove three copies of broken and racy debug code
Thomas Gleixner [Thu, 24 Mar 2011 21:27:35 +0000 (21:27 +0000)]
arm/gpio: Remove three copies of broken and racy debug code

gpiolib plus two gpio implementations in arm fiddle in the guts of
irq_desc in a racy and buggy way. Remove the stuff. I already told the
gpio folks that we can provide that information in a proper way if
necessary.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
LKML-Reference: <20110324212508.931638262@linutronix.de>

13 years agoxtensa: Use generic show_interrupts()
Thomas Gleixner [Thu, 24 Mar 2011 17:28:40 +0000 (18:28 +0100)]
xtensa: Use generic show_interrupts()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoxtensa: Convert genirq namespace
Thomas Gleixner [Thu, 24 Mar 2011 13:58:43 +0000 (14:58 +0100)]
xtensa: Convert genirq namespace

Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoxtensa: Use generic IRQ Kconfig and set GENERIC_HARDIRQS_NO_DEPRECATED
Thomas Gleixner [Sun, 6 Feb 2011 21:10:54 +0000 (22:10 +0100)]
xtensa: Use generic IRQ Kconfig and set GENERIC_HARDIRQS_NO_DEPRECATED

All chips converted.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Zankel <chris@zankel.net>
LKML-Reference: <20110206211137.849317253@linutronix.de>

13 years agoxtensa: Convert s6000 gpio irq_chip to new functions
Thomas Gleixner [Sun, 6 Feb 2011 21:10:53 +0000 (22:10 +0100)]
xtensa: Convert s6000 gpio irq_chip to new functions

Also use proper wrappers for irq_desc access.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Zankel <chris@zankel.net>
LKML-Reference: <20110206211137.750284615@linutronix.de>

13 years agoxtensa: Convert main irq_chip to new functions
Thomas Gleixner [Sun, 6 Feb 2011 21:10:52 +0000 (22:10 +0100)]
xtensa: Convert main irq_chip to new functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Chris Zankel <chris@zankel.net>
LKML-Reference: <20110206211137.653005586@linutronix.de>

13 years agoum: Use generic show_interrupts()
Thomas Gleixner [Thu, 24 Mar 2011 17:25:20 +0000 (18:25 +0100)]
um: Use generic show_interrupts()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoum: Convert genirq namespace
Thomas Gleixner [Thu, 24 Mar 2011 17:24:42 +0000 (18:24 +0100)]
um: Convert genirq namespace

Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agom32r: Use generic show_interrupts()
Thomas Gleixner [Thu, 24 Mar 2011 18:24:55 +0000 (19:24 +0100)]
m32r: Use generic show_interrupts()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agom32r: Convert genirq namespace
Thomas Gleixner [Thu, 24 Mar 2011 16:32:45 +0000 (17:32 +0100)]
m32r: Convert genirq namespace

Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoh8300: Use generic show_interrupts()
Thomas Gleixner [Thu, 24 Mar 2011 18:15:36 +0000 (19:15 +0100)]
h8300: Use generic show_interrupts()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoh8300: Convert genirq namespace
Thomas Gleixner [Thu, 24 Mar 2011 16:32:22 +0000 (17:32 +0100)]
h8300: Convert genirq namespace

Scripted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoavr32: Cleanup eic_set_irq_type()
Thomas Gleixner [Thu, 24 Mar 2011 16:24:04 +0000 (17:24 +0100)]
avr32: Cleanup eic_set_irq_type()

No need to fiddle in irq_desc. The trigger mask can be written back
into irq_data. Return IRQ_SET_MASK_OK_NOCOPY, so the generic code wont
overwrite it again.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
13 years agoavr32: Use generic show_interrupts()
Thomas Gleixner [Thu, 24 Mar 2011 18:08:11 +0000 (19:08 +0100)]
avr32: Use generic show_interrupts()

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
13 years agoavr: Cleanup genirq namespace
Thomas Gleixner [Thu, 24 Mar 2011 15:39:32 +0000 (16:39 +0100)]
avr: Cleanup genirq namespace

Scripted conversion to new function names with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
13 years agoavr32: Use generic IRQ config, enable GENERIC_HARDIRQS_NO_DEPRECATED
Thomas Gleixner [Sun, 6 Feb 2011 16:29:04 +0000 (17:29 +0100)]
avr32: Use generic IRQ config, enable GENERIC_HARDIRQS_NO_DEPRECATED

Use the generic Kconfig for interrupts and enable
GENERIC_HARDIRQS_NO_DEPRECATED. All conversions done.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
LKML-Reference: <20110206163009.289833604@linutronix.de>

13 years agoavr32: At32ap: Convert pop irq_chip to new functions
Thomas Gleixner [Sun, 6 Feb 2011 16:29:03 +0000 (17:29 +0100)]
avr32: At32ap: Convert pop irq_chip to new functions

Also replace the open coded handler call with the proper wrapper.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
LKML-Reference: <20110206163009.190112353@linutronix.de>

13 years agoavr32: At32ap: Convert intc irq_chip to new functions
Thomas Gleixner [Sun, 6 Feb 2011 16:29:02 +0000 (17:29 +0100)]
avr32: At32ap: Convert intc irq_chip to new functions

Also replace the open coded handler call with the proper wrapper.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
LKML-Reference: <20110206163009.096308633@linutronix.de>

13 years agoavr32: At32ap: Convert extint irq_chip to new functions
Thomas Gleixner [Sun, 6 Feb 2011 16:29:01 +0000 (17:29 +0100)]
avr32: At32ap: Convert extint irq_chip to new functions

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
LKML-Reference: <20110206163008.996220791@linutronix.de>

13 years agogenirq: Provide locked setter for chip, handler, name
Thomas Gleixner [Wed, 23 Mar 2011 12:10:31 +0000 (13:10 +0100)]
genirq: Provide locked setter for chip, handler, name

Some irq_set_type() callbacks need to change the chip and the handler
when the trigger mode changes. We have already a (misnomed) setter
function for the handler which can be called from irq_set_type().

Provide one which allows to set chip and name as well. Put the
misnomed function under the COMPAT switch and provide a replacement.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq: Provide a lockdep helper
Thomas Gleixner [Tue, 22 Mar 2011 16:08:15 +0000 (17:08 +0100)]
genirq: Provide a lockdep helper

Some irq chips need to call genirq functions for nested chips from
their callbacks. That upsets lockdep. So they need to set a different
lock class for those nested chips. Provide a helper function to avoid
open access to irq_desc.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agogenirq; Remove the last leftovers of the old sparse irq code
Thomas Gleixner [Tue, 22 Mar 2011 23:24:11 +0000 (00:24 +0100)]
genirq; Remove the last leftovers of the old sparse irq code

All users converted. Get rid of it.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
13 years agoMerge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx
Linus Torvalds [Wed, 23 Mar 2011 00:53:13 +0000 (17:53 -0700)]
Merge branch 'next' of git://git./linux/kernel/git/djbw/async_tx

* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/djbw/async_tx: (66 commits)
  avr32: at32ap700x: fix typo in DMA master configuration
  dmaengine/dmatest: Pass timeout via module params
  dma: let IMX_DMA depend on IMX_HAVE_DMA_V1 instead of an explicit list of SoCs
  fsldma: make halt behave nicely on all supported controllers
  fsldma: reduce locking during descriptor cleanup
  fsldma: support async_tx dependencies and automatic unmapping
  fsldma: fix controller lockups
  fsldma: minor codingstyle and consistency fixes
  fsldma: improve link descriptor debugging
  fsldma: use channel name in printk output
  fsldma: move related helper functions near each other
  dmatest: fix automatic buffer unmap type
  drivers, pch_dma: Fix warning when CONFIG_PM=n.
  dmaengine/dw_dmac fix: use readl & writel instead of __raw_readl & __raw_writel
  avr32: at32ap700x: Specify DMA Flow Controller, Src and Dst msize
  dw_dmac: Setting Default Burst length for transfers as 16.
  dw_dmac: Allow src/dst msize & flow controller to be configured at runtime
  dw_dmac: Changing type of src_master and dest_master to u8.
  dw_dmac: Pass Channel Priority from platform_data
  dw_dmac: Pass Channel Allocation Order from platform_data
  ...

13 years agobloat-o-meter: include read-only data section in report
Jean Delvare [Tue, 22 Mar 2011 23:35:13 +0000 (16:35 -0700)]
bloat-o-meter: include read-only data section in report

I'm not sure why the read-only data section is excluded from the report,
it seems as relevant as the other data sections (b and d).

I've stripped the symbols starting with __mod_ as they can have their
names dynamically generated and thus comparison between binaries is not
possible.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Andi Kleen <andi@firstfloor.org>
Acked-by: Nathan Lynch <ntl@pobox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agozlib: slim down zlib_deflate() workspace when possible
Jim Keniston [Tue, 22 Mar 2011 23:35:12 +0000 (16:35 -0700)]
zlib: slim down zlib_deflate() workspace when possible

Instead of always creating a huge (268K) deflate_workspace with the
maximum compression parameters (windowBits=15, memLevel=8), allow the
caller to obtain a smaller workspace by specifying smaller parameter
values.

For example, when capturing oops and panic reports to a medium with
limited capacity, such as NVRAM, compression may be the only way to
capture the whole report.  In this case, a small workspace (24K works
fine) is a win, whether you allocate the workspace when you need it (i.e.,
during an oops or panic) or at boot time.

I've verified that this patch works with all accepted values of windowBits
(positive and negative), memLevel, and compression level.

Signed-off-by: Jim Keniston <jkenisto@us.ibm.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David Miller <davem@davemloft.net>
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>
13 years agofs/devpts/inode.c: correctly check d_alloc_name() return code in devpts_pty_new()
Andrey Vagin [Tue, 22 Mar 2011 23:35:11 +0000 (16:35 -0700)]
fs/devpts/inode.c: correctly check d_alloc_name() return code in devpts_pty_new()

d_alloc_name return NULL in case error, but we expect errno in
devpts_pty_new.

Addresses http://bugzilla.openvz.org/show_bug.cgi?id=1758

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoaio: wake all waiters when destroying ctx
Roland Dreier [Tue, 22 Mar 2011 23:35:10 +0000 (16:35 -0700)]
aio: wake all waiters when destroying ctx

The test program below will hang because io_getevents() uses
add_wait_queue_exclusive(), which means the wake_up() in io_destroy() only
wakes up one of the threads.  Fix this by using wake_up_all() in the aio
code paths where we want to make sure no one gets stuck.

// t.c -- compile with gcc -lpthread -laio t.c

#include <libaio.h>
#include <pthread.h>
#include <stdio.h>
#include <unistd.h>

static const int nthr = 2;

void *getev(void *ctx)
{
struct io_event ev;
io_getevents(ctx, 1, 1, &ev, NULL);
printf("io_getevents returned\n");
return NULL;
}

int main(int argc, char *argv[])
{
io_context_t ctx = 0;
pthread_t thread[nthr];
int i;

io_setup(1024, &ctx);

for (i = 0; i < nthr; ++i)
pthread_create(&thread[i], NULL, getev, ctx);

sleep(1);

io_destroy(ctx);

for (i = 0; i < nthr; ++i)
pthread_join(thread[i], NULL);

return 0;
}

Signed-off-by: Roland Dreier <roland@purestorage.com>
Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agopps: remove unreachable code
Alexander Gordeev [Tue, 22 Mar 2011 23:35:06 +0000 (16:35 -0700)]
pps: remove unreachable code

Remove code enabled only when CONFIG_PREEMPT_RT is turned on because it is
not used in the vanilla kernel.

Signed-off-by: Alexander Gordeev <lasaine@lvk.cs.msu.su>
Cc: john stultz <johnstul@us.ibm.com>
Cc: Rodolfo Giometti <giometti@linux.it>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoadfs: add hexadecimal filetype suffix option
Stuart Swales [Tue, 22 Mar 2011 23:35:06 +0000 (16:35 -0700)]
adfs: add hexadecimal filetype suffix option

ADFS (FileCore) storage complies with the RISC OS filetype specification
(12 bits of file type information is stored in the file load address,
rather than using a file extension).  The existing driver largely ignores
this information and does not present it to the end user.

It is desirable that stored filetypes be made visible to the end user to
facilitate a precise copy of data and metadata from a hard disc (or image
thereof) into a RISC OS emulator (such as RPCEmu) or to a network share
which can be accessed by real Acorn systems.

This patch implements a per-mount filetype suffix option (use -o
ftsuffix=1) to present any filetype as a ,xyz hexadecimal suffix on each
file.  This type suffix is compatible with that used by RISC OS systems
that access network servers using NFS client software and by RPCemu's host
filing system.

Signed-off-by: Stuart Swales <stuart.swales.croftnuisk@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoadfs: improve timestamp precision
Stuart Swales [Tue, 22 Mar 2011 23:35:05 +0000 (16:35 -0700)]
adfs: improve timestamp precision

ADFS (FileCore) storage complies with the RISC OS timestamp specification
(40-bit centiseconds since 01 Jan 1900 00:00:00).  It is desirable that
stored timestamp precision be maintained to facilitate a precise copy of
data and metadata from a hard disc (or image thereof) into a RISC OS
emulator (such as RPCEmu).

This patch implements a full-precision conversion from ADFS to Unix
timestamp as the existing driver, for ease of calculation with old 32-bit
compilers, uses the common trick of shifting the 40-bits representing
centiseconds around into 32-bits representing seconds thereby losing
precision.

Signed-off-by: Stuart Swales<stuart.swales.croftnuisk@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoadfs: fix E+/F+ dir size > 2048 crashing kernel
Stuart Swales [Tue, 22 Mar 2011 23:35:04 +0000 (16:35 -0700)]
adfs: fix E+/F+ dir size > 2048 crashing kernel

Kernel crashes in fs/adfs module when accessing directories with a large
number of objects on mounted Acorn ADFS E+/F+ format discs (or images) as
the existing code writes off the end of the fixed array of struct
buffer_head pointers.

Additionally, each directory access that didn't crash would leak a buffer
as nr_buffers was not adjusted correctly for E+/F+ discs (was always left
as one less than required).

The patch fixes this by allocating a dynamically-sized set of struct
buffer_head pointers if necessary for the E+/F+ case (many directories
still do in fact fit in 2048 bytes) and sets the correct nr_buffers so
that all buffers are released.

Addresses https://bugzilla.kernel.org/show_bug.cgi?id=26072

Tested by tar'ing the contents of my RISC PC's E+ format 20Gb HDD which
contains a number of large directories that previously crashed the kernel.

Signed-off-by: Stuart Swales <stuart.swales.croftnuisk@gmail.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/vm/page-types.c: auto debugfs mount for hwpoison operation
Chen Gong [Tue, 22 Mar 2011 23:35:03 +0000 (16:35 -0700)]
Documentation/vm/page-types.c: auto debugfs mount for hwpoison operation

page-types.c doesn't supply a way to specify the debugfs path and the
original debugfs path is not usual on most machines.  This patch supplies
a way to auto mount debugfs if needed.

This patch is heavily inspired by tools/perf/utils/debugfs.c

[akpm@linux-foundation.org: make functions static]
[akpm@linux-foundation.org: fix debugfs_mount() signature]
Signed-off-by: Chen Gong <gong.chen@linux.intel.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/Changes: minor corrections
Christian Kujau [Tue, 22 Mar 2011 23:35:02 +0000 (16:35 -0700)]
Documentation/Changes: minor corrections

I noticed the 'mcelog' program had no comment and then ended up "fixing"
a few more things:

  * reiserfsck -V does not print "reiserfsprogs" (any more?)
  * is "udevinfo" still shipped? udevd certainly is
  * grub2 doesn't have a 'grub' binary
  * add a "# how to get the mcelog version" comment

Signed-off-by: Christian Kujau <lists@nerdbynature.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoDocumentation/CodingStyle: flesh out if-else examples
Harry Wei [Tue, 22 Mar 2011 23:35:01 +0000 (16:35 -0700)]
Documentation/CodingStyle: flesh out if-else examples

There is a missing case for "Chapter 3: Placing Braces and Spaces".  We
often know we should not use braces where a single statement.  The first
case is:

if (condition)
action();

Another case is:

if (condition)
do_this();
else
do_that();

However, I can not find a description of the second case.

Signed-off-by: Harry Wei <harryxiyou@gmail.com>
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>
13 years agocodafs: fix compile warning when CONFIG_SYSCTL=n
Rakib Mullick [Tue, 22 Mar 2011 23:35:00 +0000 (16:35 -0700)]
codafs: fix compile warning when CONFIG_SYSCTL=n

When CONFIG_SYSCTL=n, we get the following warning:

fs/coda/sysctl.c:18: warning: `coda_tabl' defined but not used

Fix the warning by making sure coda_table and it's callee function are in
the same context.  Also clean up the code by removing extra #ifdef.

[akpm@linux-foundation.org: remove unneeded stub macros]
Signed-off-by: Rakib Mullick <rakib.mullick@gmail.com>
Cc: Jan Harkes <jaharkes@cs.cmu.edu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agox86: allow CONFIG_ISA_DMA_API to be disabled
David Rientjes [Tue, 22 Mar 2011 23:34:59 +0000 (16:34 -0700)]
x86: allow CONFIG_ISA_DMA_API to be disabled

Not all 64-bit systems require ISA-style DMA, so allow it to be
configurable.  x86 utilizes the generic ISA DMA allocator from
kernel/dma.c, so require it only when CONFIG_ISA_DMA_API is enabled.

Disabling CONFIG_ISA_DMA_API is dependent on x86_64 since those machines
do not have ISA slots and benefit the most from disabling the option (and
on CONFIG_EXPERT as required by H.  Peter Anvin).

When disabled, this also avoids declaring claim_dma_lock(),
release_dma_lock(), request_dma(), and free_dma() since those interfaces
will no longer be provided.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agox86: only compile floppy driver if CONFIG_ISA_DMA_API is enabled
David Rientjes [Tue, 22 Mar 2011 23:34:58 +0000 (16:34 -0700)]
x86: only compile floppy driver if CONFIG_ISA_DMA_API is enabled

The generic floppy disk driver utilizies the interface provided by
CONFIG_ISA_DMA_API, specifically claim_dma_lock(), release_dma_lock(),
request_dma(), and free_dma().  Thus, there's a strict dependency on the
config option and the driver should only be loaded if the kernel supports
ISA-style DMA.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agox86: only compile 8237A if CONFIG_ISA_DMA_API is enabled
David Rientjes [Tue, 22 Mar 2011 23:34:57 +0000 (16:34 -0700)]
x86: only compile 8237A if CONFIG_ISA_DMA_API is enabled

8237A utilizes the interface provided by CONFIG_ISA_DMA_API, specifically
claim_dma_lock() and release_dma_lock().  Thus, there's a strict
dependency on the config option and the module should only be loaded if
the kernel supports ISA-style DMA.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agopnp: only assign IORESOURCE_DMA if CONFIG_ISA_DMA_API is enabled
David Rientjes [Tue, 22 Mar 2011 23:34:56 +0000 (16:34 -0700)]
pnp: only assign IORESOURCE_DMA if CONFIG_ISA_DMA_API is enabled

IORESOURCE_DMA cannot be assigned without utilizing the interface
provided by CONFIG_ISA_DMA_API, specifically request_dma() and
free_dma().  Thus, there's a strict dependency on the config option and
limits IORESOURCE_DMA only to architectures that support ISA-style DMA.

ia64 is not one of those architectures, so pnp_check_dma() no longer
needs to be special-cased for that architecture.

pnp_assign_resources() will now return -EINVAL if IORESOURCE_DMA is
attempted on such a kernel.

Signed-off-by: David Rientjes <rientjes@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: "Luck, Tony" <tony.luck@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agortc: add real-time clock driver for NVIDIA Tegra
Andrew Chew [Tue, 22 Mar 2011 23:34:55 +0000 (16:34 -0700)]
rtc: add real-time clock driver for NVIDIA Tegra

This is a platform driver that supports the built-in real-time clock on
Tegra SOCs.

Signed-off-by: Andrew Chew <achew@nvidia.com>
Acked-by: Alessandro Zummo <a.zummo@towertech.it>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Jon Mayo <jmayo@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/rtc/rtc-ds1511.c: world-writable sysfs nvram file
Vasiliy Kulikov [Tue, 22 Mar 2011 23:34:53 +0000 (16:34 -0700)]
drivers/rtc/rtc-ds1511.c: world-writable sysfs nvram file

Don't allow everybogy to write to NVRAM.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Cc: Andy Sharp <andy.sharp@onstor.com>
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>
13 years agodrivers/rtc/rtc-isl1208.c: add alarm support
Ryan Mallon [Tue, 22 Mar 2011 23:34:53 +0000 (16:34 -0700)]
drivers/rtc/rtc-isl1208.c: add alarm support

Add alarm/wakeup support to rtc isl1208 driver

Signed-off-by: Ryan Mallon <ryan@bluewatersys.com>
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>
13 years agortc: convert DS1374 to dev_pm_ops
Mark Brown [Tue, 22 Mar 2011 23:34:52 +0000 (16:34 -0700)]
rtc: convert DS1374 to dev_pm_ops

There is a general move to replace bus-specific PM ops with dev_pm_ops in
order to facilitate core improvements. Do this conversion for DS1374.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
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>
13 years agoinit: return proper error code in do_mounts_rd()
Davidlohr Bueso [Tue, 22 Mar 2011 23:34:49 +0000 (16:34 -0700)]
init: return proper error code in do_mounts_rd()

In do_mounts_rd() if memory cannot be allocated, return -ENOMEM.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agobinfmt_elf: quiet GCC-4.6 'set but not used' warning in load_elf_binary()
David Daney [Tue, 22 Mar 2011 23:34:48 +0000 (16:34 -0700)]
binfmt_elf: quiet GCC-4.6 'set but not used' warning in load_elf_binary()

With GCC-4.6 we get warnings about things being 'set but not used'.

In load_elf_binary() this can happen with reloc_func_desc if ELF_PLAT_INIT
is defined, but doesn't use the reloc_func_desc argument.

Quiet the warning/error by marking reloc_func_desc as __maybe_unused.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoepoll: fix compiler warning and optimize the non-blocking path
Shawn Bohrer [Tue, 22 Mar 2011 23:34:47 +0000 (16:34 -0700)]
epoll: fix compiler warning and optimize the non-blocking path

Add a comment to ep_poll(), rename labels a bit clearly, fix a warning of
unused variable from gcc and optimize the non-blocking path a little.

Hinted-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
hannes@cmpxchg.org:

: The non-blocking ep_poll path optimization introduced skipping over the
: return value setup.
:
: Initialize it properly, my userspace gets upset by epoll_wait() returning
: random things.
:
: In addition, remove the reinitialization at the fetch_events label, the
: return value is garuanteed to be zero when execution reaches there.

[hannes@cmpxchg.org: fix initialization]
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Cc: Shawn Bohrer <shawn.bohrer@gmail.com>
Acked-by: Davide Libenzi <davidel@xmailserver.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoepoll: move ready event check into proper inline
Davide Libenzi [Tue, 22 Mar 2011 23:34:46 +0000 (16:34 -0700)]
epoll: move ready event check into proper inline

Move the event readiness check into a proper inline, and use it uniformly
inside ep_poll() code.  Events in the ->ovflist are no less ready than the
ones in ->rdllist.

Signed-off-by: Davide Libenzi <davidel@xmailserver.org>
Cc: Shawn Bohrer <shawn.bohrer@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocrc32: add missed brackets in macro
Konstantin Khlebnikov [Tue, 22 Mar 2011 23:34:45 +0000 (16:34 -0700)]
crc32: add missed brackets in macro

Add brackets around typecasted argument in crc32() macro.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocheckpatch: warn about memset with swapped arguments
Dave Jones [Tue, 22 Mar 2011 23:34:44 +0000 (16:34 -0700)]
checkpatch: warn about memset with swapped arguments

Because the second and third arguments of memset have the same type, it
turns out to be really easy to mix them up.

This bug comes up time after time, so checkpatch should really be checking
for it at patch submission time.

Signed-off-by: Dave Jones <davej@redhat.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Andy Whitcroft <apw@shadowen.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoscripts/checkpatch.pl: reset rpt_cleaners warnings
Mike Frysinger [Tue, 22 Mar 2011 23:34:43 +0000 (16:34 -0700)]
scripts/checkpatch.pl: reset rpt_cleaners warnings

If you run checkpatch against multiple patches, and one of them has a
whitespace issue which can be helped via a script (rpt_cleaners), you will
see the same NOTE over and over for all subsequent patches.  It makes it
seem like those patches also have whitespace problems when in reality,
there's only one or two bad apples.

So reset rpt_cleaners back to 0 after we've issued the note so that it
only shows up near the patch with the actual problems.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Cc: Andy Whitcroft <apw@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/mmc/host/omap_hsmmc.c: use resource_size()
Chris Ball [Tue, 22 Mar 2011 23:34:42 +0000 (16:34 -0700)]
drivers/mmc/host/omap_hsmmc.c: use resource_size()

Use resource_size().

Signed-off-by: Chris Ball <cjb@laptop.org>
Cc: Madhusudhan Chikkature <madhu.cr@ti.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/mmc/host/omap.c: use resource_size()
Chris Ball [Tue, 22 Mar 2011 23:34:41 +0000 (16:34 -0700)]
drivers/mmc/host/omap.c: use resource_size()

Signed-off-by: Chris Ball <cjb@laptop.org>
Cc: Jarkko Lavinen <jarkko.lavinen@nokia.com>
Cc: Tony Lindgren <tony@atomide.com>
Cc: <linux-mmc@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agosigma-firmware: loader for Analog Devices' SigmaStudio
Mike Frysinger [Tue, 22 Mar 2011 23:34:40 +0000 (16:34 -0700)]
sigma-firmware: loader for Analog Devices' SigmaStudio

Analog Devices' SigmaStudio can produce firmware blobs for devices with
these DSPs embedded (like some audio codecs).  Allow these device drivers
to easily parse and load them.

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>
13 years agokstrto*: converting strings to integers done (hopefully) right
Alexey Dobriyan [Tue, 22 Mar 2011 23:34:40 +0000 (16:34 -0700)]
kstrto*: converting strings to integers done (hopefully) right

1. simple_strto*() do not contain overflow checks and crufty,
   libc way to indicate failure.
2. strict_strto*() also do not have overflow checks but the name and
   comments pretend they do.
3. Both families have only "long long" and "long" variants,
   but users want strtou8()
4. Both "simple" and "strict" prefixes are wrong:
   Simple doesn't exactly say what's so simple, strict should not exist
   because conversion should be strict by default.

The solution is to use "k" prefix and add convertors for more types.
Enter
kstrtoull()
kstrtoll()
kstrtoul()
kstrtol()
kstrtouint()
kstrtoint()

kstrtou64()
kstrtos64()
kstrtou32()
kstrtos32()
kstrtou16()
kstrtos16()
kstrtou8()
kstrtos8()

Include runtime testsuite (somewhat incomplete) as well.

strict_strto*() become deprecated, stubbed to kstrto*() and
eventually will be removed altogether.

Use kstrto*() in code today!

Note: on some archs _kstrtoul() and _kstrtol() are left in tree, even if
      they'll be unused at runtime. This is temporarily solution,
      because I don't want to hardcode list of archs where these
      functions aren't needed. Current solution with sizeof() and
      __alignof__ at least always works.

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>
13 years agoMAINTAINERS: add drivers/platform/msm to MSM subsystem
Kenneth Heitke [Tue, 22 Mar 2011 23:34:39 +0000 (16:34 -0700)]
MAINTAINERS: add drivers/platform/msm to MSM subsystem

Signed-off-by: Kenneth Heitke <kheitke@codeaurora.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: update WINBOND CIR pattern
Joe Perches [Tue, 22 Mar 2011 23:34:38 +0000 (16:34 -0700)]
MAINTAINERS: update WINBOND CIR pattern

commit 5b2e303f6df ("[media] rc-core: convert winbond-cir") moved the
files, update the pattern.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: David Härdeman <david@hardeman.nu>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: uSB SE401 moved to staging, update pattern
Joe Perches [Tue, 22 Mar 2011 23:34:37 +0000 (16:34 -0700)]
MAINTAINERS: uSB SE401 moved to staging, update pattern

And set the status to Orphan.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Jeroen Vreeken <pe1rxq@amsat.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: update SFI pattern
Joe Perches [Tue, 22 Mar 2011 23:34:36 +0000 (16:34 -0700)]
MAINTAINERS: update SFI pattern

commit 937f961a653 ("x86: Move sfi to platform") moved the files, update
the pattern.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: remove SHARP LH7A40X section
Joe Perches [Tue, 22 Mar 2011 23:34:35 +0000 (16:34 -0700)]
MAINTAINERS: remove SHARP LH7A40X section

commit 82e6923e186 ("ARM: lh7a40x: remove unmaintained platform support")
removed support, remove it from MAINTAINERS.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: update SCX200 file pattern
Joe Perches [Tue, 22 Mar 2011 23:34:34 +0000 (16:34 -0700)]
MAINTAINERS: update SCX200 file pattern

commit 3b3da9d25ae ("x86: Move scx200 to platform") moved it, convert the
pattern too.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: remove unused TIMEKEEPING timekeeping.h
Joe Perches [Tue, 22 Mar 2011 23:34:34 +0000 (16:34 -0700)]
MAINTAINERS: remove unused TIMEKEEPING timekeeping.h

Commit 88606e80da0 ("MAINTAINERS: Update timer related entries") added a
file pattern that didn't actually exist.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: remove IEEE1394 entry
Joe Perches [Tue, 22 Mar 2011 23:34:33 +0000 (16:34 -0700)]
MAINTAINERS: remove IEEE1394 entry

commit 66fa12c571d ("ieee1394: remove the old IEEE 1394 driver stack")

removed the code, remove the MAINTAINERS entry.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: update media path
Joe Perches [Tue, 22 Mar 2011 23:34:32 +0000 (16:34 -0700)]
MAINTAINERS: update media path

Commit 52b661449ae ("[media] rc: Rename remote controller type to rc_type
instead of ir_type") moved it around.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Maxim Levitsky <maximlevitsky@gmail.com>
Acked-by: Harry Wei <harryxiyou@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: update clkdev location
Joe Perches [Tue, 22 Mar 2011 23:34:31 +0000 (16:34 -0700)]
MAINTAINERS: update clkdev location

Commit 6d803ba736a ("ARM: 6483/1: arm & sh: factorised duplicated
clkdev.c") moved it to a separate directory.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Acked-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: remove unnecessary linux-kernel@vger.kernel.org entries
Joe Perches [Tue, 22 Mar 2011 23:34:30 +0000 (16:34 -0700)]
MAINTAINERS: remove unnecessary linux-kernel@vger. entries

CC'ing lkml is the default and doesn't need separate entries.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Harry Wei <harryxiyou@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: add missing : after HR Timers F tag
Joe Perches [Tue, 22 Mar 2011 23:34:29 +0000 (16:34 -0700)]
MAINTAINERS: add missing : after HR Timers F tag

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Harry Wei <harryxiyou@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: remove ASOC CODEC DRIVERS files not in tree
Joe Perches [Tue, 22 Mar 2011 23:34:29 +0000 (16:34 -0700)]
MAINTAINERS: remove ASOC CODEC DRIVERS files not in tree

Remove these patterns until such files are actually in the tree.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: change web links from wiki-analog to wiki.analog
Joe Perches [Tue, 22 Mar 2011 23:34:28 +0000 (16:34 -0700)]
MAINTAINERS: change web links from wiki-analog to wiki.analog

wiki-analog doesn't seem to work, but wiki.analog does.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Mike Frysinger <vapier.adi@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: update ADP5520 pattern
Joe Perches [Tue, 22 Mar 2011 23:34:27 +0000 (16:34 -0700)]
MAINTAINERS: update ADP5520 pattern

Typo in path.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: quote non-alphanumeric email addresses
Joe Perches [Tue, 22 Mar 2011 23:34:26 +0000 (16:34 -0700)]
MAINTAINERS: quote non-alphanumeric email addresses

Add quotes around email address with periods and commas.  So they don't
explode when pasted into certain email clients.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Harry Wei <harryxiyou@gmail.com>
Cc: "Mark F. Brown" <mark.brown314@gmail.com>
Cc: "Gustavo F. Padovan" <padovan@profusion.mobi>
Cc: "Stephen M. Cameron" <scameron@beardog.cce.hp.com>
Cc: "Lee, Chun-Yi" <jlee@novell.com>
Acked-by: Harry Wei <harryxiyou@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoMAINTAINERS: add topgit for T:
Harry Wei [Tue, 22 Mar 2011 23:34:25 +0000 (16:34 -0700)]
MAINTAINERS: add topgit for T:

At least one tree:

ARM/EZX SMARTPHONES (A780, A910, A1200, E680, ROKR E2 and ROKR E6)

is available via topgit.  Add mention of topgit in the MAINTAINERS
description section.

Signed-off-by: Harry Wei <harryxiyou@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoget_maintainer.pl: allow "K:" pattern tests to match non-patch text
Joe Perches [Tue, 22 Mar 2011 23:34:24 +0000 (16:34 -0700)]
get_maintainer.pl: allow "K:" pattern tests to match non-patch text

Extend the usage of the K section in the MAINTAINERS file to support
matching regular expressions to any arbitrary text that may precede the
patch itself.  For example, the commit message or mail headers generated
by git-format-patch.

Signed-off-by: Joe Perches <joe@perches.com>
Original-patch-by: L. Alberto Giménez <agimenez@sysvalve.es>
Acked-by: L. Alberto Giménez <agimenez@sysvalve.es>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoprintk: allow setting DEFAULT_MESSAGE_LEVEL via Kconfig
Mandeep Singh Baines [Tue, 22 Mar 2011 23:34:23 +0000 (16:34 -0700)]
printk: allow setting DEFAULT_MESSAGE_LEVEL via Kconfig

We've been burned by regressions/bugs which we later realized could have
been triaged quicker if only we'd paid closer attention to dmesg.  To make
it easier to audit dmesg, we'd like to make DEFAULT_MESSAGE_LEVEL
Kconfig-settable.  That way we can set it to KERN_NOTICE and audit any
messages <= KERN_WARNING.

Signed-off-by: Mandeep Singh Baines <msb@chromium.org>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Joe Perches <joe@perches.com>
Cc: Olof Johansson <olofj@chromium.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>
13 years agoprintk: use %pK for /proc/kallsyms and /proc/modules
Kees Cook [Tue, 22 Mar 2011 23:34:22 +0000 (16:34 -0700)]
printk: use %pK for /proc/kallsyms and /proc/modules

In an effort to reduce kernel address leaks that might be used to help
target kernel privilege escalation exploits, this patch uses %pK when
displaying addresses in /proc/kallsyms, /proc/modules, and
/sys/module/*/sections/*.

Note that this changes %x to %p, so some legitimately 0 values in
/proc/kallsyms would have changed from 00000000 to "(null)".  To avoid
this, "(null)" is not used when using the "K" format.  Anything that was
already successfully parsing "(null)" in addition to full hex digits
should have no problem with this change.  (Thanks to Joe Perches for the
suggestion.) Due to the %x to %p, "void *" casts are needed since these
addresses are already "unsigned long" everywhere internally, due to their
starting life as ELF section offsets.

Signed-off-by: Kees Cook <kees.cook@canonical.com>
Cc: Eugene Teo <eugene@redhat.com>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoconsole: prevent registered consoles from dumping old kernel message over again
Feng Tang [Tue, 22 Mar 2011 23:34:21 +0000 (16:34 -0700)]
console: prevent registered consoles from dumping old kernel message over again

For a platform with many consoles like:
 "console=tty1 console=ttyMFD2 console=ttyS0 earlyprintk=mrst"

Each time when the non "selected_console" (tty1 and ttyMFD2 here) get
registered, the existing kernel message will be printed out on registered
consoles again, the "mrst" early console will get some same message for 3
times, and "tty1" will get some for twice.

As suggested by Andrew Morton, every time a new console is registered, it
will be set as the "exclusive" console which will dump the already
existing kernel messages.

Signed-off-by: Feng Tang <feng.tang@intel.com>
Cc: Greg KH <gregkh@suse.de>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoconsole: allow to retain boot console via boot option keep_bootcon
Fabio M. Di Nitto [Tue, 22 Mar 2011 23:34:20 +0000 (16:34 -0700)]
console: allow to retain boot console via boot option keep_bootcon

On some architectures, the boot process involves de-registering the boot
console (early boot), initialize drivers and then re-register the console.

This mechanism introduces a window in which no printk can happen on the
console and messages are buffered and then printed once the new console is
available.

If a kernel crashes during this window, all it's left on the boot console
is "console [foo] enabled, bootconsole disabled" making debug of the crash
rather 'interesting'.

By adding "keep_bootcon" option, do not unregister the boot console, that
will allow to printk everything that is happening up to the crash.

The option is clearly meant only for debugging purposes as it introduces
lots of duplicated info printed on console, but will make bug report from
users easier as it doesn't require a kernel build just to figure out where
we crash.

Signed-off-by: Fabio M. Di Nitto <fabbione@fabbione.net>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Greg KH <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agovsprintf: neaten %pK kptr_restrict, save a bit of code space
Joe Perches [Tue, 22 Mar 2011 23:34:19 +0000 (16:34 -0700)]
vsprintf: neaten %pK kptr_restrict, save a bit of code space

If kptr restrictions are on, just set the passed pointer to NULL.

$ size lib/vsprintf.o.*
   text    data     bss     dec     hex filename
   8247       4       2    8253    203d lib/vsprintf.o.new
   8282       4       2    8288    2060 lib/vsprintf.o.old

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Dan Rosenberg <drosenberg@vsecurity.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/dca/dca-core.c: use list_move() instead of list_del()/list_add() combination
Kirill A. Shutemov [Tue, 22 Mar 2011 23:34:18 +0000 (16:34 -0700)]
drivers/dca/dca-core.c: use list_move() instead of list_del()/list_add() combination

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Cc: Maciej Sosnowski <maciej.sosnowski@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokernel/watchdog.c: always return NOTIFY_OK during cpu up/down events
Don Zickus [Tue, 22 Mar 2011 23:34:17 +0000 (16:34 -0700)]
kernel/watchdog.c: always return NOTIFY_OK during cpu up/down events

This patch addresses a couple of problems.  One was the case when the
hardlockup failed to start, it also failed to start the softlockup.  There
were valid cases when the hardlockup shouldn't start and that shouldn't
block the softlockup (no lapic, bios controls perf counters).

The second problem was when the hardlockup failed to start on boxes (from
a no lapic or bios controlled perf counter case), it reported failure to
the cpu notifier chain.  This blocked the notifier from continuing to
start other more critical pieces of cpu bring-up (in our case based on a
2.6.32 fork, it was the mce).  As a result, during soft cpu online/offline
testing, the system would panic when a cpu was offlined because the cpu
notifier would succeed in processing a watchdog disable cpu event and
would panic in the mce case as a result of un-initialized variables from a
never executed cpu up event.

I realized the hardlockup/softlockup cases are really just debugging aids
and should never impede the progress of a cpu up/down event.  Therefore I
modified the code to always return NOTIFY_OK and instead rely on printks
to inform the user of problems.

Signed-off-by: Don Zickus <dzickus@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokernel/watchdog.c: allow hardlockup to panic by default
Don Zickus [Tue, 22 Mar 2011 23:34:16 +0000 (16:34 -0700)]
kernel/watchdog.c: allow hardlockup to panic by default

When a cpu is considered stuck, instead of limping along and just printing
a warning, it is sometimes preferred to just panic, let kdump capture the
vmcore and reboot.  This gets the machine back into a stable state quickly
while saving the info that got it into a stuck state to begin with.

Add a Kconfig option to allow users to set the hardlockup to panic
by default.  Also add in a 'nmi_watchdog=nopanic' to override this.

[akpm@linux-foundation.org: fix strncmp length]
Signed-off-by: Don Zickus <dzickus@redhat.com>
Acked-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocalibrate: retry with wider bounds when converge seems to fail
Phil Carmody [Tue, 22 Mar 2011 23:34:15 +0000 (16:34 -0700)]
calibrate: retry with wider bounds when converge seems to fail

Systems with unmaskable interrupts such as SMIs may massively
underestimate loops_per_jiffy, and fail to converge anywhere near the real
value.  A case seen on x86_64 was an initial estimate of 256<<12, which
converged to 511<<12 where the real value should have been over 630<<12.
This admitedly requires bypassing the TSC calibration (lpj_fine), and a
failure to settle in the direct calibration too, but is physically
possible.  This failure does not depend on my previous calibration
optimisation, but by luck is easy to fix with the optimisation in place
with a trivial retry loop.

In the context of the optimised converging method, as we can no longer
trust the starting estimate, enlarge the search bounds exponentially so
that the number of retries is logarithmically bounded.

[akpm@linux-foundation.org: mention x86_64 SMIs in comment]
Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocalibrate: home in on correct lpj value more quickly
Phil Carmody [Tue, 22 Mar 2011 23:34:13 +0000 (16:34 -0700)]
calibrate: home in on correct lpj value more quickly

Binary chop with a jiffy-resync on each step to find an upper bound is
slow, so just race in a tight-ish loop to find an underestimate.

If done with lots of individual steps, sometimes several hundreds of
iterations would be required, which would impose a significant overhead,
and make the initial estimate very low.  By taking slowly increasing steps
there will be less overhead.

E.g.  an x86_64 2.67GHz could have fitted in 613 individual small delays,
but in reality should have been able to fit in a single delay 644 times
longer, so underestimated by 31 steps.  To reach the equivalent of 644
small delays with the accelerating scheme now requires about 130
iterations, so has <1/4th of the overhead, and can therefore be expected
to underestimate by only 7 steps.

As now we have a better initial estimate we can binary chop over a smaller
range.  With the loop overhead in the initial estimate kept low, and the
step sizes moderate, we won't have under-estimated by much, so chose as
tight a range as we can.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agocalibrate: extract fall-back calculation into own helper
Phil Carmody [Tue, 22 Mar 2011 23:34:12 +0000 (16:34 -0700)]
calibrate: extract fall-back calculation into own helper

The motivation for this patch series is that currently our OMAP calibrates
itself using the trial-and-error binary chop fallback that some other
architectures no longer need to perform.  This is a lengthy process,
taking 0.2s in an environment where boot time is of great interest.

Patch 2/4 has two optimisations.  Firstly, it replaces the initial
repeated- doubling to find the relevant power of 2 with a tight loop that
just does as much as it can in a jiffy.  Secondly, it doesn't binary chop
over an entire power of 2 range, it choses a much smaller range based on
how much it squeezed in, and failed to squeeze in, during the first stage.
 Both are significant optimisations, and bring our calibration down from
23 jiffies to 5, and, in the process, often arrive at a more accurate lpj
value.

The 'bands' and 'sub-logarithmic' growth may look over-engineered, but
they only cost a small level of inaccuracy in the initial guess (for all
architectures) in order to avoid the very large inaccuracies that appeared
during testing (on x86_64 architectures, and presumably others with less
metronomic operation).  Note that due to the existence of the TSC and
other timers, the x86_64 will not typically use this fallback routine, but
I wanted to code defensively, able to cope with all kinds of processor
behaviours and kernel command line options.

Patch 3/4 is an additional trap for the nightmare scenario where the
initial estimate is very inaccurate, possibly due to things like SMIs.
It simply retries with a larger bound.

Stephen said:

I tried this patch set out on an MSM7630.
:
: Before:
:
: Calibrating delay loop... 681.57 BogoMIPS (lpj=3407872)
:
: After:
:
: Calibrating delay loop... 680.75 BogoMIPS (lpj=3403776)
:
: But the really good news is calibration time dropped from ~247ms to ~56ms.
:  Sadly we won't be able to benefit from this should my udelay patches make
: it into ARM because we would be using calibrate_delay_direct() instead (at
: least on machines who choose to).  Can we somehow reapply the logic behind
: this to calibrate_delay_direct()?  That would be even better, but this is
: definitely a boot time improvement.
:
: Or maybe we could just replace calibrate_delay_direct() with this fallback
: calculation?  If __delay() is a thin wrapper around read_current_timer()
: it should work just as well (plus patch 3 makes it handle SMIs).  I'll try
: that out.

This patch:

... so that it can be modified more clinically.

This is almost entirely cosmetic. The only change to the operation
is that the global variable is only set once after the estimation is
completed, rather than taking on all the intermediate values. However,
there are no readers of that variable, so this change is unimportant.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Tested-by: Stephen Boyd <sboyd@codeaurora.org>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agosys_unshare: remove the dead CLONE_THREAD/SIGHAND/VM code
Oleg Nesterov [Tue, 22 Mar 2011 23:34:09 +0000 (16:34 -0700)]
sys_unshare: remove the dead CLONE_THREAD/SIGHAND/VM code

Cleanup: kill the dead code which does nothing but complicates the code
and confuses the reader.

sys_unshare(CLONE_THREAD/SIGHAND/VM) is not really implemented, and I
doubt very much it will ever work.  At least, nobody even tried since the
original 99d1419d96d7df9cfa56 ("unshare system call -v5: system call
handler function") was applied more than 4 years ago.

And the code is not consistent.  unshare_thread() always fails
unconditionally, while unshare_sighand() and unshare_vm() pretend to work
if there is nothing to unshare.

Remove unshare_thread(), unshare_sighand(), unshare_vm() helpers and
related variables and add a simple CLONE_THREAD | CLONE_SIGHAND| CLONE_VM
check into check_unshare_flags().

Also, move the "CLONE_NEWNS needs CLONE_FS" check from
check_unshare_flags() to sys_unshare().  This looks more consistent and
matches the similar do_sysvsem check in sys_unshare().

Note: with or without this patch "atomic_read(mm->mm_users) > 1" can give
a false positive due to get_task_mm().

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Roland McGrath <roland@redhat.com>
Cc: Janak Desai <janak@us.ibm.com>
Cc: Daniel Lezcano <daniel.lezcano@free.fr>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Serge Hallyn <serge.hallyn@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agokernel/cpu.c: fix many errors related to style.
Michael Rodriguez [Tue, 22 Mar 2011 23:34:07 +0000 (16:34 -0700)]
kernel/cpu.c: fix many errors related to style.

Change the printk() calls to have the KERN_INFO/KERN_ERROR stuff, and
fixes other coding style errors.  Not _all_ of them are gone, though.

[akpm@linux-foundation.org: revert the bits I disagree with]
Signed-off-by: Michael Rodriguez <dkingston02@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agosmp: move smp setup functions to kernel/smp.c
Amerigo Wang [Tue, 22 Mar 2011 23:34:06 +0000 (16:34 -0700)]
smp: move smp setup functions to kernel/smp.c

Move setup_nr_cpu_ids(), smp_init() and some other SMP boot parameter
setup functions from init/main.c to kenrel/smp.c, saves some #ifdef
CONFIG_SMP.

Signed-off-by: WANG Cong <amwang@redhat.com>
Cc: Rakib Mullick <rakib.mullick@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tejun Heo <tj@kernel.org>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Akinobu Mita <akinobu.mita@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agoinclude/linux/err.h: add a function to cast error-pointers to a return value
Uwe Kleine-König [Tue, 22 Mar 2011 23:34:05 +0000 (16:34 -0700)]
include/linux/err.h: add a function to cast error-pointers to a return value

PTR_RET() can be used if you have an error-pointer and are only interested
in the eventual error value, but not the pointer.  Yields the usual 0 for
no error, -ESOMETHING otherwise.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agomove x86 specific oops=panic to generic code
Olaf Hering [Tue, 22 Mar 2011 23:34:04 +0000 (16:34 -0700)]
move x86 specific oops=panic to generic code

The oops=panic cmdline option is not x86 specific, move it to generic code.
Update documentation.

Signed-off-by: Olaf Hering <olaf@aepfle.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/misc/pch_phub.c: add MODULE_DEVICE_TABLE
Axel Lin [Tue, 22 Mar 2011 23:34:02 +0000 (16:34 -0700)]
drivers/misc/pch_phub.c: add MODULE_DEVICE_TABLE

The device table is required to load modules based on modaliases.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Masayuki Ohtak <masa-korg@dsn.okisemi.com>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/misc/ep93xx_pwm.c: world-writable sysfs files
Vasiliy Kulikov [Tue, 22 Mar 2011 23:34:01 +0000 (16:34 -0700)]
drivers/misc/ep93xx_pwm.c: world-writable sysfs files

Don't allow everybody to change device settings.

Signed-off-by: Vasiliy Kulikov <segoon@openwall.com>
Acked-by: Hartley Sweeten <hartleys@visionengravers.com>
Cc: Matthieu Crapet <mcrapet@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/misc/atmel_tclib.c: fix a memory leak
Axel Lin [Tue, 22 Mar 2011 23:34:01 +0000 (16:34 -0700)]
drivers/misc/atmel_tclib.c: fix a memory leak

request_mem_region() will call kzalloc to allocate memory for struct
resource.  release_resource() unregisters the resource but does not free
the allocated memory, thus use release_mem_region() instead to fix the
memory leak.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/misc/hmc6352.c: fix wrong return value checking for i2c_master_recv()
Axel Lin [Tue, 22 Mar 2011 23:34:00 +0000 (16:34 -0700)]
drivers/misc/hmc6352.c: fix wrong return value checking for i2c_master_recv()

i2c_master_recv() returns negative errno, or else the number of bytes
read.  Thus i2c_master_recv(client, i2c_data, 2) returns 2 instead of 1 in
success case.

[akpm@linux-foundation.org: make `ret' signed]
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Cc: Kalhan Trisal <kalhan.trisal@intel.com>
Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
13 years agodrivers/misc/apds9802als.c: put the device into runtime suspend after resume()/probe...
Hong Liu [Tue, 22 Mar 2011 23:33:59 +0000 (16:33 -0700)]
drivers/misc/apds9802als.c: put the device into runtime suspend after resume()/probe() is handled

Put the device into runtime suspend after resume()/probe() is handled by
the PM core and the device core code.  No need to manually add them in
each single driver.  And correct the runtime state in remove().

Signed-off-by: Hong Liu <hong.liu@intel.com>
Signed-off-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>