]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
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>
12 years agostaging:iio:dac:ad5064: Prepare driver for the addition of chip variants
Lars-Peter Clausen [Tue, 21 Feb 2012 17:38:14 +0000 (18:38 +0100)]
staging:iio:dac:ad5064: Prepare driver for the addition of chip variants

Prepare the driver for the addition of chip variants with a different number of
channels. This is done by not hard-coding the number of channels, but instead
add a field to the chip info struct holding the number of channels. Also do not
embed the channel specs into the chip info, but rather store them independently.
This allows sharing the same channel spec between different chip infos.

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: Convert to extended channel info attributes
Lars-Peter Clausen [Tue, 21 Feb 2012 17:38:13 +0000 (18:38 +0100)]
staging:iio:dac:ad5064: Convert to extended channel info attributes

Use extended channel info attributes for the powerdown, powerdown_mode and
powerdown_mode_available attributes.

Note that this patch moves the chip info defintion around to avoid having to use
forward declarations for the extended channel info attributes callbacks.

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: Add extended IIO channel info
Lars-Peter Clausen [Tue, 21 Feb 2012 17:38:12 +0000 (18:38 +0100)]
staging:iio: Add extended IIO channel info

Sometimes devices have per channel properties which either do not map nicely to
the current channel info scheme (e.g. string properties) or are very device
specific, so it does not make sense to add generic support for them.

Currently drivers define these attributes by hand for each channel. Depending on
the number of channels this can amount to quite a few lines of boilerplate code.
Especially if a driver supports multiple variations of a chip with different
numbers of channels. In this case it becomes necessary to have a individual
attribute list per chip variation and also a individual iio_info struct.

This patch introduces a new scheme for handling such per channel attributes
called extended channel info attributes. A extended channel info attribute
consist of a name, a flag whether it is shared and read and write callbacks.
The read and write callbacks are similar to the {read,write}_raw callbacks and
take a IIO device and a channel as their first parameters, but instead of
pre-parsed integer values they directly get passed the raw string value, which
has been written to the sysfs file.

It is possible to assign a list of extended channel info attributes to a
channel. For each extended channel info attribute the IIO core will create a new
sysfs attribute conforming to the IIO channel naming spec for the channels type,
similar as for normal info attributes. Read and write access to this sysfs
attribute will be redirected to the extended channel info attributes read and
write callbacks.

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: Convert remaining drivers to module_spi_driver
Lars-Peter Clausen [Mon, 20 Feb 2012 18:42:38 +0000 (19:42 +0100)]
staging:iio: Convert remaining drivers to module_spi_driver

Convert the IIO drivers which have not been converted yet to module_spi_driver.

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: Use dev_pm_ops
Lars-Peter Clausen [Mon, 20 Feb 2012 18:37:05 +0000 (19:37 +0100)]
staging:iio: Use dev_pm_ops

Use dev_pm_ops instead of legacy suspend/resume callbacks for IIO drivers.

Note that this patch introduces a few new #ifdef CONFIG_PM_SLEEP around the
suspend and resume callbacks to avoid warnings of unused functions if
CONFIG_PM_SLEEP is not defined.

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:Documentation in kernel pull description.
Jonathan Cameron [Wed, 15 Feb 2012 19:48:04 +0000 (19:48 +0000)]
staging:iio:Documentation in kernel pull description.

Very basic description of the way iio consumers work and how to use
this functionality.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio::hwmon interface client driver.
Jonathan Cameron [Wed, 15 Feb 2012 19:48:03 +0000 (19:48 +0000)]
staging:iio::hwmon interface client driver.

Direct copy of version proposed for the non staging branch.
Needed here to allow testing of more advanced inkernel
interface code.

Minimal support of simple in, curr and temp attributes
so far.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio: move iio data return types into types.h for use by inkern
Jonathan Cameron [Wed, 15 Feb 2012 19:48:02 +0000 (19:48 +0000)]
staging:iio: move iio data return types into types.h for use by inkern

In kernel interfaces need these, so make them available.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:core add in kernel interface mapping and getting IIO channels.
Jonathan Cameron [Wed, 15 Feb 2012 19:48:01 +0000 (19:48 +0000)]
staging:iio:core add in kernel interface mapping and getting IIO channels.

Lifted from proposal for in kernel interface built on the out of staging
branch.

Two elements here:
* Map as defined in "inkern.h"
* Matching code to actually get the iio_dev and channel
that we want from the global list of IIO devices.
V4: Everything now built if iio is built (rather than being optional)
    Removal race condition prevented by using info pointer as a check
    of removal under a lock.
V3: Drop the option of registering / getting channels using dev pointer.
Stick to name only as suggested by Mark Brown (this has caused user
confusion in the regulator framework.)
V2: As per Greg KH suggestion, move over to registration by passing
the tables into the provider drivers (how regulator does it).
This does not prevent us using the original more flexible approach
if at a later date there is a usecase that demands it.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:core set the iio_dev.info pointer to null on unregister under lock.
Jonathan Cameron [Wed, 15 Feb 2012 19:48:00 +0000 (19:48 +0000)]
staging:iio:core set the iio_dev.info pointer to null on unregister under lock.

This prevents use of provider callbacks after it has been unregistered.
Note that all code using this that can be called from a consumer *must*
check the pointer before using and hold the info_exist_lock throughout
the usage of the callbacks in info.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: detect wdt3 feature at runtime
Omar Ramirez Luna [Wed, 22 Feb 2012 02:46:21 +0000 (20:46 -0600)]
staging: tidspbridge: detect wdt3 feature at runtime

In order to detect WDT feature on the dsp code, we need to
find the symbol used to enable it inside the baseimage.

This should fix the warning comming from L3 driver:

    WARNING: at arch/arm/mach-omap2/omap_l3_smx.c:161 omap3_l3_app_irq...
    In-band Error seen by IVA_SS  at address 0
    ...

That occurs because the dsp tries to access wdt3 registers when the clock
for those registers is not enabled.

Reported-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: tidspbridge: always compile dsp wdt code
Omar Ramirez Luna [Wed, 22 Feb 2012 02:46:20 +0000 (20:46 -0600)]
staging: tidspbridge: always compile dsp wdt code

In order to detect it at runtime, we need the code handling wdt
clock available at runtime to decide whether to enable or disable
based on the baseimage symbols. Default timeout has been set to 5
seconds.

Downside is that we will lose the option to set a custom timeout
for overflow, but than can be added (if needed) as part of debugfs.

Signed-off-by: Omar Ramirez <omar.ramirez@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: Fix typo in unioxx5.c
Masanari Iida [Mon, 20 Feb 2012 14:31:30 +0000 (23:31 +0900)]
staging: Fix typo in unioxx5.c

Correct spelling "erorr" to "error" in
drivers/stating/comedi/drivers/unioxx5.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: Fix typo in bssdb.c
Masanari Iida [Mon, 20 Feb 2012 14:31:31 +0000 (23:31 +0900)]
staging: Fix typo in bssdb.c

Correct spelling "scaning" to "scanning" in
drivers/staging/vt6656/bssdb.c
drivers/staging/vt6655/bssdb.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/octeon: Fix PHY binding in octeon-ethernet driver.
David Daney [Thu, 23 Feb 2012 19:19:31 +0000 (11:19 -0800)]
staging/octeon: Fix PHY binding in octeon-ethernet driver.

Commit d6c25be (mdio-octeon: use an unique MDIO bus name.) changed the
names used to refer to MDIO buses.  The ethernet driver must be
changed to match, so that the PHY drivers can be attached.

Signed-off-by: David Daney <david.daney@cavium.com>
Acked-by: Florian Fainelli <florian@openwrt.org>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: logger: hold mutex while removing reader
Rabin Vincent [Wed, 22 Feb 2012 10:28:00 +0000 (15:58 +0530)]
staging: logger: hold mutex while removing reader

The readers list is traversed under the log->mutex lock
(for example from fix_up_readers()), but the deletion of
elements from this list is not being done under this lock.

Cc: Brian Swetland <swetland@google.com>
Cc: Dima Zavin <dima@android.com>
Signed-off-by: Rabin Vincent <rabin.vincent@stericsson.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: Update TODO for rts5139 and rts_pstor
Chris Ball [Tue, 21 Feb 2012 21:40:41 +0000 (16:40 -0500)]
staging: Update TODO for rts5139 and rts_pstor

These are each >20k LOC drivers that embed an entire SD stack, and present
SD cards as if they were SCSI devices; both drivers should be rewritten to
be small hooks that connect the PCI (for rts_pstor) or USB (for rts5139)
hardware into Linux's MMC/xD/memorystick stacks.

Signed-off-by: Chris Ball <cjb@laptop.org>
Cc: edwin_rong <edwin_rong@realsil.com.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: wlan-ng: memsetting the wrong amount of data
Dan Carpenter [Tue, 21 Feb 2012 14:18:38 +0000 (17:18 +0300)]
Staging: wlan-ng: memsetting the wrong amount of data

p80211item_pstr6_t is the size of "msg1.bssid" (16 bytes) but
msg1.bssid.data is type p80211pstr6_t and it is smaller (7 bytes).  We
had just set that memory to zeroes earlier and now we're writing over it
with 0xff because we're writing past the end of the struct.

I don't know if this actually causes a problem.  It may be that we
initialize the extra 0xff bytes correctly later.  But the current code
is obviously wrong and we should fix it.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: et131x: unify return value of .ndo_set_mac_address if address is invalid
Danny Kukawka [Tue, 21 Feb 2012 12:07:51 +0000 (13:07 +0100)]
Staging: et131x: unify return value of .ndo_set_mac_address if address is invalid

Unify return value of .ndo_set_mac_address if the given address
isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does
if is_valid_ether_addr() fails.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: frontier: Fix checkpatch.pl issue.
Hitoshi NAKAMORI [Tue, 21 Feb 2012 06:31:04 +0000 (15:31 +0900)]
Staging: frontier: Fix checkpatch.pl issue.

This is a patch to the alphatrack.c and tranzport.c  that fixes up an error
found by checkpatch.pl tool.

Signed-off-by: Hitoshi Nakamori <hitoshi.nakamori@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agodrivers:staging:et131x Fix some typo's in staging et131x.
Justin P. Mattock [Tue, 21 Feb 2012 02:23:09 +0000 (18:23 -0800)]
drivers:staging:et131x Fix some typo's in staging et131x.

The below patch fixes some comments with typos in the them and makes a comment make more sense.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: zcache: avoid AB-BA deadlock condition
Andrea Righi [Mon, 20 Feb 2012 12:11:49 +0000 (13:11 +0100)]
staging: zcache: avoid AB-BA deadlock condition

Commit 9256a47 fixed a deadlock condition, being sure that the buddy
list spinlock is always taken before the page spinlock.

However in zbud_free_and_delist() locking order is the opposite
(page lock -> list lock).

Possible unsafe locking scenario (reported by lockdep):

        CPU0                    CPU1
        ----                    ----
   lock(&(&zbpg->lock)->rlock);
                                lock(zbud_budlists_spinlock);
                                lock(&(&zbpg->lock)->rlock);
   lock(zbud_budlists_spinlock);

Fix by grabbing the locks in opposite order in zbud_free_and_delist().

Signed-off-by: Andrea Righi <andrea@betterlinux.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: et131x: use netif_rx_ni() for packet receive
Mark Einon [Mon, 20 Feb 2012 22:33:24 +0000 (22:33 +0000)]
staging: et131x: use netif_rx_ni() for packet receive

netif_rx is meant to be called from interrupts because it doesn't wake
up ksoftirqd.  For calling from outside interrupts, netif_rx_ni exists.

This stops the error "NOHZ: local_softirq_panding 08" that happens on
some machines with NOHZ and plip --- it is caused by the fact that
softirq is pending and ksoftirqd is sleeping.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: Dont build ramster when CONFIGFS_FS=m
Dan Magenheimer [Mon, 20 Feb 2012 16:29:31 +0000 (08:29 -0800)]
staging: ramster: Dont build ramster when CONFIGFS_FS=m

Ramster can't be a module (yet) and depends on CONFIGFS_FS=y, but
allmodconfig builds with CONFIGFS_FS=m, which breaks the build.
And forcing CONFIGFS_FS=y with select breaks the build in other ways.
So just don't build ramster unless CONFIGFS_FS=y.

Also, while we're here, add a comment as to why BROKEN is depended.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ramster: build ramster properly when CONFIG_OCFS2=m|y
Dan Magenheimer [Mon, 20 Feb 2012 16:29:30 +0000 (08:29 -0800)]
staging: ramster: build ramster properly when CONFIG_OCFS2=m|y

Due to some conflicting debug vars, kernel build will warn when
CONFIG_RAMSTER=y and CONFIG_OCFS2=m and will fail when
CONFIG_RAMSTER=y and CONFIG_OCFS2=y (rare).

Rename ramster mlog vars to avoid the name conflict.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: wlan-ng: p80211netdev.c: fixed checkpatch error
Sebastiaan de Haan [Fri, 17 Feb 2012 20:14:55 +0000 (21:14 +0100)]
staging: wlan-ng: p80211netdev.c: fixed checkpatch error

New kernel developer inspired by the 2010 FOSDEM talk. Running checkpatch on
p80211netdev.c gave the error: p80211netdev.c:153: ERROR: "foo * bar" should
be "foo *bar". Fixed it by doing what was suggested.

Signed-off-by: Sebastiaan de Haan <sebastiaan@sebastiaandehaan.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: usbip: Remove commented code.
Santosh Nayak [Mon, 20 Feb 2012 03:14:05 +0000 (08:44 +0530)]
Staging: usbip: Remove commented code.

Remove commented code of old style lock initilization

Signed-off-by: Santosh Nayak <santoshprasadnayak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/mei: mei-amt-version - make all function static and used
Tomas Winkler [Mon, 20 Feb 2012 12:46:03 +0000 (14:46 +0200)]
staging/mei: mei-amt-version - make all function static and used

This patch eliminates following type of warnings
warning: no previous prototype for '...func...' [-Wmissing-prototypes]

For this is a single file example lets make all API-like functions
be static.
Since all static functions should be used so let's call
to amt_host_if_deinit() even if in this example it's not really necessary

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging/mei: fix hbm_host_version_response structure
Tomas Winkler [Thu, 23 Feb 2012 19:52:55 +0000 (21:52 +0200)]
staging/mei: fix hbm_host_version_response structure

Looks during cleanup we converted type of host_version_supported
member from UINT8 into int instead of u8.
Since we've queried only for boolean value of
this variable the bug wasn't really visible.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: fix possible NULL dereference of psfLocalSet in CmHost.c
Kevin McKinney [Fri, 24 Feb 2012 04:41:05 +0000 (23:41 -0500)]
Staging: bcm: fix possible NULL dereference of psfLocalSet in CmHost.c

Variable psfLocalSet may not follow the correct
path in the code, and therefore may not be set
properly. As such, causing a null dereference.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: crystalhd: Get rid of unecessary BCMLOG_ENTER macro
Jorgyano Vieira [Fri, 17 Feb 2012 23:38:09 +0000 (21:38 -0200)]
Staging: crystalhd: Get rid of unecessary BCMLOG_ENTER macro

The BCMLOG_ENTER macro is used only in five functions, perhaps
it is remainder of debugging some specific problem,
now, this macro don't seems to be useful, so it should be removed.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: crystalhd: crystalhd_misc: Get rid of unused macro
Jorgyano Vieira [Fri, 17 Feb 2012 23:35:53 +0000 (21:35 -0200)]
Staging: crystalhd: crystalhd_misc: Get rid of unused macro

The BCMLOG_LEAVE macro is not used, so there is no reason to keep it.

Signed-off-by: Jorgyano Vieira <jorgyano@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: Plumbed in Kconfig and Kbuild
Chris Kelly [Mon, 20 Feb 2012 21:12:44 +0000 (21:12 +0000)]
staging: ozwpan: Plumbed in Kconfig and Kbuild

Added Kconfig and Kbuild files for ozwpan USB over WiFi driver.
Modified parent Makefile and Kconfig to include them.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: ozwpan: Added debug support
Chris Kelly [Mon, 20 Feb 2012 21:12:35 +0000 (21:12 +0000)]
staging: ozwpan: Added debug support

Added tracing facilities and also memory allocation and URB tracking.
This is for debugging purposes and is all optional and can be switched
out at compile time.

Signed-off-by: Chris Kelly <ckelly@ozmodevices.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>