GitHub/MotorolaMobilityLLC/kernel-slsi.git
12 years agoStaging: rtl8187se: r8180_dm.c: Removed spaces before tab stop
Andrew Miller [Thu, 15 Mar 2012 19:05:17 +0000 (15:05 -0400)]
Staging: rtl8187se: r8180_dm.c: Removed spaces before tab stop

Clean up spaces before tab stops and some trailing space to.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vme: fix section mismatches in linux-next 20120314
Gerard Snitselaar [Thu, 15 Mar 2012 08:50:39 +0000 (01:50 -0700)]
staging: vme: fix section mismatches in linux-next 20120314

pio2_gpio_init() annotated with __init, but called by pio2_probe()
which is annotated __devinit. pio2_gpio_exit() is annotated __exit,
but is called by pio2_probe() and by pio2_remove() which is annotated
__devexit.

Signed-off-by: Gerard Snitselaar <dev@snitselaar.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: rtl8187se: r8180_core.c: Fix some long line issues
Andrew Miller [Wed, 14 Mar 2012 22:26:59 +0000 (18:26 -0400)]
Staging: rtl8187se: r8180_core.c: Fix some long line issues

Fix some lines that where fairly long judging off the
code around it.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: rtl8187se: r8180_core.c: Fix some spacing issues
Andrew Miller [Wed, 14 Mar 2012 22:26:58 +0000 (18:26 -0400)]
Staging: rtl8187se: r8180_core.c: Fix some spacing issues

Removed spaces before tabs and
moved while statement in front of '}'

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: rtl8187se: r8180_core.c: Removed trailing spaces
Andrew Miller [Wed, 14 Mar 2012 22:26:57 +0000 (18:26 -0400)]
Staging: rtl8187se: r8180_core.c: Removed trailing spaces

Cleaned up some trailing spaces

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: mei: remove driver internal versioning
Tomas Winkler [Wed, 29 Feb 2012 10:40:30 +0000 (12:40 +0200)]
staging: mei: remove driver internal versioning

There is no need for internal module versioning for in-kernel driver:
remove mei_version.h

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: rtl8187se: r8180_core.c: Cleaned up if statement
Andrew Miller [Wed, 14 Mar 2012 14:36:51 +0000 (10:36 -0400)]
Staging: rtl8187se: r8180_core.c: Cleaned up if statement

clean up the if statement's conditions to make them more
readable

fix the if statement's body indention, one tab stop to many.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan depends on NET
Randy Dunlap [Wed, 14 Mar 2012 17:02:39 +0000 (10:02 -0700)]
staging: ozwpan depends on NET

Fix build errors:  add depends on NET.

ERROR: "skb_clone" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "dev_get_by_name" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "dev_remove_pack" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "init_net" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "__alloc_skb" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "kfree_skb" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "dev_add_pack" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "consume_skb" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "dev_queue_xmit" [drivers/staging/ozwpan/ozwpan.ko] undefined!
ERROR: "skb_put" [drivers/staging/ozwpan/ozwpan.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: added maintainer for ozwpan driver
Chris Kelly [Wed, 14 Mar 2012 10:55:42 +0000 (10:55 +0000)]
staging: ozwpan: added maintainer for ozwpan driver

Added maintainer for staging/ozwpan to MAINTAINERS file.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/mei: propagate error codes up in the write flow
Tomas Winkler [Wed, 14 Mar 2012 12:39:42 +0000 (14:39 +0200)]
staging/mei: propagate error codes up in the write flow

Change mei_write_message's return type from bool to int
to enable propagation of the error code up to caller functions.
The function now returns -EIO when low level write fails and 0
on success.
A similar change is done in intermediate caller functions:
mei_send_flow_control, mei_connect, and mei_disconnect

This makes code more alike to typical Linux kernel error
handling.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers:staging:mei Fix some typos in staging/mei
Justin P. Mattock [Mon, 12 Mar 2012 14:18:09 +0000 (07:18 -0700)]
drivers:staging:mei Fix some typos in staging/mei

The below patch fixes some typos in drivers/staging/mei/* that I have found while
doing a little bit of reading.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: use current time for page-flip event
Rob Clark [Mon, 12 Mar 2012 02:11:22 +0000 (21:11 -0500)]
staging: drm/omap: use current time for page-flip event

Because we don't have vblank hooked up via drm_irq (which is a bit
awkward due to separation between omapdss (which knows the irq #)
and omapdrm, for now use gettimeofday to have a semi-sane timestamp
in the page-flip event.  Otherwise apps like weston drm compositor,
which use the timestamp in it's animations, get highly confused.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: send page-flip event after endwin
Rob Clark [Mon, 12 Mar 2012 02:11:21 +0000 (21:11 -0500)]
staging: drm/omap: send page-flip event after endwin

The endwin irq indicates that DSS has finished scanning out a buffer.
Use this to trigger page-flip event to userspace, so this happens
only *after* the previous buffer is finished.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: avoid multiple planes having same z-order
Rob Clark [Mon, 12 Mar 2012 02:11:20 +0000 (21:11 -0500)]
staging: drm/omap: avoid multiple planes having same z-order

Multiple video pipes on same output with same z-order is an undefined
behavior.  Set a unique z-order value based on overlay number/id.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove nldr_init() and nldr_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:52 +0000 (01:03 +0100)]
staging: tidspbridge: remove nldr_init() and nldr_exit()

The dynamic loader was called by node.c with an interface. This interface was
also modified to avoid the use of nldr_init() and nldr_exit().

There is not functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove ref counting in nldr.c
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:51 +0000 (01:03 +0100)]
staging: tidspbridge: remove ref counting in nldr.c

The nldr module has a nldr_init() and a nldr_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch only removes the reference count variable, but not the
functions, because they are used through an interface.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove gh_init() and gh_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:50 +0000 (01:03 +0100)]
staging: tidspbridge: remove gh_init() and gh_exit()

The gh module has a gh_init() and a gh_exit(), but they don't do
anything, they are just noops.

This patch removes these functions.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: simplify mgr_init()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:49 +0000 (01:03 +0100)]
staging: tidspbridge: simplify mgr_init()

No functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove dev_init() and dev_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:48 +0000 (01:03 +0100)]
staging: tidspbridge: remove dev_init() and dev_exit()

The dev module has a dev_init() and a dev_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove dmm_init() and dmm_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:47 +0000 (01:03 +0100)]
staging: tidspbridge: remove dmm_init() and dmm_exit()

The dmm module has a dmm_init() and a dmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove cmm_init() and cmm_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:46 +0000 (01:03 +0100)]
staging: tidspbridge: remove cmm_init() and cmm_exit()

The cmm module has a cmm_init() and a cmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove io_init() and io_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:45 +0000 (01:03 +0100)]
staging: tidspbridge: remove io_init() and io_exit()

The io module has a io_init() and a io_exit() whose only purpose is to
keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove msg_mod_init() and msg_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:44 +0000 (01:03 +0100)]
staging: tidspbridge: remove msg_mod_init() and msg_exit()

The msg module has a msg_mod_init() and a msg_exit() whose only
purpose is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove chnl_init() and chnl_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:43 +0000 (01:03 +0100)]
staging: tidspbridge: remove chnl_init() and chnl_exit()

The chnl module has a chnl_init() and a chnl_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove rmm_init() and rmm_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:42 +0000 (01:03 +0100)]
staging: tidspbridge: remove rmm_init() and rmm_exit()

The rmm module has a rmm_init() and a rmm_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove strm_init() and strm_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:41 +0000 (01:03 +0100)]
staging: tidspbridge: remove strm_init() and strm_exit()

The strm module has a strm_init() and a strm_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove disp_init() and disp_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:40 +0000 (01:03 +0100)]
staging: tidspbridge: remove disp_init() and disp_exit()

The disp module has a disp_init() and a disp_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove node_init() and node_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:39 +0000 (01:03 +0100)]
staging: tidspbridge: remove node_init() and node_exit()

The node module has a node_init() and a node_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove proc_init() and proc_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:38 +0000 (01:03 +0100)]
staging: tidspbridge: remove proc_init() and proc_exit()

The proc module has a proc_init() and a proc_exit() whose only purpose
is to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove cod_init() and cod_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:37 +0000 (01:03 +0100)]
staging: tidspbridge: remove cod_init() and cod_exit()

The cod module has a cod_init() and a cod_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: remove drv_init() and drv_exit()
Víctor Manuel Jáquez Leal [Fri, 9 Mar 2012 00:03:36 +0000 (01:03 +0100)]
staging: tidspbridge: remove drv_init() and drv_exit()

The drv module has a drv_init() and a drv_exit() whose only purpose is
to keep a reference counting which is not used at all.

This patch removes these functions and the reference count variable.

There is no functional changes.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: android: binder: Fix use-after-free bug
Arve Hjønnevåg [Thu, 8 Mar 2012 23:43:36 +0000 (15:43 -0800)]
Staging: android: binder: Fix use-after-free bug

binder_update_page_range could read freed memory if the vma of the
selected process was freed right before the check that the vma
belongs to the mm struct it just locked.

If the vm_mm pointer in that freed vma struct had also been rewritten
with a value that matched the locked mm struct, then the code would
proceed and possibly modify the freed vma.

Signed-off-by: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ram_console: Fix section mismatches
Stephen Boyd [Thu, 8 Mar 2012 19:41:14 +0000 (11:41 -0800)]
staging: ram_console: Fix section mismatches

WARNING: vmlinux.o(.text+0xfcf6e): Section mismatch in reference
from the function ram_console_driver_probe() to the function
.init.text:persistent_ram_init_ringbuffer()
The function ram_console_driver_probe() references
the function __init persistent_ram_init_ringbuffer().
This is often because ram_console_driver_probe lacks a __init
annotation or the annotation of persistent_ram_init_ringbuffer is
wrong.

Move this driver to platform_driver_probe() because ram console
devices aren't going to be added and removed at runtime. Also
shorten the probe function name since driver is redundant and
makes the function name long.

Cc: Android Kernel Team <kernel-team@android.com>
Cc: John Stultz <john.stultz@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/comedi/drivers fix spelling errors
Alexandru Guduleasa [Fri, 9 Mar 2012 20:29:01 +0000 (22:29 +0200)]
staging/comedi/drivers fix spelling errors

Fix the following spelling errors:
inital -> initial
continous -> continuous
aquisition -> acquisition
aquisitions -> acquisitions
immidiately -> immediately

Signed-off-by: Alexandru Guduleasa <alexandru.guduleasa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: crystalhd: Fix typo in crystalhd_hw.c
Masanari Iida [Thu, 8 Mar 2012 16:06:20 +0000 (01:06 +0900)]
staging: crystalhd: Fix typo in crystalhd_hw.c

Correct spelling "interal" to "internal" in
drivers/staging/crystalhd/crystalhd_hw.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: ram_console: honor dmesg_restrict
Nick Kralevich [Thu, 8 Mar 2012 01:34:38 +0000 (17:34 -0800)]
staging: android: ram_console: honor dmesg_restrict

The Linux kernel has a setting called dmesg_restrict. When true,
only processes with CAP_SYSLOG can view the kernel dmesg logs. This
helps prevent leaking of kernel information into user space.

On Android, it's possible to bypass these restrictions by viewing
/proc/last_kmsg.

This change makes /proc/last_kmsg require the same permissions as
dmesg.

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Nick Kralevich <nnk@google.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: ram_console: fix crash in ram_console_late_init
Colin Cross [Thu, 8 Mar 2012 01:34:37 +0000 (17:34 -0800)]
staging: android: ram_console: fix crash in ram_console_late_init

If the persistent ram buffer is not available, ram_console_late_init
would crash when dereferencing ram_console_zone.  Return early if
ram console was not initialized.

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: persistent_ram: add notrace to persistent_ram_write
Colin Cross [Thu, 8 Mar 2012 01:34:36 +0000 (17:34 -0800)]
staging: android: persistent_ram: add notrace to persistent_ram_write

Add the notrace attribute to persistent_ram_write and the
non-ecc functions that it calls to allow persistent_ram to
be used for ftracing (only when ecc is disabled).

CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: persistent_ram: make persistent_ram_write atomic
Colin Cross [Thu, 8 Mar 2012 01:34:35 +0000 (17:34 -0800)]
staging: android: persistent_ram: make persistent_ram_write atomic

Allow persistent_ram_write to be called on multiple cpus at
the same time, as long as ecc is not in use.  Uses atomics
for the buffer->start and buffer->size counters.

[jstultz: Fix up some pr_info casting issues on 64bit]
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: persistent_ram: handle reserving and mapping memory
Colin Cross [Thu, 8 Mar 2012 01:34:34 +0000 (17:34 -0800)]
staging: android: persistent_ram: handle reserving and mapping memory

Replace the ioremapped memory passed in from the drivers with
a memblock_reserve and vmap.  Adds a new function,
persistent_ram_early_init, designed to be called from the machine
init_early callback, that calls memblock_remove and saves the
provided persistent ram area layout.

Drivers only pass in their struct device * and ecc settings.
Locating and mapping the memory is now handled entirely within
persistent_ram.

Also, convert ram_console to the new persistent_ram_init
parameters that only take a struct device * and ecc settings.

[jstultz: Fix pr_info casting issues on 64bit, folded two
patches as the build breaks if they are apart. Also replaced
phys_to_page() w/ pfn_to_page(addr>>PAGE_SHIFT), as phys_to_page
is only on a few arches.]
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: persistent_ram: refactor ecc support
Colin Cross [Thu, 8 Mar 2012 01:34:33 +0000 (17:34 -0800)]
staging: android: persistent_ram: refactor ecc support

Remove CONFIG_ANDROID_RAM_CONSOLE_ERROR_CORRECTION and related
 #ifdefs.  Also allow persistent ram zones without ecc enabled.
For some use cases, like the data portion of the upcoming
persistent_vars patches, or a persistent ftrace ringbuffer,
ecc on every update is too expensive.

CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: ram_console: split out persistent ram
Colin Cross [Thu, 8 Mar 2012 01:34:32 +0000 (17:34 -0800)]
staging: android: ram_console: split out persistent ram

Split ram_console into two halves.

persistent_ram is a set of apis that handle a block of memory
that does not get erased across a reboot.  It provides functions
to fill it as a single buffer or a ring buffer, and to extract
the old data after a reboot.  It handles ecc on the data to
correct bit errors introduced during reboot.

ram_console is now a small wrapper around persistent_ram that
feeds console data into the ringbuffer, and exports the old
data to /proc/last_kmsg after a reboot.

[jstultz: Moved persistent_ram.h to staging dir]
CC: Greg KH <gregkh@linuxfoundation.org>
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: ram_console: drop verbose ram_console support
Colin Cross [Thu, 8 Mar 2012 01:34:31 +0000 (17:34 -0800)]
staging: android: ram_console: drop verbose ram_console support

Equivalent functionality can be obtained with loglevel=15

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: ram_console: drop early buffer support
Colin Cross [Thu, 8 Mar 2012 01:34:30 +0000 (17:34 -0800)]
staging: android: ram_console: drop early buffer support

Early ramconsole is not very useful, an early crash will prevent
getting the logged data out on the next boot, and CONFIG_DEBUG_LL=y
will get the same information.  Drop it to simplify a future
refactoring.

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: ram_console: move footer strings
Colin Cross [Thu, 8 Mar 2012 01:34:29 +0000 (17:34 -0800)]
staging: android: ram_console: move footer strings

Don't store the bootinfo string and the ecc status string with
the recovered old log data.  This will simplify refactoring the
persistent ram code out of the ram console code later.

CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: ram_console: set CON_ANYTIME console flag
Dima Zavin [Thu, 8 Mar 2012 01:34:28 +0000 (17:34 -0800)]
staging: android: ram_console: set CON_ANYTIME console flag

We want to ensure that we get all the console messages, even ones
that occur while the printing CPU is not yet online.

[jstultz: tweaked commit subject line]
CC: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Dima Zavin <dima@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/mei: don't use read buffer for writing
Tomas Winkler [Tue, 6 Mar 2012 20:34:32 +0000 (22:34 +0200)]
staging/mei: don't use read buffer for writing

In mei_irq_thread_read_bus_message we reused mei_hdr
allocated on read buffer to write the stop message.
There is no bug associated with this but for code
clarity we use write buffer also for message header.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: mmap of tiled buffers with stride >4kb
Rob Clark [Mon, 5 Mar 2012 16:48:40 +0000 (10:48 -0600)]
staging: drm/omap: mmap of tiled buffers with stride >4kb

Deal with the case of buffers with virtual stride larger than one
page in fault_2d().

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: Get DMM resources from hwmod
Andy Gross [Mon, 5 Mar 2012 16:48:39 +0000 (10:48 -0600)]
staging: drm/omap: Get DMM resources from hwmod

This patch splits the DMM off into a separate sub-device, in order to
utilize the platform device information that was created as part of
the OMAP hwmod entry for the DMM.

The driver probe function queries the iomem resource and IRQ using
standard platform_get functions.

The OMAP DRM driver now calls the platform_driver_register() function
for the subordinate DMM driver inside its probe function.  This
guarantees the required order for the DMM and ensures the DMM resources
are available for use by the DRM driver.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: Validate debugfs device
Andy Gross [Mon, 5 Mar 2012 16:48:38 +0000 (10:48 -0600)]
staging: drm/omap: Validate debugfs device

Added check for valid device information before dumping debugfs
information.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: Disable DMM debugfs for OMAP3
Andy Gross [Mon, 5 Mar 2012 16:48:37 +0000 (10:48 -0600)]
staging: drm/omap: Disable DMM debugfs for OMAP3

OMAP3 does not contain a DMM/Tiler block.  As such, we should not
be exposing any DMM debugfs entries on OMAP3 platforms.

Added inline helper function to verify existence of DMM.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: debugfs for object and fb tracking
Rob Clark [Mon, 5 Mar 2012 16:48:36 +0000 (10:48 -0600)]
staging: drm/omap: debugfs for object and fb tracking

Add some additional debugfs file to aid in tracking buffer usage.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: defer unpin until scanout completes
Rob Clark [Mon, 5 Mar 2012 16:48:35 +0000 (10:48 -0600)]
staging: drm/omap: defer unpin until scanout completes

When flipping, defer unpinning until scanout completes, as indicated
by the appropriate END_WIN irq.

This also re-organizes things a bit, in replacing omap_fb_{pin,unpin}
with omap_fb_replace(), to make it easier to add support for scanout
synchronized DMM refill mode (flipping by just reprogramming DMM
synchronized with DSS scanout).

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: some minor fb cleanups
Rob Clark [Mon, 5 Mar 2012 16:48:34 +0000 (10:48 -0600)]
staging: drm/omap: some minor fb cleanups

Now that 'struct drm_plane' has a pixel_format field, use that.  And
fix a minor typo.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: call omap_gem_roll() in non-atomic ctx
Rob Clark [Mon, 5 Mar 2012 16:48:33 +0000 (10:48 -0600)]
staging: drm/omap: call omap_gem_roll() in non-atomic ctx

If fbcon calls us from atomic context, push the work off to the
workqueue to avoid calling into the gem/dmm code in an atomic
context.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: add a workqueue
Rob Clark [Mon, 5 Mar 2012 16:48:32 +0000 (10:48 -0600)]
staging: drm/omap: add a workqueue

Add a workqueue for omapdrm driver, which is needed for at least a
couple things currently: (1) moving omap_gem_roll() to a non-atomic
context, (2) synchronizing page flips w/ DSS scanout related irq's
(in particular not unmapping previous buffer until DSS finishes
scanout).

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: get supported color formats from ovl
Rob Clark [Mon, 5 Mar 2012 16:48:31 +0000 (10:48 -0600)]
staging: drm/omap: get supported color formats from ovl

Get the supported formats for a plane from ovl's supported_modes
bitmask.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:tsl2563 rewrite probe error handling
Grant Grundler [Mon, 5 Mar 2012 17:15:59 +0000 (09:15 -0800)]
staging:iio:tsl2563 rewrite probe error handling

tsl2563 probe function has two minor issues with it's error handling paths:
1) it is silent (did not report errors to dmesg)
2) did not return failure code (mixed up use of ret and err)

and two major issues:
3) goto fail2 would corrupt a free memory pool ("double free")
4) device registration failure did NOT cancel/flush delayed work.
   (and thus dereference a freed data structure later)

The "double free" is subtle and was introduced with this change:
    Author: Jonathan Cameron <jic23@cam.ac.uk>
    Date:   Mon Apr 18 12:58:55 2011 +0100
    staging:iio:tsl2563 take advantage of new iio_device_allocate private data.

Originally, chip was allocated seperately. Now it's appended to the
indio_dev by iio_allocate_device(sizeof(*chip)). So we only need one
kfree call as well (in iio_free_device()).

Gory details of tracking this down are here:
   http://crosbug.com/26819

Despite iio_device_registration failing, system can at least now boot.
Will follow up with a fix to "double register : in_intensity_both_raw"
error that is included in the bug report.

Signed-off-by: Grant Grundler <grundler@chromium.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Reviewed-by: Benson Leung <bleung@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: r8712u: Fix Smatch warning
Larry Finger [Sat, 3 Mar 2012 03:06:49 +0000 (21:06 -0600)]
staging: r8712u: Fix Smatch warning

The patch 2080913e017a: "staging: r8712u: Fix regression caused by
commit 8c213fa" from Feb 25, 2012, leads to the following Smatch
complaint:

drivers/staging/rtl8712/usb_intf.c:629 r871xu_dev_remove()
 warn: variable dereferenced before check 'padapter' (see line 625)

The fix is to move the new statements inside the block where padapter
is not NULL.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: remove SPARSEMEM dep from Kconfig
Seth Jennings [Mon, 5 Mar 2012 17:33:24 +0000 (11:33 -0600)]
staging: zsmalloc: remove SPARSEMEM dep from Kconfig

This patch removes the SPARSEMEM from the zsmalloc
Kconfig

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: change ZS_MIN_ALLOC_SIZE
Seth Jennings [Mon, 5 Mar 2012 17:33:23 +0000 (11:33 -0600)]
staging: zsmalloc: change ZS_MIN_ALLOC_SIZE

This patch ensures that the value of ZS_MIN_ALLOC_SIZE, for the
PAGE_SIZE and MAX_PHYSMEM_BITS on the system, allows for all
possible object ids in the lowest storage class to be encoded
in the object handle.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: calculate MAX_PHYSMEM_BITS if not defined
Seth Jennings [Mon, 5 Mar 2012 17:33:22 +0000 (11:33 -0600)]
staging: zsmalloc: calculate MAX_PHYSMEM_BITS if not defined

This patch provides a way to determine or "set a
reasonable value for" MAX_PHYSMEM_BITS in the case that
it is not defined (i.e. !SPARSEMEM)

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: add ZS_MAX_PAGES_PER_ZSPAGE
Seth Jennings [Mon, 5 Mar 2012 17:33:21 +0000 (11:33 -0600)]
staging: zsmalloc: add ZS_MAX_PAGES_PER_ZSPAGE

This patch moves where max_zspage_order is declared and
changes its meaning.  "Order" typically implies 2^order
of something; however, it is currently being used as the
"maximum number of single pages in a zspage".  To add clarity,
ZS_MAX_ZSPAGE_ORDER is now used to calculate ZS_MAX_PAGES_PER_ZSPAGE,
which is 2^ZS_MAX_ZSPAGE_ORDER and is the upper bound on the number
of pages in a zspage.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zsmalloc: move object/handle masking defines
Seth Jennings [Mon, 5 Mar 2012 17:33:20 +0000 (11:33 -0600)]
staging: zsmalloc: move object/handle masking defines

This patch moves the definitions of _PFN_BITS, OBJ_INDEX_BITS
and OBJ_INDEX_MASK from zsmalloc-main.c to zsmalloc_int.h

They will be needed to determine ZS_MIN_ALLOC_SIZE in the next
patch

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: make zcache builtin only
Seth Jennings [Mon, 5 Mar 2012 16:46:38 +0000 (10:46 -0600)]
staging: zcache: make zcache builtin only

zcache cannot currently be loaded as a module.  However
the Kconfig allows it to be built as a module; something that
the user probably does not intend since the module is not
loadable.

This patch switches zcache from a tristate to a bool in the Kconfig

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Fix compile error without CONFIG_DEBUG_FS
Lars-Peter Clausen [Tue, 6 Mar 2012 19:43:45 +0000 (20:43 +0100)]
staging:iio: Fix compile error without CONFIG_DEBUG_FS

commit e553f182d ("staging: iio: core: Introduce debugfs support, add support
for direct register access") added a '#if defined(CONFIG_DEBUG_FS)' around
iio_read_channel_ext_info and iio_write_channel_ext_info causing the following
compile error if CONFIG_DEBUG_FS is not defined.

drivers/staging/iio/industrialio-core.c:621:11: error: 'iio_read_channel_ext_info' undeclared (first use in this function)
drivers/staging/iio/industrialio-core.c:623:11: error: 'iio_write_channel_ext_info' undeclared (first use in this function)

This patch fixes the issue by moving the functions out of the '#if
defined(CONFIG_DEBUG_FS)' section again.

Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: android: lowmemorykiller.c
Greg Kroah-Hartman [Wed, 7 Mar 2012 21:21:23 +0000 (13:21 -0800)]
Staging: android: lowmemorykiller.c

Fix compiler warning about the type of the module parameter.

Cc: San Mehat <san@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android/lowmemorykiller: Don't unregister notifier from atomic context
Paul E. McKenney [Wed, 7 Mar 2012 13:54:00 +0000 (17:54 +0400)]
staging: android/lowmemorykiller: Don't unregister notifier from atomic context

The lowmemorykiller registers an atomic notifier for notfication of when
the task is freed.  From this atomic notifier callback, it removes the
atomic notifier via task_free_unregister().  This is incorrect because
atomic_notifier_chain_unregister() calls syncronize_rcu(), which can
sleep, which shouldn't be done from an atomic notifier.

Fix this by registering the notifier during init, and only unregister it
if the lowmemorykiller is unloaded.

Rebased to -next by Paul E. McKenney.
Rebased to -next again by Anton Vorontsov.

Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Christian Bejram <christian.bejram@stericsson.com>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Reported-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging:android: Change type for binder_debug_no_lock switch to bool
Zhengwang Ruan [Wed, 7 Mar 2012 02:36:57 +0000 (10:36 +0800)]
Staging:android: Change type for binder_debug_no_lock switch to bool

GCC warns that module_param_named() indirectly returns a bool type value
which is different from 'int' type binder_debug_no_lock declared. Change
it to bool because it is a internal switch for debugging.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: remove debug allocator
Greg Kroah-Hartman [Sat, 3 Mar 2012 00:51:09 +0000 (16:51 -0800)]
staging: ozwpan: remove debug allocator

The kernel already has a debug allocator, no need to have one unique to
a single driver.  So delete it, replace with kfree, kmalloc, and, in a
few places that need it, kzalloc().

Cc: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: fix possible memory leak of 'pstAddIndication' in CmHost.c and removes...
Kevin McKinney [Fri, 2 Mar 2012 05:17:04 +0000 (00:17 -0500)]
Staging: bcm: fix possible memory leak of 'pstAddIndication' in CmHost.c and removes a whitespace

Memory is being allocated by kmalloc and stored in
variable pstAddIndication.  However, this memory is
not being freed in all cases. Therefore, this patch
frees it on several exit paths. This patch also
removes a whitespace.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: rtl8712/rtl8192u: move USB device ID within staging drivers.
Martin Krause [Fri, 2 Mar 2012 12:01:40 +0000 (13:01 +0100)]
Staging: rtl8712/rtl8192u: move USB device ID within staging drivers.

It seems the USB device ID 0bda:8192 is wrongly assigned to the
RTL8192SU chip and not to the RTL8191SU chip in the USB database.
So this patch moves this device ID from the rtl8192u staging
driver to the rtl8712 staging driver.

This patch was tested with a Radicom WIFIHU embedded wireless
module with a RTL8191SU chip and the USB device ID 0bda:8192.
Without the patch the rtl8192u driver claims this device, but
it does not work. With the patch the rtl8712 driver services
this device and it works.

Signed-off-by: Martin Krause <martin.krause@tqs.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging rtl8712: Remove double USB device IDs
Martin Krause [Fri, 2 Mar 2012 12:00:14 +0000 (13:00 +0100)]
Staging rtl8712: Remove double USB device IDs

Remove copies of the double USB device IDs:

- 0bda:8172
- 0bda:8174

Signed-off-by: Martin Krause <martin.krause@tqs.de>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: Convert platform_drivers to use module_platform_driver
Michael Hennerich [Thu, 1 Mar 2012 09:51:05 +0000 (10:51 +0100)]
staging: iio: Convert platform_drivers to use module_platform_driver

No functional changes.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: core: Avoid NULL pointer de-ref in case indio_dev->setup_ops are not...
Michael Hennerich [Thu, 1 Mar 2012 09:51:04 +0000 (10:51 +0100)]
staging: iio: core: Avoid NULL pointer de-ref in case indio_dev->setup_ops are not in use

Drivers may not need setup_ops at all, so let the core supply
some empty ops.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: core: Introduce debugfs support, add support for direct register access
Michael Hennerich [Thu, 1 Mar 2012 09:51:03 +0000 (10:51 +0100)]
staging: iio: core: Introduce debugfs support, add support for direct register access

Changes since V1:

Exclude iio debugfs code in case CONFIG_DEBUG_FS isn't enabled.
Introduce helper function iio_get_debugfs_dentry.
Document additions to struct iio_dev

iio_debugfs_read_reg:
Use snprintf.
Use a shorter fixed length.
Introduce len instead of pointer math.

iio_debugfs_write_reg:
Fix return value use PT_ERR.

Changes since V2:

Use debugfs_remove.
Fix whitespace damage.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers:staging:iio Fix typos and comments in staging iio.
Justin P. Mattock [Thu, 1 Mar 2012 06:00:38 +0000 (22:00 -0800)]
drivers:staging:iio Fix typos and comments in staging iio.

The below patch fixes some comments and some typos that I have found
while reading drivers/staging/iio/*

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ozwpan: prevent bogus dereference
Dan Carpenter [Fri, 2 Mar 2012 06:59:55 +0000 (09:59 +0300)]
Staging: ozwpan: prevent bogus dereference

app_id comes from the network and can't be trusted.  If it's zero then
it will lead to a kernel crash.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: added TODO file.
Chris Kelly [Fri, 2 Mar 2012 11:57:16 +0000 (11:57 +0000)]
staging: ozwpan: added TODO file.

Added TODO file for ozwpan driver.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: r8712u: Fix regression in signal level after commit c6dc001
Larry Finger [Mon, 27 Feb 2012 04:08:36 +0000 (22:08 -0600)]
staging: r8712u: Fix regression in signal level after commit c6dc001

In commit c6dc001 "staging: r8712u: Merging Realtek's latest (v2.6.6).
Various fixes", the returned qual.qual member of the iw_statistics
struct was changed. For strong signals, this change made no difference;
however for medium and weak signals it results in a low signal that
shows considerable fluctuation, When using wicd for a medium-strength
AP, the value reported in the status line is reduced from 100% to 60% by
this bug.

This problem is reported in https://bugzilla.kernel.org/show_bug.cgi?id=42826.

Reported-and-tested-by: Robert Crawford <wrc1944@gmail.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: r8712u: Fix regression caused by commit 8c213fa
Larry Finger [Sun, 26 Feb 2012 00:10:21 +0000 (18:10 -0600)]
staging: r8712u: Fix regression caused by commit 8c213fa

In commit 8c213fa "staging: r8712u: Use asynchronous firmware loading",
the command to release the firmware was placed in the wrong routine.

In combination with the bug introduced in commit a5ee652 "staging: r8712u:
Interface-state not fully tracked", the driver attempts to upload firmware
that had already been released. This bug is the source of one of the
problems in https://bugs.archlinux.org/task/27996#comment89833.

Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com>
Tested-by: Adrian <agib@gmx.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: r8712u: Fix regression introduced by commit a5ee652
Larry Finger [Sun, 26 Feb 2012 00:10:20 +0000 (18:10 -0600)]
staging: r8712u: Fix regression introduced by commit a5ee652

In commit a5ee652 "staging: r8712u: Interface-state not fully tracked",
the private boolean "bup" was set false when the interface was brought down,
as that seemed appropriate. This change has not caused any problems when
using NetworkManager or manual control of the device; however, when wicd
control is used, there is a locking problem in wpa_supplicant, as shown in
https://bugzilla.kernel.org/show_bug.cgi?id=42818.

This fix reverts the only code change in commit a5ee652. My
analysis is that "bup" is badly named. In its present form, it
seems to indicate the up/down state of the device, but its usage
is more consistent with an initialized/uninitialized state. That
problem will be addressed in a later patch.

Note: Commit 8c213fa, which introdued asynchronous firmware loading
for this driver, exposed this bug to a greater extent. That bug
is addressed in the next patch in this series.

This bug is also responsible for the bug in
https://bugzilla.kernel.org/show_bug.cgi?id=42815. and this bug is
also part of the problems discussed at https://bugs.archlinux.org/task/27996#comment89950.

Tested-by: Alberto Lago Ballesteros <saniukeokusainaya@gmail.com>
Tested-by: Adrian <agib@gmx.de>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@vger.kernel.org> [3.2+]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: wlan-ng: still setting wrong data
Dan Carpenter [Tue, 28 Feb 2012 08:21:46 +0000 (11:21 +0300)]
Staging: wlan-ng: still setting wrong data

In commit 1ca1a92cc6 "Staging: wlan-ng: memsetting the wrong amount of
data" I changed the code so we didn't memset() past the end of the
msg1.bssid.data[] array.  Walter Harms noticed that it was weird that
we were setting the len to 6 when there were 7 elements in the array.
Pavel Roskin pointed out that the intent of the code was actually to
memset() msg1.bssid.data.data[] which is a 6 character array.

Reported-by: Walter Harms <wharms@bfs.de>
Reported-by: Pavel Roskin <proski@gnu.org>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: crystalhd: Remove unused header bc_dts_types.h
Jorgyano Vieira [Sun, 26 Feb 2012 02:19:11 +0000 (23:19 -0300)]
Staging: crystalhd: Remove unused header bc_dts_types.h

The header bc_dts_types is not used, so we can remove it.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: crystalhd: Replace the local includes with global header
Jorgyano Vieira [Sat, 25 Feb 2012 23:58:21 +0000 (21:58 -0200)]
Staging: crystalhd: Replace the local includes with global header

This patch replaces the local includes with the global header.
So the the crystalhd.h will be the only header included by the other files.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: crystalhd: Add global header
Jorgyano Vieira [Sat, 25 Feb 2012 23:55:10 +0000 (21:55 -0200)]
Staging: crystalhd: Add global header

In the crystalhd_cmds.h there was a struct dependence bug:
the struct crystalhd_adp (which  is declared on crystalhd_lnx.h)
is used on  the crystalhd_cmd struct, however the crystalhd_lnx.h is
never included on crystalhd_cmds.h at all. Including the
crystalhd_lnx.h on crystalhd_cmds.h breaks the build,
many dependencies error occurrs, most of the type
"error: 'struct bar' has no member named 'foo'",
so I decided to reorganize the headers by adding a global header.

The gobal header crystalhd.h includes all the local headers.
The idea is that the crystalhd header will be the only included
by the others files, this will avoid the mess of many #include levels.

The order of the headers included by crystalhd.h considers the
dependencies among the headers.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: media: lirc: lirc_sasem.c: fixed long line coding style issue
Andrew Miller [Wed, 29 Feb 2012 22:10:08 +0000 (17:10 -0500)]
Staging: media: lirc: lirc_sasem.c: fixed long line coding style issue

Fixed some coding style issues.

Signed-off-by: Andrew Miller <amiller@amilx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: android: timed_gpio: Removed spaces before tabs
Johannes Thumshirn [Sat, 25 Feb 2012 14:51:13 +0000 (15:51 +0100)]
Staging: android: timed_gpio: Removed spaces before tabs

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: asus_oled: Remove superfluous loop
Peter Huewe [Sat, 25 Feb 2012 00:19:41 +0000 (01:19 +0100)]
staging: asus_oled: Remove superfluous loop

This patch removes a superfluous loop in asus_oled.c
The code is equivalent to do{...} while (0) and thus executes the code
exactly once -> so we can simply remove the loop.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: mei: kill struct hbm_cmd bit fields
Tomas Winkler [Sun, 26 Feb 2012 21:18:57 +0000 (23:18 +0200)]
staging: mei: kill struct hbm_cmd bit fields

Replace bitfield struct hbm_cmd with simple u8 as we
always access the value as whole. This allows us to remove
few ugly type casts
For possible further uses and documentation purposes we add
corresponding bitmask defines

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: mei: fix typo in error code return
Devin J. Pohly [Mon, 27 Feb 2012 18:32:53 +0000 (20:32 +0200)]
staging: mei: fix typo in error code return

~ENODEV is a different number than -ENODEV

Signed-off-by: Devin J. Pohly <djpohly@gmail.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge branch 'work-next' into staging-next
Greg Kroah-Hartman [Wed, 29 Feb 2012 23:24:04 +0000 (15:24 -0800)]
Merge branch 'work-next' into staging-next

12 years agostaging: zcache: fix memory corruption bug
Seth Jennings [Tue, 28 Feb 2012 22:02:23 +0000 (16:02 -0600)]
staging: zcache: fix memory corruption bug

This patch fixes a bug where the zv code writes before the allocated
buffer, resulting in system memory corruption. This was introduced
during the switch from xvmalloc to zsmalloc.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: fix length type mismatch
Seth Jennings [Tue, 28 Feb 2012 22:01:37 +0000 (16:01 -0600)]
staging: zcache: fix length type mismatch

This fixes a type mismatch in the compression code where
a size_t pointer was cast to a unsigned int pointer.  On
little endian archs, there is no issue.  However on big
endian archs, the value is incorrect, taking the high
order bits and truncating the lower order bits.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: Reduced size of oz_evtlist structure.
Chris Kelly [Wed, 29 Feb 2012 16:39:57 +0000 (16:39 +0000)]
staging: ozwpan: Reduced size of oz_evtlist structure.

This structure is used in an ioctl definition and was causing the
64-bit PowerPC build to fail. The size of the array in the structure
has been reduced to fix this.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: core: constitfy available_scan_mask
Michael Hennerich [Wed, 22 Feb 2012 12:16:49 +0000 (13:16 +0100)]
iio: core: constitfy available_scan_mask

The core must not modify available_scan_mask, because it causes problems
with drivers where multiple instances of the driver share the same mask set.
So make this explicit by marking available scan masks as const.

The max1363 driver needs some minor adjustment to accommodate this change.
Pull scan mask allocation into a separate function.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: Remove declaration for non existing function
Lars-Peter Clausen [Tue, 21 Feb 2012 17:53:39 +0000 (18:53 +0100)]
staging:iio: Remove declaration for non existing function

The declaration for iio_buffer_deinit has been around for quite some time, but
the function itself has never been added. So remove the declaration.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:dac:ad5064: Add AD5666 support
Lars-Peter Clausen [Tue, 21 Feb 2012 17:38:17 +0000 (18:38 +0100)]
staging:iio:dac:ad5064: Add AD5666 support

The AD5666 is identical to the ad5064-1, except that it has a internal reference
voltage.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:dac:ad5064: Add AD5628/AD5648/AD5668 support
Lars-Peter Clausen [Tue, 21 Feb 2012 17:38:16 +0000 (18:38 +0100)]
staging:iio:dac:ad5064: Add AD5628/AD5648/AD5668 support

The AD5628/AD5648/AD5668 are similar to the AD5024/AD5044/AD5064. The difference
being that they have an internal reference voltage and 8 instead of 4 DAC
channels.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:dac:ad5064: Add AD5025/AD5045/AD5065 support
Lars-Peter Clausen [Tue, 21 Feb 2012 17:38:15 +0000 (18:38 +0100)]
staging:iio:dac:ad5064: Add AD5025/AD5045/AD5065 support

The AD5025/AD5045/AD5065 are identical to the AD5024/AD5044/AD5064 except that
they have 2 instead of 4 DAC channels.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>