GitHub/MotorolaMobilityLLC/kernel-slsi.git
13 years agoStaging: hv: tools: Fix a checkpatch warning in hv_kvp_daemon.c
K. Y. Srinivasan [Tue, 19 Jul 2011 18:44:20 +0000 (11:44 -0700)]
Staging: hv: tools: Fix a checkpatch warning in hv_kvp_daemon.c

Fix a checkpatch warning in hv_kvp_daemon.c.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: hv: vmbus: Don't wait indefinitely for IRQ resouces
K. Y. Srinivasan [Fri, 15 Jul 2011 20:38:56 +0000 (13:38 -0700)]
Staging: hv: vmbus: Don't wait indefinitely for IRQ resouces

If an attempt is made to load the vmbus driver on a non-Hyper-V platform,
the load operation will hang since we currently wait indefinitely to
retrieve the IRQ information. This is done in the context of an acpi callback
context (which will obviously not happen when this driver is
loaded on a non-Hyper-V platform). This patch fixes the problem.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: go7007: fix braces coding style issue in wis-tw2804.c
Pradheep Shrinivasan [Sat, 20 Aug 2011 06:15:26 +0000 (23:15 -0700)]
Staging: go7007: fix braces coding style issue in wis-tw2804.c

This is a patch to the wis-tw2804.c to fix the braces coding style issue as pointed by checkpatch.pl tool

Signed-off-by: Pradheep Shrinivasan <pradheep.sh@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging : winbond : fix coding style issue in phy_calibration.c
Vincent Abel-Grimalt [Tue, 9 Aug 2011 23:13:38 +0000 (01:13 +0200)]
Staging : winbond : fix coding style issue in phy_calibration.c

Thus us a patch to the phy_calibration.c file that fixes up coding style warning found by the checkpatch.pl tool

Signed-off-by: Vincent Abel-Grimalt <kolymine@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers/staging: do not use EXTRA_CFLAGS
Arnaud Lacombe [Mon, 15 Aug 2011 05:07:12 +0000 (01:07 -0400)]
drivers/staging: do not use EXTRA_CFLAGS

Usage of these flags has been deprecated for nearly 4 years by:

    commit f77bf01425b11947eeb3b5b54685212c302741b8
    Author: Sam Ravnborg <sam@neptun.(none)>
    Date:   Mon Oct 15 22:25:06 2007 +0200

        kbuild: introduce ccflags-y, asflags-y and ldflags-y

Moreover, these flags (at least EXTRA_CFLAGS) have been documented for command
line use. By default, gmake(1) do not override command line setting, so this is
likely to result in build failure or unexpected behavior.

Replace their usage by Kbuild's `{as,cc,ld}flags-y'.

Cc: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: Arnaud Lacombe <lacombar@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: spectra: Use memdup_user
Thomas Meyer [Sat, 13 Aug 2011 08:48:57 +0000 (10:48 +0200)]
staging: spectra: Use memdup_user

 Use kmemdup_user rather than duplicating its implementation
 This is a little bit restricted to reduce false positives

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/memdup_user.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging/easycap: Use memdup_user
Thomas Meyer [Sat, 13 Aug 2011 09:09:26 +0000 (11:09 +0200)]
staging/easycap: Use memdup_user

 Use kmemdup_user rather than duplicating its implementation
 This is a little bit restricted to reduce false positives

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/memdup_user.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rts_pstor: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:27:10 +0000 (11:27 +0200)]
staging: rts_pstor: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: tidspbridge: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:39:08 +0000 (11:39 +0200)]
staging: tidspbridge: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: ft1000: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:31:48 +0000 (11:31 +0200)]
staging: ft1000: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: rts_pstor: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:28:50 +0000 (11:28 +0200)]
Staging: rts_pstor: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: altera-stapl: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 09:34:09 +0000 (11:34 +0200)]
staging: altera-stapl: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rts_pstor: dont cast void* from kmalloc()
Thomas Meyer [Sat, 13 Aug 2011 14:14:03 +0000 (16:14 +0200)]
staging: rts_pstor: dont cast void* from kmalloc()

 Casting (void *) value returned by kmalloc is useless
 as mentioned in Documentation/CodingStyle, Chap 14.

 The semantic patch that makes this output is available
 in scripts/coccinelle/api/alloc/drop_kmalloc_cast.cocci.

 More information about semantic patching is available at
 http://coccinelle.lip6.fr/

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: serqt_usb2: fix sleeping with spinlock held
Alexey Khoroshilov [Tue, 9 Aug 2011 06:23:42 +0000 (10:23 +0400)]
Staging: serqt_usb2: fix sleeping with spinlock held

The patch replaces spinlock with mutex.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: fix ft1000 sparse warnings
Randy Dunlap [Mon, 8 Aug 2011 18:31:48 +0000 (11:31 -0700)]
staging: fix ft1000 sparse warnings

Fix sparse warnings in staging/ft1000/:

drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:69:7: warning: obsolete struct initializer, use C99 syntax

and make many functions & data static.  Examples:
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:65:23: warning: symbol 'fw_entry' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:836:6: warning: symbol 'ft1000_send_cmd' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:1014:6: warning: symbol 'ft1000_proc_drvmsg' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:1788:5: warning: symbol 'ft1000_copy_down_pkt' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2096:6: warning: symbol 'stop_ft1000_card' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_hw.c:2155:19: warning: symbol 'init_ft1000_card' was not declared. Should it be static?

rivers/staging/ft1000/ft1000-pcmcia/ft1000_cs.c:172:5: warning: symbol 'ft1000_confcheck' was not declared. Should it be static?

drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:50:5: warning: symbol 'ft1000ReadProc' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:194:6: warning: symbol 'ft1000InitProc' was not declared. Should it be static?
drivers/staging/ft1000/ft1000-pcmcia/ft1000_proc.c:207:6: warning: symbol 'ft1000CleanupProc' was not declared. Should it be static?

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Macros: Fixed multiple coding style violations.
Ben Wright [Wed, 17 Aug 2011 03:42:50 +0000 (13:42 +1000)]
Staging: bcm: Macros: Fixed multiple coding style violations.

Fixed multiple indentation issues.

Signed-off-by: Benjamin James Wright <bwright.au@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers/staging/bcm/nvm.c: add missing kfree
Julia Lawall [Mon, 8 Aug 2011 11:17:58 +0000 (13:17 +0200)]
drivers/staging/bcm/nvm.c: add missing kfree

Buff is only used as a temporary buffer within the function, so it should
be freed before leaving the function in an error case.

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

// <smpl>
@exists@
local idexpression x;
statement S,S1;
expression E;
identifier fl;
expression *ptr != NULL;
@@

x = \(kmalloc\|kzalloc\|kcalloc\)(...);
...
if (x == NULL) S
<... when != x
     when != if (...) { <+...kfree(x)...+> }
     when any
     when != true x == NULL
x->fl
...>
(
if (x == NULL) S1
|
if (...) { ... when != x
               when forall
(
 return \(0\|<+...x...+>\|ptr\);
|
* return ...;
)
}
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix memory leak reported during compile.
Kevin McKinney [Tue, 16 Aug 2011 02:12:15 +0000 (22:12 -0400)]
Staging: bcm: Fix memory leak reported during compile.

This patch fixes a potential memory leak were temp_buff buffer
is not being freed when a certain condition is true.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: bcm: Fix a coding style error reported by checkpatch.pl
Kevin McKinney [Tue, 16 Aug 2011 02:10:12 +0000 (22:10 -0400)]
Staging: bcm: Fix a coding style error reported by checkpatch.pl

Tool checkpatch.pl reported the following error: extern struct class *bcm_class;"
declaration not allowed in .c files. Therefore, I move this declaration into
the header "headers.h" file.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: bcm: fix coding style warnings and errors reported by checkpatch.pl tool
Kevin McKinney [Tue, 16 Aug 2011 02:07:41 +0000 (22:07 -0400)]
staging: bcm: fix coding style warnings and errors reported by checkpatch.pl tool

Staging: bcm: Fix coding style errors reported by checkpatch.pl

Fix multiple warnings and errors reported by checkpatch.pl

Signed-off-by: Kevin McKinney<klmckinney1@gmail.com>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: rtl8712: remove r8712_cmd_thread()->daemonize()
Oleg Nesterov [Tue, 16 Aug 2011 18:50:57 +0000 (20:50 +0200)]
staging: rtl8712: remove r8712_cmd_thread()->daemonize()

daemonize() is only needed when a user-space task does kernel_thread().

r8712_cmd_thread() is kthread_create()'ed and thus it doesn't need
the soon-to-be-deprecated daemonize(). It is the only caller of
thread_enter() which actually does the call.

Note:
- we are going to remove the sigdelset(blocked) code from
  allow_signal(), this means that without this patch
  thread_enter() can't work after that. Not to mention
  daemonize() should be deprecated.

- as a side effect, this patch changes ->comm. Hopefully
  this is fine, and padapter->pnetdev->name probably makes
  more sense anyway.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Acked-by: Matt Fleming <matt.fleming@intel.com>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-and-tested-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agortl8712: don't just return -EFAULT in wpa_supplicant_ioctl()
Dan Carpenter [Sat, 6 Aug 2011 14:27:48 +0000 (07:27 -0700)]
rtl8712: don't just return -EFAULT in wpa_supplicant_ioctl()

There were some curly braces missing so the original code in
wpa_supplicant_ioctl() pretty much always returned -EFAULT without
doing anything.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: keep track of registered buses
Manohar Vanga [Fri, 12 Aug 2011 10:30:48 +0000 (12:30 +0200)]
staging: vme: keep track of registered buses

This patch adds a list which keeps track of all registered VME
buses. This is required for adding refcounting later to bridge
modules, something that is not currently implemented.

This is based on the changes introduced by Emilio G. Cota in the
patch:

    https://lkml.org/lkml/2010/10/25/486

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme: make [alloc|free]_consistent bridge specific
Manohar Vanga [Wed, 10 Aug 2011 09:33:46 +0000 (11:33 +0200)]
staging: vme: make [alloc|free]_consistent bridge specific

Make PCI dependent functions ([alloc|free]_consistent() in
'vme.c') bridge specific. By removing the dependency of the
VME bridge framework on PCI, this patch allows for addition of
non-PCI based VME bridges.

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Acked-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vme_user: change kmalloc+memset to kzalloc
Manohar Vanga [Mon, 1 Aug 2011 10:20:46 +0000 (12:20 +0200)]
staging: vme_user: change kmalloc+memset to kzalloc

Signed-off-by: Manohar Vanga <manohar.vanga@cern.ch>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zcache: fix typos
Seth Jennings [Mon, 22 Aug 2011 18:50:08 +0000 (13:50 -0500)]
staging: zcache: fix typos

The patch fixes two typos in zcache-main.c

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@suse.de>
13 years agostaging: zcache: fix possible sleep under lock
Seth Jennings [Mon, 22 Aug 2011 19:30:38 +0000 (14:30 -0500)]
staging: zcache: fix possible sleep under lock

zcache_new_pool() calls kmalloc() with GFP_KERNEL which has
__GFP_WAIT set.  However, zcache_new_pool() gets called on
a stack that holds the swap_lock spinlock, leading to a
possible sleep-with-lock situation. The lock is obtained
in enable_swap_info().

The patch replaces GFP_KERNEL with GFP_ATOMIC.

v2: replace with GFP_ATOMIC, not GFP_IOFS

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@suse.de>
13 years agodrivers/staging/rtl8192u: Don't pass huge struct by value
Jesper Juhl [Fri, 12 Aug 2011 22:53:07 +0000 (00:53 +0200)]
drivers/staging/rtl8192u: Don't pass huge struct by value

struct ieee80211_network is fairly large (more than half a kilobyte),
so let's pass a pointer instead of passing the entire structure by
value when ieee80211_is_54g() and ieee80211_is_shortslot() need to
look at a few members.
Also remove parentheses around the values being returned from those
two functions - 'return' is not a function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers/staging/rtl8187se: Don't pass huge struct by value
Jesper Juhl [Fri, 12 Aug 2011 22:51:40 +0000 (00:51 +0200)]
drivers/staging/rtl8187se: Don't pass huge struct by value

struct ieee80211_network is fairly large (more than half a kilobyte),
so let's pass a pointer instead of passing the entire structure by
value when ieee80211_is_54g() and ieee80211_is_shortslot() need to
look at a few members.
Also remove parentheses around the values being returned from those
two functions - 'return' is not a function.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agodrivers/staging/usbip/userspace/libsrc/vhci_driver.c: test the just-initialized value
Julia Lawall [Mon, 22 Aug 2011 14:00:33 +0000 (16:00 +0200)]
drivers/staging/usbip/userspace/libsrc/vhci_driver.c: test the just-initialized value

Test the just-initialized value rather than some other one.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
identifier x,y,f!={PTR_ERR,ERR_PTR,ERR_CAST};
statement S;
@@

x = f(...);
(
if (\(x == NULL\|IS_ERR(x)\)) S
|
*if (\(y == NULL\|IS_ERR(y)\))
 { ... when != x
   return ...; }
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Acked-by: David Chang <dchang@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: usbip: Add header guards to stub.h and vhci.h
Tobias Klauser [Mon, 22 Aug 2011 06:53:28 +0000 (08:53 +0200)]
staging: usbip: Add header guards to stub.h and vhci.h

stub.h and vhci.h are missing proper #ifndef/#define header guards, so
add them.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: usbip: add a usbip protocol document
Márton Németh [Mon, 22 Aug 2011 01:52:47 +0000 (09:52 +0800)]
staging: usbip: add a usbip protocol document

Initial version of USBIP protocol document.

Signed-off-by: David Chang <dchang@suse.com>
Acked-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: usbip: userspace: Check return value for mkdir()
Tobias Klauser [Fri, 19 Aug 2011 06:54:18 +0000 (08:54 +0200)]
staging: usbip: userspace: Check return value for mkdir()

mkdir() could fail, so we should check its return value.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: usbip: Fix braces and spaces to match coding style.
Akshay Joshi [Wed, 17 Aug 2011 19:58:32 +0000 (15:58 -0400)]
Staging: usbip: Fix braces and spaces to match coding style.

Fix brace positioning and spaces at the start of lines in order to
comply with the kernel coding style.

Signed-off-by: Akshay Joshi <me@akshayjoshi.com>
Acked-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: usbip: Remove trailing spaces.
Akshay Joshi [Wed, 17 Aug 2011 19:58:31 +0000 (15:58 -0400)]
Staging: usbip: Remove trailing spaces.

Remove trailing spaces to comply with the kernel coding style.

Signed-off-by: Akshay Joshi <me@akshayjoshi.com>
Acked-by: matt mooney <mfm@muteddisk.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: keucr: fix comments, braces, whitespaces coding style issue in tm6000.h
Ruslan Pisarev [Fri, 22 Jul 2011 11:17:23 +0000 (14:17 +0300)]
Staging: keucr: fix comments, braces, whitespaces coding style issue in tm6000.h

This is a patch to the smilsub.c file that fixed up comment, braces,
whitespaces error found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: keucr: Remove dead (comment) code in drivers/staging/keucr/smilsub.c
Ruslan Pisarev [Fri, 22 Jul 2011 11:17:04 +0000 (14:17 +0300)]
Staging: keucr: Remove dead (comment) code in drivers/staging/keucr/smilsub.c

Remove dead (comment) code in drivers/staging/keucr/smilsub.c

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: keucr: Coding style fixes in scsiglue.c
Ruslan Pisarev [Fri, 22 Jul 2011 11:16:48 +0000 (14:16 +0300)]
Staging: keucr: Coding style fixes in scsiglue.c

Fixed macros in scsiglue.c

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: keucr: Coding style fixes in smil.h
Ruslan Pisarev [Fri, 22 Jul 2011 11:16:34 +0000 (14:16 +0300)]
Staging: keucr: Coding style fixes in smil.h

Fixed brace style in smil.h

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: keucr: Coding style fixes in smscsi.c
Ruslan Pisarev [Fri, 22 Jul 2011 11:16:23 +0000 (14:16 +0300)]
Staging: keucr: Coding style fixes in smscsi.c

I fixed whitespace, brace style and commetnt in smscsi.c

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: olpc_dcon: replace remaining calls to i2c_smbus_read/write
Andres Salomon [Fri, 22 Jul 2011 03:38:01 +0000 (20:38 -0700)]
staging: olpc_dcon: replace remaining calls to i2c_smbus_read/write

Use dcon_read and dcon_write; shorter, and understands the dcon_priv
struct.  This transition was started long ago.  This converts the
last few i2c_smbus_* callers.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: olpc_dcon: drop support for DCON v1
Andres Salomon [Fri, 22 Jul 2011 03:37:55 +0000 (20:37 -0700)]
staging: olpc_dcon: drop support for DCON v1

The v1 DCONs only existed for XO-1 prototypes (and even then, very very
early prototypes).  Drop support for v1 DCON.

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: olpc_dcon: remove noinit module variable
Andres Salomon [Fri, 22 Jul 2011 03:37:43 +0000 (20:37 -0700)]
staging: olpc_dcon: remove noinit module variable

This came from Jordan's original 2007 gxfb_dcon commit.  I've never
seen or heard of it actually being used.  Presumably it was once
useful for skipping hardware initialization when reloading the module
over and over during driver development..

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vt6656: use %pM for printing MACs
Andy Shevchenko [Tue, 26 Jul 2011 07:35:31 +0000 (10:35 +0300)]
staging: vt6656: use %pM for printing MACs

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: vt6655: simplify MAC printing by using %pM
Andy Shevchenko [Tue, 26 Jul 2011 07:35:30 +0000 (10:35 +0300)]
staging: vt6655: simplify MAC printing by using %pM

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zram: make global var "num_devices" use unique name
Noah Watkins [Wed, 20 Jul 2011 23:06:08 +0000 (17:06 -0600)]
staging: zram: make global var "num_devices" use unique name

The global variable "num_devices" is too general to be
global. This patch switches the name to be "zram_num_devices".

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: zram: make global var "devices" use unique name
Noah Watkins [Wed, 20 Jul 2011 23:05:57 +0000 (17:05 -0600)]
staging: zram: make global var "devices" use unique name

The global variable "devices" is too general to be global.
This patch switches the name to be "zram_devices".

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: remove ath6kl
Kalle Valo [Fri, 12 Aug 2011 19:08:00 +0000 (22:08 +0300)]
staging: remove ath6kl

ath6kl is now in drivers/net/wireless/ath so the staging driver
is not supported anymore and should be removed.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: pohmelfs: Coding style fixes in trans.c
Ruslan Pisarev [Mon, 25 Jul 2011 14:26:47 +0000 (17:26 +0300)]
Staging: pohmelfs: Coding style fixes in trans.c

I fixed whitespace in drivers/staging/pohmelfs/trans.c

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: replace video_type with FB_TYPE_PACKED_PIXELS
Aaro Koskinen [Fri, 19 Aug 2011 19:40:27 +0000 (22:40 +0300)]
staging: xgifb: replace video_type with FB_TYPE_PACKED_PIXELS

Replace a global variable with a constant.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: probe: delete checks for mode "none"
Aaro Koskinen [Fri, 19 Aug 2011 19:40:26 +0000 (22:40 +0300)]
staging: xgifb: probe: delete checks for mode "none"

The driver does not allow selecting the mode "none", so no need to check
for that in probe.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate #ifdef XGIFB_PAN
Aaro Koskinen [Fri, 19 Aug 2011 19:40:25 +0000 (22:40 +0300)]
staging: xgifb: eliminate #ifdef XGIFB_PAN

XGIFB_PAN is always defined and checks can be eliminated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: delete unused structs
Aaro Koskinen [Fri, 19 Aug 2011 19:40:24 +0000 (22:40 +0300)]
staging: xgifb: delete unused structs

Delete unused struct declarations.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: vb_table: delete unused data
Aaro Koskinen [Fri, 19 Aug 2011 19:40:23 +0000 (22:40 +0300)]
staging: xgifb: vb_table: delete unused data

Delete unused data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: delete unused definitions
Aaro Koskinen [Fri, 19 Aug 2011 19:40:22 +0000 (22:40 +0300)]
staging: xgifb: delete unused definitions

Delete some more unused definitions.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: delete duplicate #defines
Aaro Koskinen [Fri, 19 Aug 2011 19:40:21 +0000 (22:40 +0300)]
staging: xgifb: delete duplicate #defines

Delete duplicate identical #defines.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging: xgifb: eliminate #ifdef NewScratch
Aaro Koskinen [Fri, 19 Aug 2011 19:40:19 +0000 (22:40 +0300)]
staging: xgifb: eliminate #ifdef NewScratch

NewScratch is always defined so all checks can be eliminated.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Reviewed-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: xgifb: Delete define XGIINITSTATIC in XGI_main_26.c and XGI_main.h
Ruslan Pisarev [Thu, 21 Jul 2011 08:59:11 +0000 (11:59 +0300)]
Staging: xgifb: Delete define XGIINITSTATIC in XGI_main_26.c and XGI_main.h

This is a patch to the XGI_main.h and XGI_main_26.c file that fixed up a define warrning found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_mai...
Ruslan Pisarev [Thu, 21 Jul 2011 08:58:53 +0000 (11:58 +0300)]
Staging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main_26.c

This is a patch to the XGI_main_26.c file that fixed up a errors "do not initialise statics to 0 or NULL" found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoStaging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main.h
Ruslan Pisarev [Thu, 21 Jul 2011 08:57:40 +0000 (11:57 +0300)]
Staging: xgifb: Fixed up a errors "do not initialise statics to 0 or NULL" in XGI_main.h

This is a patch to the XGI_main.h file that fixed up a errors "do not initialise statics to 0 or NULL" found by the checkpatch.pl tools.

Signed-off-by: Ruslan Pisarev <ruslan@rpisarev.org.ua>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoIIO: ADC: New driver for AD7190/AD7192/AD7195 4 Channel SPI ADC
Michael Hennerich [Wed, 17 Aug 2011 15:29:34 +0000 (17:29 +0200)]
IIO: ADC: New driver for AD7190/AD7192/AD7195 4 Channel SPI ADC

New driver for AD7190/AD7192/AD7195 4.8 kHz, Ultralow Noise, 24-Bit
Sigma-Delta ADC with PGA

These devices features a dual use data out ready DOUT/RDY output.
In order to avoid contentions on the SPI bus, it's necessary to use
spi bus locking. The DOUT/RDY output must also be wired to an
interrupt capable GPIO.

In INDIO_RING_TRIGGERED mode, this driver may block its SPI bus segment
for an extended period of time.

Changes since V1:

Add missing documentation.
Remove obsoleted include files.
Fix typos and style issues.
Fix buffer size.
Split ad7192_show() into two functions.
Avoid race condition add mutex.
Abandon IIO_CHAN macro.
Reorder elements in ad7192_platform_data.
Remove driver bus type.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:imu:adis16344 support
Jonathan Cameron [Fri, 12 Aug 2011 17:04:37 +0000 (18:04 +0100)]
staging:iio:imu:adis16344 support

Simple device. Note the sparse scan mask used.

Done from datasheet as very similar to existing parts.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoSTAGING:iio:light: fix ISL29018 init to handle brownout
Grant Grundler [Tue, 9 Aug 2011 22:18:14 +0000 (15:18 -0700)]
STAGING:iio:light: fix ISL29018 init to handle brownout

After a voltage brownout, sensor will now operate correctly.

Page 10 of ISL29018 data sheet and the Intersil Application Note 1534
describe the required initialization sequence:
1. Write 0x00 to register 0x08 (TEST)
2. Write 0x00 to register 0x00 (CMD1)
3. msleep(1)
4. program remaining registers as before

Signed-off-by: Grant Grundler <grundler@chromium.org>
Reviewed-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoiio: impedance-analyzer: New driver for AD5933/4 Impedance Converter, Network Analyzer
Michael Hennerich [Tue, 2 Aug 2011 06:48:22 +0000 (08:48 +0200)]
iio: impedance-analyzer: New driver for AD5933/4 Impedance Converter, Network Analyzer

The AD5933 is a high precision impedance converter system solution
that combines an on-board frequency generator with a 12-bit, 1 MSPS,
analog-to-digital converter (ADC). The frequency generator allows an
external complex impedance to be excited with a known frequency.

The response signal from the impedance is sampled by the on-board ADC
and a discrete Fourier transform (DFT) is processed by an on-chip DSP engine.
The DFT algorithm returns a real (R) and imaginary (I) data-word at each
output frequency.

Changes since V1:

Apply list review feedback:
Consistently use poll_time_jiffies.
Use be|le cpu endian helpers where applicable.
Add various comments.

Changes since V2:

Fix KernelVersion tag in Documentation.
Declare ad5933_default_pdata static.
Fix typos.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoiio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System
Michael Hennerich [Wed, 20 Jul 2011 13:03:09 +0000 (15:03 +0200)]
iio: adc: New driver for AD7280A Lithium Ion Battery Monitoring System

The AD7280A monitoring system contains all the functions required for
general purpose monitoring and maintenance of stacked
lithium ion batteries as used in hybrid electric vehicles,
battery backup applications, etc.

Changes since V1:

Make cell channels all type IIO_IN_DIFF, update documentation accordingly.
Remove unused and redundant defines.
Use SI units where applicable.
Remove unnecessary wrapper function.
Remove redundant initialization.
Add comments where requested.
Revise event handler.
Use const where applicable.

Changes since V2:

Remove redundant adc.h include file, scheduled for removal.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agoiio: core: deconstify members of struct iio_chan_spec
Michael Hennerich [Wed, 20 Jul 2011 13:03:07 +0000 (15:03 +0200)]
iio: core: deconstify members of struct iio_chan_spec

Allow dynamic allocation and population of channel spec.

Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: remove unneeded include
Jonathan Cameron [Fri, 12 Aug 2011 16:56:05 +0000 (17:56 +0100)]
staging:iio: remove unneeded include

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:events: use IIO_<TYPE> and IIO_MOD_<> instead of IIO_EV_CLASS_<TYPE> etc
Jonathan Cameron [Fri, 12 Aug 2011 16:56:04 +0000 (17:56 +0100)]
staging:iio:events: use IIO_<TYPE> and IIO_MOD_<> instead of IIO_EV_CLASS_<TYPE> etc

The original definitions were duplicated to reduce tree churn during introduction of chan_spec
registration.  Now there is no point in maintaining the two sets of definitions.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: Introduce iio_core.h and move all core only stuff out of iio.h.
Jonathan Cameron [Fri, 12 Aug 2011 16:56:03 +0000 (17:56 +0100)]
staging:iio: Introduce iio_core.h and move all core only stuff out of iio.h.

Also get rid of a few function defs where they are only now in one core file
anyway.
Whilst here add mask = 0 to get rid of warning.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc remove unused adc.h.
Jonathan Cameron [Fri, 12 Aug 2011 16:56:02 +0000 (17:56 +0100)]
staging:iio:adc remove unused adc.h.

Another header unused after chan_spec conversions.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:accel remove unused accel.h header.
Jonathan Cameron [Fri, 12 Aug 2011 16:56:01 +0000 (17:56 +0100)]
staging:iio:accel remove unused accel.h header.

The chan spec conversions and a small amount of pushdown of defines
mean this header is no longer used.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro: remove gyro.h
Jonathan Cameron [Fri, 12 Aug 2011 16:56:00 +0000 (17:56 +0100)]
staging:iio:gyro: remove gyro.h

Not longer needed now all devices with gyro channels are using
iio_chan_spec registration.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:magnetometer: remove unused header magnet.h
Jonathan Cameron [Fri, 12 Aug 2011 16:55:59 +0000 (17:55 +0100)]
staging:iio:magnetometer: remove unused header magnet.h

Now all magnetomers are using iio_chan_spec there is no need for
the macros in magnet.h

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:magnetometer:ak8975 convert to iio_chan_spec + cleanups.
Jonathan Cameron [Fri, 12 Aug 2011 16:48:03 +0000 (17:48 +0100)]
staging:iio:magnetometer:ak8975 convert to iio_chan_spec + cleanups.

iio_chan_spec conversion is straight forward.

Other changes:
* use i2c_smbus_write_byte_data in write_data
* c99 isms to setup various structures.
* move the comment about the scale factor and kill off trivial access func.
* make mode setting code use a bool rather than a ulong.

Ultimately I'd like to get rid of that mode bit entirely and handle it through
core pm routines, but have left it for now.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:accel:adis16220 iio_chan_spec conversion.
Jonathan Cameron [Fri, 12 Aug 2011 16:48:02 +0000 (17:48 +0100)]
staging:iio:accel:adis16220 iio_chan_spec conversion.

I still have numerous issues with this driver and it
needs a substantial rewrite.

Whilst doing this patch at least one bug has been fixed (temp
reading didn't have an address) and a number of missing channel
info elements added.

Untested!

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:accel:adis16204: use peak_raw info_mask element + push some defs down...
Jonathan Cameron [Fri, 12 Aug 2011 16:48:01 +0000 (17:48 +0100)]
staging:iio:accel:adis16204: use peak_raw info_mask element + push some defs down from header.

Currently this is the only driver using some of the defines in accel.h.
If these become common we'll just add them to the channel_spec options,
for now push down into this driver.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro:adis16060 convert to iio_chan_spec
Jonathan Cameron [Fri, 12 Aug 2011 16:48:00 +0000 (17:48 +0100)]
staging:iio:gyro:adis16060 convert to iio_chan_spec

Still a very odd driver. This patch has the side effect of changing
it's name slightly.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro:adis16130 move to iio_chan_spec registration.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:59 +0000 (17:47 +0100)]
staging:iio:gyro:adis16130 move to iio_chan_spec registration.

Simple conversion now we've dropped the type attributes.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:magnetometer:hmc5843 iio_chan_spec conversion.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:58 +0000 (17:47 +0100)]
staging:iio:magnetometer:hmc5843 iio_chan_spec conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro:adis16080 convert to iio_chan_spec.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:57 +0000 (17:47 +0100)]
staging:iio:gyro:adis16080 convert to iio_chan_spec.

This is a rare driver that is so simple it actually gets longer
as a result of this conversion.  Oh well, swings and roundabouts.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro:adxrs450 squish some trivial single call point wrappers functions.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:56 +0000 (17:47 +0100)]
staging:iio:gyro:adxrs450 squish some trivial single call point wrappers functions.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro:adxrs450 make more use of spi_read and spi_write.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:55 +0000 (17:47 +0100)]
staging:iio:gyro:adxrs450 make more use of spi_read and spi_write.

This needs confirmation that the devices is happy if another part is
talked to in between the request for a register and the read back.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro:adxrs450 move to iio_chan_spec registration
Jonathan Cameron [Fri, 12 Aug 2011 16:47:54 +0000 (17:47 +0100)]
staging:iio:gyro:adxrs450 move to iio_chan_spec registration

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: add quadrature correction to chan info types.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:53 +0000 (17:47 +0100)]
staging:iio: add quadrature correction to chan info types.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:accel:kxsd9 cleanup and conversion to iio_chan_spec.
Jonathan Cameron [Fri, 12 Aug 2011 16:47:52 +0000 (17:47 +0100)]
staging:iio:accel:kxsd9 cleanup and conversion to iio_chan_spec.

Lots of minor bits and pieces.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio: Remove deprecated dev_data from iio_dev.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:53 +0000 (17:08 +0100)]
staging:iio: Remove deprecated dev_data from iio_dev.

The equivalent should always be done using iio_alllocate_device
with to create a private area for the driver and then iio_priv
to access it.  There may be other uses for a private data pointer
but right now it just leads driver writers astray.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:light:tsl2583 allocate chip state with iio_dev
Jonathan Cameron [Fri, 12 Aug 2011 16:08:52 +0000 (17:08 +0100)]
staging:iio:light:tsl2583 allocate chip state with iio_dev

There are some unusual corners in the probe function of this
driver, so may need another look.

V2: Now with the check for allocation success not inverted.
V3: Now with the i2c devdata calls actually being correctly cast.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Tested-by: Jon Brenner <jbrenner@TAOSinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:sysfs cleanout header for unused definitions.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:51 +0000 (17:08 +0100)]
staging:iio:sysfs cleanout header for unused definitions.

Also push one down into the only driver that actually uses it.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:core squash trivial wrappers and use ida allocation func.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:50 +0000 (17:08 +0100)]
staging:iio:core squash trivial wrappers and use ida allocation func.

Reorder to remove need for definitions currently in header.
Remove ida related utility function defs from header.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:core flatten convenience function that only has one user.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:49 +0000 (17:08 +0100)]
staging:iio:core flatten convenience function that only has one user.

Fix trivial wrong index (no effect on any current drivers).

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro and meter: header housecleaning.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:48 +0000 (17:08 +0100)]
staging:iio:gyro and meter: header housecleaning.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:accel header housekeeping - remove unecessary includes.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:47 +0000 (17:08 +0100)]
staging:iio:accel header housekeeping - remove unecessary includes.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc: header cleanup - remove unused.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:46 +0000 (17:08 +0100)]
staging:iio:adc: header cleanup - remove unused.

Clear out all the excessive includes in the *_ring.c files.
Mixture of cut and paste bloat and things needed for code that
has gone away.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:various header includes that should never have been.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:45 +0000 (17:08 +0100)]
staging:iio:various header includes that should never have been.

I will assume these were cut and pastes messup.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:inclinometer.h remove as now unused.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:44 +0000 (17:08 +0100)]
staging:iio:inclinometer.h remove as now unused.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:adc: unused header removals.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:43 +0000 (17:08 +0100)]
staging:iio:adc: unused header removals.

More headers now not needed after iio_chan_spec conversions.
A couple of drivers were using helpers from adc.h.

Given these were trivial, they are pushed down into the drivers.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:accel: usused header removals.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:42 +0000 (17:08 +0100)]
staging:iio:accel: usused header removals.

Missing from the iio_chan_spec conversion patches.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro:adis16130 drop control of adc resolution.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:41 +0000 (17:08 +0100)]
staging:iio:gyro:adis16130 drop control of adc resolution.

There is no clear use case for this functionality in a driver
that only supports slow reading via sysfs. The interface
use was non compliant with the abi motiving it being dropped.

It can go back in if anyone ever implements buffered reading
support for this device.  Then it will be controlled as
part of the buffering abi where this should indeed be correctly
supported.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:imu:adis16400 remove unused headers.
Jonathan Cameron [Fri, 12 Aug 2011 16:08:40 +0000 (17:08 +0100)]
staging:iio:imu:adis16400 remove unused headers.

These should have gone with the iio_chan_spec conversion.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 years agostaging:iio:gyro:adis16260 remove some unused headers
Jonathan Cameron [Fri, 12 Aug 2011 16:08:39 +0000 (17:08 +0100)]
staging:iio:gyro:adis16260 remove some unused headers

These should have gone with the iio_chan_spec conversion patch.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>