OSDN Git Service

uclinux-h8/linux.git
12 years agoStaging: bcm: Remove two unused variables from Adapter.h
Kevin McKinney [Fri, 18 May 2012 12:51:00 +0000 (08:51 -0400)]
Staging: bcm: Remove two unused variables from Adapter.h

This patch removes two unused variables that are
defined in the _MINI_ADAPTER struct.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Removes the volatile type definition from Adapter.h
Kevin McKinney [Fri, 18 May 2012 12:50:59 +0000 (08:50 -0400)]
Staging: bcm: Removes the volatile type definition from Adapter.h

This patch removes the following warning: "Use of
volatile is usually wrong: see
Documentation/volatile-considered-harmful.txt".
There were two variables defined in this manner.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Rename all "INT" to "int" in Adapter.h
Kevin McKinney [Fri, 18 May 2012 12:50:58 +0000 (08:50 -0400)]
Staging: bcm: Rename all "INT" to "int" in Adapter.h

This patch renames uppercase "INT" with lowercase "int".

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Fix warning: __packed vs. __attribute__((packed)) in Adapter.h
Kevin McKinney [Fri, 18 May 2012 12:50:57 +0000 (08:50 -0400)]
Staging: bcm: Fix warning: __packed vs. __attribute__((packed)) in Adapter.h

This patch fixes the following warning reported
by checkpatch.pl: "WARNING: __packed is preferred
over __attribute__((packed))".

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Correctly format all comments in Adapter.h
Kevin McKinney [Fri, 18 May 2012 12:50:56 +0000 (08:50 -0400)]
Staging: bcm: Correctly format all comments in Adapter.h

This patch correctly formats all comments as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Fix all whitespace issues in Adapter.h
Kevin McKinney [Fri, 18 May 2012 12:50:55 +0000 (08:50 -0400)]
Staging: bcm: Fix all whitespace issues in Adapter.h

This patch resolves all whitespace issues as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: bcm: Properly format braces in Adapter.h
Kevin McKinney [Fri, 18 May 2012 12:50:54 +0000 (08:50 -0400)]
Staging: bcm: Properly format braces in Adapter.h

This patch cuddles braces as reported
by checkpatch.pl.

Signed-off-by: Kevin McKinney <klmckinney1@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: remove unneeded casts
Samuel Iglesias Gonsalvez [Fri, 18 May 2012 09:10:08 +0000 (11:10 +0200)]
Staging: ipack/bridges/tpci200: remove unneeded casts

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: remove TPCI200_SHORTNAME constant
Samuel Iglesias Gonsalvez [Fri, 18 May 2012 09:10:07 +0000 (11:10 +0200)]
Staging: ipack/bridges/tpci200: remove TPCI200_SHORTNAME constant

Removed TPCI200_SHORTNAME. For the pr_* the name of the module is already
included due to pr_fmt declaration.

In other cases, KBUILD_MODNAME is used instead.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: remove board_name and bus_name fields from struct ipack_device
Samuel Iglesias Gonsalvez [Fri, 18 May 2012 09:10:06 +0000 (11:10 +0200)]
Staging: ipack: remove board_name and bus_name fields from struct ipack_device

Removed board_name and bus_name fields from struct ipack_device that are
completely useless.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: improve the register of a bus and a device in the bus.
Samuel Iglesias Gonsalvez [Fri, 18 May 2012 09:10:05 +0000 (11:10 +0200)]
Staging: ipack: improve the register of a bus and a device in the bus.

It adds and removes some fields in the struct ipack_device and
ipack_bus_device to make it cleaner.

The API has change to group all the operations on these structures inside
of the ipack driver.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: cleanup all the comedi_driver 'detach' functions
H Hartley Sweeten [Fri, 18 May 2012 00:11:14 +0000 (17:11 -0700)]
staging: comedi: cleanup all the comedi_driver 'detach' functions

1. Change the return type from int to void

All the detach functions, except for the comedi usb drivers, simply
return success (0). Plus, the return code is never checked in the
comedi core.

The comedi usb drivers do return error codes but the conditions can
never happen.

The first check is:

if (!dev)
return -EFAULT;

This checks that the passed comedi_device pointer is valid. The detach
function itself is called using this pointer so it MUST always be valid
or there is a bug in the core:

if (dev->driver)
dev->driver->detach(dev);

And the second check:

usb = dev->private;
if (!usb)
return -EFAULT;

The dev->private pointer is setup in the attach function to point to the
probed usb device. This value could be NULL if the attach fails. But,
since the comedi core is going to unload the driver anyway and does not
check for errors there is no gain by returning one.

After removing these checks from the comedi usb drivers the detach
functions required a bit of cleanup.

2. Remove all the printk noise in the detach functions

All of the printk output is really just noise. The user did a rmmod to
unload the driver, we really don't need to tell them about it.

Also, some of the messages are output using:

dev_dbg(dev->hw_dev, ...
or
dev_info(dev->hw_dev, ...

Unfortunately the hw_dev value is only used by drivers that are doing
DMA. For most drivers this variable is going to be NULL so the output
is not going to work as expected.

3. Refactor a couple static 'free_resource' functions into the detach
   functions.

The 'free_resource' function is only being called by the detach and it
makes more sense to just absorb the code.

4. Remove a couple unnecessary braces for single statements.

5. Remove unnecessary comments.

Most of the comedi drivers appear to be based on the comedi skel driver
and have the comments from that driver included. These comments make
sense in the skel driver for reference but they don't need to be in any
of the actual drivers.

6. Remove all the extra whitespace.

It's not needed to make the functions any more readable.

7. Remove the now unused 'attached_successfully' variable in the
   cb_pcimdda driver.

This variable was only used to conditionally output some driver noise
during the detach. Since all the printk's have been removed this
variable is no longer necessary.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: remove all 'default N' in Kconfig
H Hartley Sweeten [Fri, 18 May 2012 01:08:37 +0000 (18:08 -0700)]
staging: comedi: remove all 'default N' in Kconfig

Remove all the 'default N' lines in the comedi Kconfig. They should all
be 'default n' but that is the default anyway.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: line6/config.h: Delete unused header
Johannes Thumshirn [Fri, 18 May 2012 14:49:32 +0000 (16:49 +0200)]
staging: line6/config.h: Delete unused header

Delete unused header file drivers/staging/line6/config.h

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: gdm72xx depends on NET
Randy Dunlap [Thu, 17 May 2012 16:14:24 +0000 (09:14 -0700)]
staging: gdm72xx depends on NET

gdm72xx uses networking interfaces, so it should depend
at least on NET (maybe on WIMAX?).

ERROR: "sock_release" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netif_carrier_on" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netif_carrier_off" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "skb_realloc_headroom" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netif_rx" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netlink_kernel_create" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netif_rx_ni" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "dev_alloc_skb" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "free_netdev" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "register_netdev" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "skb_push" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "dev_get_by_index" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "skb_pull" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "init_net" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "__alloc_skb" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "netlink_broadcast" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "kfree_skb" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "alloc_netdev_mqs" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "eth_type_trans" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "ether_setup" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "unregister_netdev" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "__netif_schedule" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "skb_put" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "sock_wfree" [drivers/staging/gdm72xx/gdmwm.ko] undefined!
ERROR: "__nlmsg_put" [drivers/staging/gdm72xx/gdmwm.ko] undefined!

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: gdm72xx: Set up parent link in sysfs for gdm72xx devices
Paul Stewart [Thu, 17 May 2012 18:15:10 +0000 (11:15 -0700)]
staging: gdm72xx: Set up parent link in sysfs for gdm72xx devices

This patch uses SET_NETDEV_DEV to set up a 'device' parent link in sysfs
(e.g. /sys/class/net/wm0/device) for a gdm72xx device.

Signed-off-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Ben Chan <benchan@chromium.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: initial dmabuf/prime import support
Rob Clark [Thu, 17 May 2012 08:37:26 +0000 (02:37 -0600)]
staging: drm/omap: initial dmabuf/prime import support

This adds support to re-import omapdrm's own buffers.  Importing buffers
allocated by other drivers can be added later, but for now is not needed
(we don't yet have any other exportering drivers to test with).

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: drm/omap: dmabuf/prime mmap support
Rob Clark [Thu, 17 May 2012 08:37:25 +0000 (02:37 -0600)]
staging: drm/omap: dmabuf/prime mmap support

Add support for mmap'ing buffers via dmabuf.  For handling mmap of
cached buffers correctly, fault handling and PTE shootdown are used
to track dirty pages and automagically handle cache flushes before
dma access to the buffer.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram: Add ECC support
Anton Vorontsov [Thu, 17 May 2012 07:15:34 +0000 (00:15 -0700)]
pstore/ram: Add ECC support

This is now straightforward: just introduce a module parameter and pass
the needed value to persistent_ram_new().

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Marco Stornelli <marco.stornelli@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram: Switch to persistent_ram routines
Anton Vorontsov [Thu, 17 May 2012 07:15:18 +0000 (00:15 -0700)]
pstore/ram: Switch to persistent_ram routines

The patch switches pstore RAM backend to use persistent_ram routines,
one step closer to the ECC support.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Marco Stornelli <marco.stornelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: persistent_ram: Move to fs/pstore/ram_core.c
Anton Vorontsov [Thu, 17 May 2012 07:15:08 +0000 (00:15 -0700)]
staging: android: persistent_ram: Move to fs/pstore/ram_core.c

This is a first step for adding ECC support for pstore RAM backend: we
will use the persistent_ram routines, kindly provided by Google.

Basically, persistent_ram is a set of helper routines to deal with the
[optionally] ECC-protected persistent ram regions.

A bit of Makefile, Kconfig and header files adjustments were needed
because of the move.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: add support for hmc5883/hmc5883l to hmc5843 magnetometer driver
Peter Meerwald [Thu, 17 May 2012 00:28:13 +0000 (02:28 +0200)]
staging: iio: add support for hmc5883/hmc5883l to hmc5843 magnetometer driver

v3 addresses review comments:
* rotate tables (Jonathan Cameron)
* remove trailing space, add newline in sysfs output (Jonathan Cameron)
* split out patch for reorganization of hmc5843_set_rate() (Jonathan Cameron)
* use static table to describe chip variants (Jonathan Cameron)

v2 addresses review comments:
* fixes and cleanups have been split out (Jonathan Cameron)
* constants are generally prefixed HMC5843_, except when related
  specifically to hmc5883 (Jonathan Cameron)
* simplify code and avoid temp buffer in
  hmc5843_show_sampling_frequencies_available() (Lars-Peter Clausen)
* use sysfs_streq() instead of strncmp()/strlen() in
  hmc5843_check_sampling_frequency() (Lars-Peter Clausen)

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: reorganize hmc5843_set_rate()
Peter Meerwald [Thu, 17 May 2012 00:28:12 +0000 (02:28 +0200)]
staging: iio: reorganize hmc5843_set_rate()

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: rename function/data to consistently start with hmc5843_
Peter Meerwald [Thu, 17 May 2012 00:28:11 +0000 (02:28 +0200)]
staging: iio: rename function/data to consistently start with hmc5843_

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: cleanup and move comments in hmc5843
Peter Meerwald [Thu, 17 May 2012 00:28:10 +0000 (02:28 +0200)]
staging: iio: cleanup and move comments in hmc5843

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: add check for measurement configuration value passed to hmc5843
Peter Meerwald [Thu, 17 May 2012 00:28:09 +0000 (02:28 +0200)]
staging: iio: add check for measurement configuration value passed to hmc5843

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: rework sampling rate setting in hmc5843
Peter Meerwald [Thu, 17 May 2012 00:28:08 +0000 (02:28 +0200)]
staging: iio: rework sampling rate setting in hmc5843

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: Add helper macro for comedi usb driver boilerplate
H Hartley Sweeten [Thu, 17 May 2012 01:18:52 +0000 (18:18 -0700)]
staging: comedi: Add helper macro for comedi usb driver boilerplate

Introduce the module_comedi_usb_driver macro, and the
associated register/unregister functions, which is a
convenience macro for comedi usb driver modules similar
to module_platform_driver. It is intended to be used by
drivers where the init/exit section does nothing but
register/unregister the comedi driver and associated usb
driver. By using this macro it is possible to eliminate
a few lines of boilerplate code per comedi usb driver.

Also, when registering the usb driver check for failure
and unregister the comedi driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: Convert struct addi_board initialization to C99 format
H Hartley Sweeten [Thu, 17 May 2012 00:51:56 +0000 (17:51 -0700)]
staging: comedi: Convert struct addi_board initialization to C99 format

Convert the struct addi_board initialization to C99 format and remove
all the NULL or 0 initializers. This makes maintaining and editing the
code simpler and less error prone.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: rename and prefix CONSTANTs to distinguish between HMC5843 and HMC5883
Peter Meerwald [Wed, 16 May 2012 16:22:05 +0000 (18:22 +0200)]
staging: iio: rename and prefix CONSTANTs to distinguish between HMC5843 and HMC5883

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: change strict_strtoul() to kstrtoul() in hmc5843
Peter Meerwald [Wed, 16 May 2012 16:22:04 +0000 (18:22 +0200)]
staging: iio: change strict_strtoul() to kstrtoul() in hmc5843

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: fix access to hmc5843 private data
Peter Meerwald [Wed, 16 May 2012 16:22:03 +0000 (18:22 +0200)]
staging: iio: fix access to hmc5843 private data

i2c_get_clientdata(client) points to iio_dev, not hmc5843_data; fixes
issue similar to 62d2feb9803f18c4e3c8a1a2c7e30a54df8a1d72

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Shubhrajyoti D <shubhrajyoti@ti.com>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor das16 driver and use module_comedi_driver
H Hartley Sweeten [Wed, 16 May 2012 01:10:25 +0000 (18:10 -0700)]
staging: comedi: refactor das16 driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Refactor some of the other functions to remove the remaining
forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor contec_pci_dio driver and use module_comedi_pci_driver
H Hartley Sweeten [Wed, 16 May 2012 01:23:03 +0000 (18:23 -0700)]
staging: comedi: refactor contec_pci_dio driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Refactor some of the other functions to remove the remaining
forward declarations.

Remove some unused code stubs that are in #if 0 / #endif
blocks.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor daqboard2000 driver and use module_comedi_pci_driver
H Hartley Sweeten [Wed, 16 May 2012 01:29:18 +0000 (18:29 -0700)]
staging: comedi: refactor daqboard2000 driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor das1800 driver and use module_comedi_driver
H Hartley Sweeten [Wed, 16 May 2012 01:34:49 +0000 (18:34 -0700)]
staging: comedi: refactor das1800 driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: gdm72xx: WIMAX_GDM72XX_USB_PM should depend on USB_SUSPEND
Geert Uytterhoeven [Wed, 16 May 2012 19:47:40 +0000 (21:47 +0200)]
staging: gdm72xx: WIMAX_GDM72XX_USB_PM should depend on USB_SUSPEND

Use Kconfig logic instead of a rude #error in the driver source,
which breaks m68k-allmodconfig.
Also remove the "default n", as that's the default.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Sage Ahn <syahn@gctsemi.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoRevert "ramster: switch over to zsmalloc and crypto interface"
Greg Kroah-Hartman [Wed, 16 May 2012 15:09:35 +0000 (08:09 -0700)]
Revert "ramster: switch over to zsmalloc and crypto interface"

This reverts commit 49b81a3c7415d9b02169f37b8559d468fd17686a.

It causes build breakage under some configurations.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoramoops: Move to fs/pstore/ram.c
Anton Vorontsov [Wed, 16 May 2012 12:43:08 +0000 (05:43 -0700)]
ramoops: Move to fs/pstore/ram.c

Since ramoops was converted to pstore, it has nothing to do with character
devices nowadays. Instead, today it is just a RAM backend for pstore.

The patch just moves things around. There are a few changes were needed
because of the move:

1. Kconfig and Makefiles fixups, of course.

2. In pstore/ram.c we have to play a bit with MODULE_PARAM_PREFIX, this
   is needed to keep user experience the same as with ramoops driver
   (i.e. so that ramoops.foo kernel command line arguments would still
   work).

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Marco Stornelli <marco.stornelli@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoramoops: fix printk format warnings
Randy Dunlap [Thu, 3 May 2012 05:45:03 +0000 (15:45 +1000)]
ramoops: fix printk format warnings

Fix printk format warnings for phys_addr_t type variables:

drivers/char/ramoops.c:246:3: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'phys_addr_t'
drivers/char/ramoops.c:273:2: warning: format '%llx' expects type 'long long unsigned int', but argument 3 has type 'phys_addr_t'

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Kees Cook <keescook@chromium.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoramoops: use pstore interface
Kees Cook [Thu, 3 May 2012 05:45:02 +0000 (15:45 +1000)]
ramoops: use pstore interface

Instead of using /dev/mem directly and forcing userspace to know (or
extract) where the platform has defined persistent memory, how many slots
it has, the sizes, etc, use the common pstore infrastructure to handle
Oops gathering and extraction.  This presents a much easier to use
filesystem-based view to the memory region.  This also means that any
other tools that are written to understand pstore will automatically be
able to process ramoops too.

Signed-off-by: Kees Cook <keescook@chromium.org>
Cc: Tony Luck <tony.luck@intel.com>
Cc: Marco Stornelli <marco.stornelli@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: persistent_ram: Prepare for modular builds
Anton Vorontsov [Wed, 16 May 2012 12:43:19 +0000 (05:43 -0700)]
staging: android: persistent_ram: Prepare for modular builds

This is a transition patch to keep things bisectable, just moves
some routines under '#ifndef MODULE'. The code inside the #ifndef
will go away soon, but so far we must support pstore and ram_console.

So, we are about to use persistent_ram with pstore, with the ability
to compile persistent_ram routines as modules. Some parts of
persistent_ram uses memblock_reserve() routine, which is should be
only used built-in code, and thus it is not exported.

These persistent_ram bits are only used by Android's ram_console,
which is always built-in.

Without this patch, we won't able to compile persistent_ram as a
module:

ERROR: "memblock_reserve" [fs/pstore/ramoops.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2

(As alternative, we could export memblock_reserve, but the thing
is: we won't need it later.)

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: android: persistent_ram: Remove never used struct persistent_ram_zone members
Anton Vorontsov [Wed, 16 May 2012 12:42:57 +0000 (05:42 -0700)]
staging: android: persistent_ram: Remove never used struct persistent_ram_zone members

Remove 'old_log_footer_size' and 'early' members of struct
persistent_ram_zone, as these were never used at all.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: rtl8712: Fix typo in rtl871x_io.h
Masanari Iida [Tue, 15 May 2012 18:34:19 +0000 (03:34 +0900)]
staging: rtl8712: Fix typo in rtl871x_io.h

Correct spelling typo "padater" to "padapter" in rtl871x_io.h

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor adv_pci1710 driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 20:12:53 +0000 (13:12 -0700)]
staging: comedi: refactor adv_pci1710 driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written and
removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor adv_pci1_dio driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 20:23:58 +0000 (13:23 -0700)]
staging: comedi: refactor adv_pci1_dio driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written and
removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor adl_pci9118 driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 20:42:04 +0000 (13:42 -0700)]
staging: comedi: refactor adl_pci9118 driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

While moving the struct boardtype, convert it to C99 initializers
to improve code readability. This results is a slight increase in
the total lines of code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor amplc_pci224 driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 20:50:01 +0000 (13:50 -0700)]
staging: comedi: refactor amplc_pci224 driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor amplc_pci230 driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 21:08:11 +0000 (14:08 -0700)]
staging: comedi: refactor amplc_pci230 driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor cb_pcidas64 driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 21:32:21 +0000 (14:32 -0700)]
staging: comedi: refactor cb_pcidas64 driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor cb_pcidas driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 21:48:04 +0000 (14:48 -0700)]
staging: comedi: refactor cb_pcidas driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor cb_pcidda driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 21:53:29 +0000 (14:53 -0700)]
staging: comedi: refactor cb_pcidda driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor cb_pcidio driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 21:59:47 +0000 (14:59 -0700)]
staging: comedi: refactor cb_pcidio driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor cb_pcimdas driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 22:04:40 +0000 (15:04 -0700)]
staging: comedi: refactor cb_pcimdas driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor cb_pcimdda driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 22:10:25 +0000 (15:10 -0700)]
staging: comedi: refactor cb_pcimdda driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor comedi_bond driver and use module_comedi_driver
H Hartley Sweeten [Tue, 15 May 2012 22:20:02 +0000 (15:20 -0700)]
staging: comedi: refactor comedi_bond driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor comedi_parport driver and use module_comedi_driver
H Hartley Sweeten [Tue, 15 May 2012 22:23:52 +0000 (15:23 -0700)]
staging: comedi: refactor comedi_parport driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor comedi_test driver and use module_comedi_driver
H Hartley Sweeten [Tue, 15 May 2012 22:30:51 +0000 (15:30 -0700)]
staging: comedi: refactor comedi_test driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor das16m1 driver and use module_comedi_driver
H Hartley Sweeten [Tue, 15 May 2012 23:02:34 +0000 (16:02 -0700)]
staging: comedi: refactor das16m1 driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Refactor some of the other functions to remove the remaining
forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor das6402 driver and use module_comedi_driver
H Hartley Sweeten [Tue, 15 May 2012 23:08:04 +0000 (16:08 -0700)]
staging: comedi: refactor das6402 driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor dt2801 driver and use module_comedi_driver
H Hartley Sweeten [Tue, 15 May 2012 23:28:27 +0000 (16:28 -0700)]
staging: comedi: refactor dt2801 driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Refactor some of the other functions to remove the remaining
forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor dt2811 driver and use module_comedi_driver
H Hartley Sweeten [Tue, 15 May 2012 23:35:38 +0000 (16:35 -0700)]
staging: comedi: refactor dt2811 driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Refactor some of the other functions to remove the remaining
forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor gsc_hpdi driver and use module_comedi_pci_driver
H Hartley Sweeten [Tue, 15 May 2012 23:44:14 +0000 (16:44 -0700)]
staging: comedi: refactor gsc_hpdi driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor ii_pci20kc driver and use module_comedi_driver
H Hartley Sweeten [Tue, 15 May 2012 23:55:37 +0000 (16:55 -0700)]
staging: comedi: refactor ii_pci20kc driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor ni_pcidio driver and use module_comedi_driver
H Hartley Sweeten [Wed, 16 May 2012 00:09:09 +0000 (17:09 -0700)]
staging: comedi: refactor ni_pcidio driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written
and removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor ni_at_a2150 driver and use module_comedi_driver
H Hartley Sweeten [Wed, 16 May 2012 00:17:14 +0000 (17:17 -0700)]
staging: comedi: refactor ni_at_a2150 driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor ni_at_ao driver and use module_comedi_driver
H Hartley Sweeten [Wed, 16 May 2012 00:22:02 +0000 (17:22 -0700)]
staging: comedi: refactor ni_at_ao driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor ni_atmio16d driver and use module_comedi_driver
H Hartley Sweeten [Wed, 16 May 2012 00:28:53 +0000 (17:28 -0700)]
staging: comedi: refactor ni_atmio16d driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor ni_atmio driver and use module_comedi_driver
H Hartley Sweeten [Wed, 16 May 2012 00:36:01 +0000 (17:36 -0700)]
staging: comedi: refactor ni_atmio driver and use module_comedi_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive to the end of the source. This is more
typical of how other drivers are written and removes the need
for the forward declarations.

Convert the driver to use the module_comedi_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor unioxx5 driver to remove forward declarations
H Hartley Sweeten [Tue, 15 May 2012 18:28:43 +0000 (11:28 -0700)]
staging: comedi: refactor unioxx5 driver to remove forward declarations

Refactor of the unioxx5 comedi driver to remove all the forward
declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: gdm72xx: Add GCT GDM72xx WiMAX driver.
Sage Ahn [Tue, 15 May 2012 04:20:36 +0000 (13:20 +0900)]
staging: gdm72xx: Add GCT GDM72xx WiMAX driver.

This patch provides the kernel driver for the GDM72xx WiMAX chips
developed by GCT Semiconductor, Inc., which enables mobile WiMAX
connection on the Linux host.

Signed-off-by: Sage Ahn <syahn@gctsemi.com>
Cc: Ben Chan <benchan@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agomei: Documentation: add generated example binary into .gitignore file
Tomas Winkler [Mon, 14 May 2012 20:52:09 +0000 (23:52 +0300)]
mei: Documentation: add generated example binary into .gitignore file

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: wlags49_h2: potential NULL dereference
Dan Carpenter [Mon, 14 May 2012 20:56:46 +0000 (23:56 +0300)]
Staging: wlags49_h2: potential NULL dereference

wl_device_dealloc() dereferences the "dev" paramter, so let's move it
under the check for NULL.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: refactor ni_pcimio driver and use module_comedi_pci_driver
H Hartley Sweeten [Fri, 11 May 2012 23:51:56 +0000 (16:51 -0700)]
staging: comedi: refactor ni_pcimio driver and use module_comedi_pci_driver

Move the module_init/module_exit routines and the associated
struct comedi_drive and struct pci_driver to the end of the
source. This is more typical of how other drivers are written and
removes the need for the forward declarations.

Convert the driver to use the module_comedi_pci_driver() macro
which makes the code smaller and a bit simpler.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: Use module_comedi_pci_driver and standardize drivers
H Hartley Sweeten [Fri, 11 May 2012 23:16:20 +0000 (16:16 -0700)]
staging: comedi: Use module_comedi_pci_driver and standardize drivers

Convert the refactored comedi pci drivers to use the
module_comedi_pci_driver() macro which makes the code
smaller and a bit simpler.

In the process, rename some of the symbols in the driver
to standardize the comedi pci drivers.

Based on the driver {name}:
1) Rename the comedi_driver to {name}_driver.
2) Use a static string {name} for the comedi_driver.driver_name.
3) Rename the pci probe/remove functions to {name)_pci_probe/remove.
4) Rename the pci id_table to {name}_pci_table.
5) Add the static string {name} for the pci_driver.name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: Add helper macro for comedi pci driver boilerplate
H Hartley Sweeten [Fri, 11 May 2012 23:15:39 +0000 (16:15 -0700)]
staging: comedi: Add helper macro for comedi pci driver boilerplate

Introduce the module_comedi_pci_driver macro, and the
associated register/unregister functions, which is a
convenience macro for comedi pci driver modules similar
to module_platform_driver. It is intended to be used by
drivers where the init/exit section does nothing but
register/unregister the comedi driver and associated pci
driver. By using this macro it is possible to eliminate
a few lines of boilerplate code per comedi pci driver.

Add a check to make sure that the pci_driver->name is
set. Once all the comedi pci drivers have been fixed this
will be removed.

Also, when registering the pci driver check for failure
and unregister the comedi driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: fix a few sparse warnings
Samuel Iglesias Gonsalvez [Mon, 14 May 2012 10:41:25 +0000 (12:41 +0200)]
Staging: ipack: fix a few sparse warnings

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: added more info in Kconfig's help about ipack
Samuel Iglesias Gonsalvez [Fri, 11 May 2012 08:17:16 +0000 (10:17 +0200)]
Staging: ipack: added more info in Kconfig's help about ipack

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/devices/ipoctal: change the licence to explicitly GPLv2
Samuel Iglesias Gonsalvez [Fri, 11 May 2012 08:17:15 +0000 (10:17 +0200)]
Staging: ipack/devices/ipoctal: change the licence to explicitly GPLv2

Change the licence to explicitly GPLv2 to avoid possible conflicts in the
future.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack/bridges/tpci200: change the licence to explicitly GPLv2
Samuel Iglesias Gonsalvez [Fri, 11 May 2012 08:17:14 +0000 (10:17 +0200)]
Staging: ipack/bridges/tpci200: change the licence to explicitly GPLv2

Change the licence to explicitly GPLv2 to avoid possible conflicts in the
future.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: change the licence to explicitly GPLv2
Samuel Iglesias Gonsalvez [Fri, 11 May 2012 08:17:13 +0000 (10:17 +0200)]
Staging: ipack: change the licence to explicitly GPLv2

Change the licence to explicitly GPLv2 to avoid possible conflicts in the
future.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: add contact email in TODO file
Samuel Iglesias Gonsalvez [Fri, 11 May 2012 08:17:12 +0000 (10:17 +0200)]
Staging: ipack: add contact email in TODO file

Added myself in the TODO file.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: ipack: move the devices source line in Kconfig file
Samuel Iglesias Gonsalvez [Fri, 11 May 2012 08:17:11 +0000 (10:17 +0200)]
Staging: ipack: move the devices source line in Kconfig file

Maintain the proper order of definitions in Kconfig following the time order of
the commits.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoStaging: move the position of the ipack source line in Kconfig
Samuel Iglesias Gonsalvez [Fri, 11 May 2012 08:17:10 +0000 (10:17 +0200)]
Staging: move the position of the ipack source line in Kconfig

Moved the ipack source line to the proper place, at the end of the list in the
staging's Kconfig file.

Signed-off-by: Samuel Iglesias Gonsalvez <siglesias@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:meter: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:54 +0000 (15:39 +0200)]
staging:iio:meter: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:resolver: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:53 +0000 (15:39 +0200)]
staging:iio:resolver: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:magnetometer: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:52 +0000 (15:39 +0200)]
staging:iio:magnetometer: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:light: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:51 +0000 (15:39 +0200)]
staging:iio:light: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:imu: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:50 +0000 (15:39 +0200)]
staging:iio:imu: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:impedance-analyzer: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:49 +0000 (15:39 +0200)]
staging:iio:impedance-analyzer: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:gyro: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:48 +0000 (15:39 +0200)]
staging:iio:gyro: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:frequency: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:47 +0000 (15:39 +0200)]
staging:iio:frequency: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:46 +0000 (15:39 +0200)]
staging:iio:dac: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:cdc: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:45 +0000 (15:39 +0200)]
staging:iio:cdc: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:addac: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:44 +0000 (15:39 +0200)]
staging:iio:addac: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:accel: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:43 +0000 (15:39 +0200)]
staging:iio:accel: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:adc: Use dev_to_iio_dev()
Lars-Peter Clausen [Sat, 12 May 2012 13:39:42 +0000 (15:39 +0200)]
staging:iio:adc: Use dev_to_iio_dev()

Replace open-coded instances of getting a iio_dev struct from a device struct
with dev_to_iio_dev().

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:adis16400_ring: Pass IIO device directly
Lars-Peter Clausen [Sat, 12 May 2012 13:39:41 +0000 (15:39 +0200)]
staging:iio:adis16400_ring: Pass IIO device directly

When calling adis16350_spi_read_all and adis16400_spi_read_burst we pass the
device struct of embedded in the IIO device only to look up the IIO device from
the device struct again right away. This patch changes the code to pass the IIO
device directly.

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:ade7758_spi_read_burst: Pass IIO device directly
Lars-Peter Clausen [Sat, 12 May 2012 13:39:40 +0000 (15:39 +0200)]
staging:iio:ade7758_spi_read_burst: Pass IIO device directly

When calling ade7758_spi_read_burst we pass the device struct of embedded in the
IIO device only to look up the IIO device from the device struct again right
away. This patch changes the code to pass the IIO device directly.

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:adis16260_read_ring_data: Pass IIO device directly
Lars-Peter Clausen [Sat, 12 May 2012 13:39:39 +0000 (15:39 +0200)]
staging:iio:adis16260_read_ring_data: Pass IIO device directly

When calling adis16260_read_ring_data we pass the device struct of embedded in
the IIO device only to look up the IIO device from the device struct again right
away. This patch changes the code to pass the IIO device directly.

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>