profile/ivi/kernel-x86-ivi.git
11 years agostaging: comedi: contec_pci: remove manual legacy attach
H Hartley Sweeten [Fri, 17 Aug 2012 16:34:52 +0000 (09:34 -0700)]
staging: comedi: contec_pci: remove manual legacy attach

This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: android: binder: Remove an inconsequential conditional macro
Sachin Kamat [Fri, 17 Aug 2012 11:09:37 +0000 (16:39 +0530)]
Staging: android: binder: Remove an inconsequential conditional macro

Removes an inconsequential conditional macro.

Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: android: binder: Make task_get_unused_fd_flags function static
Sachin Kamat [Fri, 17 Aug 2012 11:09:36 +0000 (16:39 +0530)]
Staging: android: binder: Make task_get_unused_fd_flags function static

Silence the following warning:
drivers/staging/android/binder.c:368:5: warning:
symbol 'task_get_unused_fd_flags' was not declared. Should it be static?

Cc: Arve Hjønnevåg <arve@android.com>
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: bcm: Fix typo in drivers/bcm
Masanari Iida [Fri, 17 Aug 2012 16:07:16 +0000 (01:07 +0900)]
staging: bcm: Fix typo in drivers/bcm

Correct spelling typo in drivers/bcm

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/olpc_dcon: fix checkpatch warnings
Toshiaki Yamane [Fri, 17 Aug 2012 05:37:21 +0000 (14:37 +0900)]
staging/olpc_dcon: fix checkpatch warnings

The below checkpatch warnings was fixed,

-  WARNING: Prefer pr_debug(... to printk(KERN_DEBUG, ...
-  WARNING: Prefer pr_warn(... to printk(KERN_WARNING, ...
-  WARNING: Prefer pr_info(... to printk(KERN_INFO, ...
-  WARNING: Prefer pr_err(... to printk(KERN_ERR, ...

And added pr_fmt.

Signed-off-by: Toshiaki Yamane <yamanetoshi@gmail.com>
Acked-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: update man pages for v1.0.0
W. Trevor King [Fri, 17 Aug 2012 10:49:37 +0000 (06:49 -0400)]
staging: usbip: userspace: update man pages for v1.0.0

This brings them back up to date after:

  commit e9837bbb3e694eef4c55c934ebf1f8a0399b142c
  Author: matt mooney <mfm@muteddisk.com>
  Date:   Thu May 26 06:17:11 2011 -0700

    staging: usbip: userspace tools v1.0.0

I couldn't find a current equivalent for

  client:# usbip --port

Perhaps that functionality has been deprecated due to better logging.
It seems like libsrc/usbip_common.h's usbip_status_string is no longer
used.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: userspace: allow `configure --with-tcp-wrappers`
W. Trevor King [Fri, 17 Aug 2012 10:47:05 +0000 (06:47 -0400)]
staging: usbip: userspace: allow `configure --with-tcp-wrappers`

When `--with-tcp-wrappers` is passed to `configure`, the previous code
always reset LIBS to $saved_LIBS, regardless of whether libwrap was
found or not.  The current code makes the `--with-tcp-wrappers` case
look more like the default case, and it only resets LIBS if libwrap
was not found.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: usbip: export usbip_debug_flag as a usbip-core module parameter.
W. Trevor King [Fri, 17 Aug 2012 02:22:36 +0000 (22:22 -0400)]
staging: usbip: export usbip_debug_flag as a usbip-core module parameter.

Now usbip_common.c's pr_fmt is the only thing setup by CONFIG_USBIP_DEBUG
that you can't subsequently alter using this parameter.

Signed-off-by: W. Trevor King <wking@tremily.us>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ke_counter: use attach_pci callback
H Hartley Sweeten [Fri, 17 Aug 2012 02:55:43 +0000 (19:55 -0700)]
staging: comedi: ke_counter: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dyna_pci10xx: remove manual legacy attach
H Hartley Sweeten [Fri, 17 Aug 2012 02:55:19 +0000 (19:55 -0700)]
staging: comedi: dyna_pci10xx: remove manual legacy attach

This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: use attach_pci callback
H Hartley Sweeten [Fri, 17 Aug 2012 02:55:01 +0000 (19:55 -0700)]
staging: comedi: cb_pcimdda: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function.

This driver does use an external configuration option to determine
the analog output range which is controlled by a jumper on the board.
In order to remove the legacy 'attach' callback, an assumption is made
that the jumper is in the factory setting position for +/-5V outputs.
This does not effect the operation of the board just the range info
that is returned to the user.

A sysfs method will be investigated to allow the user to change the
range.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: cleanup the analog out read/write
H Hartley Sweeten [Fri, 17 Aug 2012 02:54:32 +0000 (19:54 -0700)]
staging: comedi: cb_pcimdda: cleanup the analog out read/write

Use the register map define to work out the i/o address.

Cleanup the comments about the simultaneous transfer mode for
the analog outputs.

Change the return to 'insn->n', the comedi core expects the return
to be the number of data elements used. Technically the 'i' value
is correct but 'insn->n' just makes it clearer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: minor cleanup of the private data
H Hartley Sweeten [Fri, 17 Aug 2012 02:54:05 +0000 (19:54 -0700)]
staging: comedi: cb_pcimdda: minor cleanup of the private data

Remove the cut-and-paste comment from the skel driver and for
aesthetic reasons, move the #define out of the struct.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: fix bug in call to subdev_8255_cleanup
H Hartley Sweeten [Fri, 17 Aug 2012 02:53:45 +0000 (19:53 -0700)]
staging: comedi: cb_pcimdda: fix bug in call to subdev_8255_cleanup

The attach function only allocated 2 subdevices, an analog output
sundevice (index 0) and the 8255 dio subdevice (index 1). The
detach function is passing the wrong subdevice (index 2) to the
subdev_8255_cleanup function which will result in a bug when
it tries to do the kfree(s->private).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove attached_to_8255 from private data
H Hartley Sweeten [Fri, 17 Aug 2012 02:53:20 +0000 (19:53 -0700)]
staging: comedi: cb_pcimdda: remove attached_to_8255 from private data

The attached_to_8255 variable in the private data is used as a flag
to indicate that the 8255 subdevice has been initialized. The call
to subdev_8255_cleanup only requires that the dev->subdevices pointer
is valid. Change the test in the detach function and remove the
attached_to_8255 variable.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove boardinfo
H Hartley Sweeten [Fri, 17 Aug 2012 02:52:52 +0000 (19:52 -0700)]
staging: comedi: cb_pcimdda: remove boardinfo

The boardinfo struct and associated code is no longer needed
by this driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove ao_chans and ao_bits from boardinfo
H Hartley Sweeten [Fri, 17 Aug 2012 02:52:30 +0000 (19:52 -0700)]
staging: comedi: cb_pcimdda: remove ao_chans and ao_bits from boardinfo

This board always has 6, 16-bit analog outputs. There is no need to carry
this information in the boardinfo. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove regs_badrindex and reg_sz from boardinfo
H Hartley Sweeten [Fri, 17 Aug 2012 02:51:58 +0000 (19:51 -0700)]
staging: comedi: cb_pcimdda: remove regs_badrindex and reg_sz from boardinfo

The base address of the card is always found in pci resource 3. There is
no need to carry this information in the boardinfo. The reg_sz is not
used in the driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove dio_offset from the boardinfo
H Hartley Sweeten [Fri, 17 Aug 2012 02:51:27 +0000 (19:51 -0700)]
staging: comedi: cb_pcimdda: remove dio_offset from the boardinfo

The 8255 device is located at a fixed offset from the base
address of the card. There is not need to carry this offset
in the boardinfo. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: define the register map
H Hartley Sweeten [Fri, 17 Aug 2012 02:51:05 +0000 (19:51 -0700)]
staging: comedi: cb_pcimdda: define the register map

Add defines for the register map of the card.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove dio_chans from the private data
H Hartley Sweeten [Fri, 17 Aug 2012 02:50:42 +0000 (19:50 -0700)]
staging: comedi: cb_pcimdda: remove dio_chans from the private data

The cards supported by this driver always have 8255 compatible
device. Remove the dio_chans variable from the private data and
always initialize the 8255 subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove the DIO_METHODS
H Hartley Sweeten [Fri, 17 Aug 2012 02:50:19 +0000 (19:50 -0700)]
staging: comedi: cb_pcimdda: remove the DIO_METHODS

The digital i/o on this card is handled by an 8255 compatible
device. There are not other options. Remove the DIO_METHODS
enum as well as the dio_method variable in the boardinfo and
the code dealing with it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: cleanup the 8255 subdevice init
H Hartley Sweeten [Fri, 17 Aug 2012 02:50:01 +0000 (19:50 -0700)]
staging: comedi: cb_pcimdda: cleanup the 8255 subdevice init

The dio_registers variable in the private data is only used to
pass the base address to the 8255 subdevice. Remove the variable
from the private data and pass the value directly to the
subdev_8255_init() function.

Make sure to check the return from subdev_8255_init(). That
function can fail. For aesthetic reasons, rename the local
variable 'err' to 'ret'.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: store the pci_dev in the comedi_device
H Hartley Sweeten [Fri, 17 Aug 2012 02:49:38 +0000 (19:49 -0700)]
staging: comedi: cb_pcimdda: store the pci_dev in the comedi_device

Use the hw_dev pointer in the comed_device struct to hold the
pci_dev instead of carrying it in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: use dev->iobase
H Hartley Sweeten [Fri, 17 Aug 2012 02:49:15 +0000 (19:49 -0700)]
staging: comedi: cb_pcimdda: use dev->iobase

Use dev->iobase for the pci i/o address instead of carrying it
in the private data.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: cleanup pci probe
H Hartley Sweeten [Fri, 17 Aug 2012 02:48:56 +0000 (19:48 -0700)]
staging: comedi: cb_pcimdda: cleanup pci probe

Make cb_pcimdda_probe() return the pointer to the found pci_dev
and move the comedi_pci_enable() call into the 'attach' function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: add namespace to the driver
H Hartley Sweeten [Fri, 17 Aug 2012 02:48:35 +0000 (19:48 -0700)]
staging: comedi: cb_pcimdda: add namespace to the driver

The structs, static data, and functions in this driver have
pretty generic names. Add namespace to everything to prevent
any problems.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove forward declarations
H Hartley Sweeten [Fri, 17 Aug 2012 02:48:14 +0000 (19:48 -0700)]
staging: comedi: cb_pcimdda: remove forward declarations

Move a couple of the functions in order to remove the need for
the forward declarations.

Also, remove the unnecessary comments.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove thisboard and devpriv macros
H Hartley Sweeten [Fri, 17 Aug 2012 02:47:51 +0000 (19:47 -0700)]
staging: comedi: cb_pcimdda: remove thisboard and devpriv macros

These macros rely on a local variable having a specific name.
Remove them and use the comedi_board() helper to get the thisboard
pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdda: remove REG_SZ and REGS_BARINDEX macros
H Hartley Sweeten [Fri, 17 Aug 2012 02:47:26 +0000 (19:47 -0700)]
staging: comedi: cb_pcimdda: remove REG_SZ and REGS_BARINDEX macros

The REG_SZ macro isn't being use. Both macros use the 'thisboard'
macro which relys on a local variable having a specific name.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdas: use attach_pci callback
H Hartley Sweeten [Fri, 17 Aug 2012 02:47:05 +0000 (19:47 -0700)]
staging: comedi: cb_pcimdas: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdas: remove forward declarations
H Hartley Sweeten [Fri, 17 Aug 2012 02:46:40 +0000 (19:46 -0700)]
staging: comedi: cb_pcimdas: remove forward declarations

Move a couple of the functions in order to remove the need for
the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcimdas: remove thisboard and devpriv macros
H Hartley Sweeten [Fri, 17 Aug 2012 02:46:20 +0000 (19:46 -0700)]
staging: comedi: cb_pcimdas: remove thisboard and devpriv macros

These macros rely on a local variable having a specific name.
Remove them and use the comedi_board() helper to get the thisboard
pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidda: use attach_pci callback
H Hartley Sweeten [Fri, 17 Aug 2012 02:45:54 +0000 (19:45 -0700)]
staging: comedi: cb_pcidda: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidda: remove forward declarations
H Hartley Sweeten [Fri, 17 Aug 2012 02:45:30 +0000 (19:45 -0700)]
staging: comedi: cb_pcidda: remove forward declarations

Move a couple of the functions in order to remove the need for
the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidda: remove thisboard and devpriv macros
H Hartley Sweeten [Fri, 17 Aug 2012 02:44:59 +0000 (19:44 -0700)]
staging: comedi: cb_pcidda: remove thisboard and devpriv macros

These macros rely on a local variable having a specific name.
Remove them and use the comedi_board() helper to get the thisboard
pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidio: use attach_pci callback
H Hartley Sweeten [Fri, 17 Aug 2012 02:44:35 +0000 (19:44 -0700)]
staging: comedi: cb_pcidio: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidio: remove thisboard macro
H Hartley Sweeten [Fri, 17 Aug 2012 02:43:55 +0000 (19:43 -0700)]
staging: comedi: cb_pcidio: remove thisboard macro

This macro relies on a local variable having a specific name.
Remove it and use the comedi_board() helper to get the pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: cb_pcidas: use attach_pci callback
H Hartley Sweeten [Fri, 17 Aug 2012 02:43:29 +0000 (19:43 -0700)]
staging: comedi: cb_pcidas: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci8164: use attach_pci callback
H Hartley Sweeten [Fri, 17 Aug 2012 02:43:05 +0000 (19:43 -0700)]
staging: comedi: adl_pci8164: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an 'attach_pci' callback function. Since the
driver does not require any external configuration options, and
the legacy 'attach' callback is now optional, remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci7x3x: remove manual legacy attach
H Hartley Sweeten [Fri, 17 Aug 2012 02:42:30 +0000 (19:42 -0700)]
staging: comedi: adl_pci7x3x: remove manual legacy attach

This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci7296: remove manual legacy attach
H Hartley Sweeten [Fri, 17 Aug 2012 02:42:09 +0000 (19:42 -0700)]
staging: comedi: adl_pci7296: remove manual legacy attach

This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci6208: remove manual legacy attach
H Hartley Sweeten [Fri, 17 Aug 2012 02:41:45 +0000 (19:41 -0700)]
staging: comedi: adl_pci6208: remove manual legacy attach

This driver uses the 'attach_pci' callback to attach the pci device
to the comedi subsystem. Since the 'attach' callback is now optional
it can be removed from the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: tidspbridge: fix uuid strings
Omar Ramirez Luna [Thu, 16 Aug 2012 23:33:26 +0000 (18:33 -0500)]
staging: tidspbridge: fix uuid strings

Commit 8cb05f4b54535cb91d7a5f9f8eb230bd4fa86e4e (staging:
tidspbridge: eliminate uuid_uuid_to_string), not only broke
compilation but also functionality for tidspbridge driver.

So:
- Replace remaining instances of uuid_uuid_to_string with snprintf
  to fix compilation.
- Fix the format from %pU to %pUL.
- Since these UUIDs are used in the firmware to reference section
  names, the firmware doesn't follow the standard uuid delimiter '-'
  it uses '_' instead. The driver can follow the standard convention
  however for dsp sections we must transform the uuid to what is
  expected by the firmware. E.g.:

  tidspbridge sees: 24BC8D90-BB45-11D4-B756-006008BDB66F
  firmware expects: .24BC8D90_BB45_11D4_B756_006008BDB66F

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
CC: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge tag 'iio-for-v3.7a' of git://git.kernel.org/pub/scm/linux/kernel/git/jic23...
Greg Kroah-Hartman [Thu, 16 Aug 2012 21:06:39 +0000 (14:06 -0700)]
Merge tag 'iio-for-v3.7a' of git://git./linux/kernel/git/jic23/iio into staging-next

First set of IIO rework and new drivers for 3.7 cycle.

New MXS adc driver form Marek Vasut with a minor addition
to the example code to support 4 byte reads.

First of I suspect many devm conversion patches form Julia Lawall
Some module_platform_driver uses that somehow got missed the
first time around.

Couple of other useful cleanups.

11 years agoIIO: Add basic MXS LRADC driver
Marek Vasut [Sun, 12 Aug 2012 15:21:00 +0000 (16:21 +0100)]
IIO: Add basic MXS LRADC driver

This driver is very basic. It supports userland trigger, buffer and
raw access to channels. The support for delay channels is missing
altogether.

Signed-off-by: Marek Vasut <marex@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Juergen Beisert <jbe@pengutronix.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Wolfgang Denk <wd@denx.de>
11 years agoIIO: Add 4-byte unsigned reads into generic-buffer example
Marek Vasut [Sun, 12 Aug 2012 15:21:00 +0000 (16:21 +0100)]
IIO: Add 4-byte unsigned reads into generic-buffer example

Add unsigned 32bit-wide reads into the generic-buffer.c

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jonathan Cameron <jic23@kernel.org>
Cc: Juergen Beisert <jbe@pengutronix.de>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Cc: Wolfgang Denk <wd@denx.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agodrivers/iio/adc/at91_adc.c: use devm_ functions
Julia Lawall [Tue, 31 Jul 2012 13:09:00 +0000 (14:09 +0100)]
drivers/iio/adc/at91_adc.c: use devm_ functions

The various devm_ functions allocate memory that is released when a driver
detaches.  This patch uses these functions for data that is allocated in
the probe function of a platform device and is only freed in the remove
function.

The call to platform_get_resource(pdev, IORESOURCE_MEM, 0) is moved coser
to the call to devm_request_and_ioremap, which is th first use of the
result of platform_get_resource.

This does not use devm_request_irq to ensure that free_irq is executed
before its idev argument is freed.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:csr: remove usage of CsrSnprintf and use scnprintf
Devendra Naga [Thu, 16 Aug 2012 16:20:03 +0000 (21:50 +0530)]
staging:csr: remove usage of CsrSnprintf and use scnprintf

This change tries to achieve the removal of the csr driver defined snprintf
and uses the kernel defined snprintf.

After this change i got following build warnings, which are solved in this patch

warnings generated:

drivers/staging/csr/io.c:929:13: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’
drivers/staging/csr/io.c:929:13: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘u32’
drivers/staging/csr/csr_wifi_hip_udi.c: In function ‘unifi_print_status’:
drivers/staging/csr/csr_wifi_hip_udi.c:78:27: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’
drivers/staging/csr/csr_wifi_hip_udi.c:151:27: warning: format ‘%u’ expects type ‘unsigned int’, but argument 5 has type ‘long int’
drivers/staging/csr/csr_wifi_hip_udi.c:257:27: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’
drivers/staging/csr/csr_wifi_hip_udi.c:257:27: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 5 has type ‘u32’
drivers/staging/csr/csr_wifi_hip_udi.c:261:27: warning: format ‘%lu’ expects type ‘long unsigned int’, but argument 4 has type ‘u32’

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: replace printk calls in comedi core
Ian Abbott [Thu, 16 Aug 2012 13:38:05 +0000 (14:38 +0100)]
staging: comedi: replace printk calls in comedi core

Replace the printk() calls in the comedi core module with something more
suitable, such as dev_...() or pr_...().  Remove the ones that report a
failure to increment a module count (try_module_get() failure).  Change
the printk() call in the DPRINTK() macro to pr_debug().

TODO: Most of the DPRINTK() calls need to be replaced with something
else.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_pc236: abbreviate IS_ENABLED()
Ian Abbott [Thu, 16 Aug 2012 11:24:11 +0000 (12:24 +0100)]
staging: comedi: amplc_pc236: abbreviate IS_ENABLED()

The IS_ENABLED(CONFIG_COMEDI_AMPLC_PC236_ISA) and
IS_ENABLED(CONFIG_COMEDI_AMPLC_PC236_PCI) macro calls are a bit
long-winded.  Define a couple of macros DO_ISA and DO_PCI as
abbreviations for them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_pc236: check bus type before accessing LCR
Ian Abbott [Thu, 16 Aug 2012 11:24:10 +0000 (12:24 +0100)]
staging: comedi: amplc_pc236: check bus type before accessing LCR

The PCI-local bridge LCR registers are (assumed to be) present and used
iff the board is a PCI board (a PCI236).  Currently the code tests if
devpriv->lcr_iobase is valid before accessing the registers.  Instead,
check if the board is a PCI board and assume devpriv->lcr_iobase is
valid if so.  (Currently, no validity check is performed as the PCI
vendor and device ID ought to suffice, but simple checks could be added
when attaching the device.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_pc236: check bus type in detach routine
Ian Abbott [Thu, 16 Aug 2012 11:24:09 +0000 (12:24 +0100)]
staging: comedi: amplc_pc236: check bus type in detach routine

When detaching the device in pc236_detach() mirror the bus type checks
performed by pc236_attach().  The existing tests are safe but rely on
dev->iobase being 0 when comedi_to_pci_dev(dev) is NULL.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_pc236: add helper functions to check bus type
Ian Abbott [Thu, 16 Aug 2012 11:24:08 +0000 (12:24 +0100)]
staging: comedi: amplc_pc236: add helper functions to check bus type

Add inline helper function is_isa_board(board) to check if the driver
supports ISA boards and this is an ISA board, and is_pci_board(board) to
check if the driver supports PCI boards and this is a PCI board.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_pc263: abbreviate IS_ENABLED()
Ian Abbott [Thu, 16 Aug 2012 10:14:20 +0000 (11:14 +0100)]
staging: comedi: amplc_pc263: abbreviate IS_ENABLED()

The IS_ENABLED(CONFIG_COMEDI_AMPLC_PC263_ISA) and
IS_ENABLED(CONFIG_COMEDI_AMPLC_PC263_PCI) macro calls are a bit
long-winded.  Define a couple of macros DO_ISA and DO_PCI as
abbreviations for them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_pc263: check bus type in detach routine
Ian Abbott [Thu, 16 Aug 2012 10:14:19 +0000 (11:14 +0100)]
staging: comedi: amplc_pc263: check bus type in detach routine

When detaching the device in pc263_detach() mirror the bus type checks
performed by pc263_attach().  The existing tests are safe but rely on
dev->iobase being 0 when comedi_to_pci_dev(dev) is NULL.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_pc263: add helper functions to check bus type
Ian Abbott [Thu, 16 Aug 2012 10:14:18 +0000 (11:14 +0100)]
staging: comedi: amplc_pc263: add helper functions to check bus type

Add inline helper function is_isa_board(board) to check if the driver
supports ISA boards and this is an ISA board, and is_pci_board(board) to
check if the driver supports PCI boards and this is a PCI board.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: contec_pci_dio: cleanup contec_do_insn_bits
H Hartley Sweeten [Thu, 16 Aug 2012 00:32:53 +0000 (17:32 -0700)]
staging: comedi: contec_pci_dio: cleanup contec_do_insn_bits

Create local variables for the mask and bits values passed in
the data pointer to make this function a bit clearer.

Return the state of the output bits (s->state) in data[1] since
this is what comedilib is expecting.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: contec_pci_dio: use attach_pci callback
H Hartley Sweeten [Thu, 16 Aug 2012 00:32:29 +0000 (17:32 -0700)]
staging: comedi: contec_pci_dio: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an attach_pci callback function. Since the
driver does not require any external configuration options, disable
the legacy attach by making the attach simply return -ENOSYS. This
removes the need to walk to pci bus to find the pci_dev and the
need for the pci_dev_put in the detach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: contec_pci_dio: remove unneeded boardinfo code
H Hartley Sweeten [Thu, 16 Aug 2012 00:31:59 +0000 (17:31 -0700)]
staging: comedi: contec_pci_dio: remove unneeded boardinfo code

The boardinfo code is not needed by this driver. Only one board
type is supported.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: contec_pci_dio: define register map for board
H Hartley Sweeten [Thu, 16 Aug 2012 00:31:39 +0000 (17:31 -0700)]
staging: comedi: contec_pci_dio: define register map for board

Only one board type is supported by this driver. Instead of
passing the register offsets for the digital in/out ports in
the boardinfo, define the register map and use that to access
the ports.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: contec_pci_dio: remove unused fields in the boardinfo
H Hartley Sweeten [Thu, 16 Aug 2012 00:31:12 +0000 (17:31 -0700)]
staging: comedi: contec_pci_dio: remove unused fields in the boardinfo

The model, in_ports, out_ports, and out_boffs information in the
boardinfo is not used by the driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: contec_pci_dio: remove function trace messages
H Hartley Sweeten [Thu, 16 Aug 2012 00:30:50 +0000 (17:30 -0700)]
staging: comedi: contec_pci_dio: remove function trace messages

The dev_dbg function trace messages in the contec_do_insn_bits
and contec_di_insn_bits functions are just noise. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: contec_pci_dio: remove thisboard macro
H Hartley Sweeten [Thu, 16 Aug 2012 00:30:26 +0000 (17:30 -0700)]
staging: comedi: contec_pci_dio: remove thisboard macro

This macro relies on a local variable of a specific name. Remove the
macro and use the comedi_board() helper to get the thisboard pointer.

Move the 'dev->board_name = thisboard->name;' in contec_attach().
The contec_find_pci_dev() function modifies the dev->board_ptr.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: serqt_usb2: remove return in ProcessLineStatus and ProcessModemStatus
Devendra Naga [Wed, 15 Aug 2012 09:11:04 +0000 (14:56 +0545)]
staging: serqt_usb2: remove return in ProcessLineStatus and ProcessModemStatus

These are void functions and they dont need return at the end of the function

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: serqt_usb2: remove retval initialisation in qt_tiocmget and qt_tiocmset
Devendra Naga [Wed, 15 Aug 2012 09:11:03 +0000 (14:56 +0545)]
staging: serqt_usb2: remove retval initialisation in qt_tiocmget and qt_tiocmset

in qt_tiocmset,

the retval gets assigned if we have a valid serial pointer in the critical section
(between mutex_lock and _unlock) of the code, no need to initialise this variable.

the same retval assignment follows in the qt_tiocmget function also, so remove the
initialisation here too.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: serqt_usb2: remove unneeded return in qt_throttle
Devendra Naga [Wed, 15 Aug 2012 09:11:02 +0000 (14:56 +0545)]
staging: serqt_usb2: remove unneeded return in qt_throttle

this return is in the end of the qt_throttle function, so this return
not needed

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: serqt_usb2: remove unneeded return in qt_unthrottle
Devendra Naga [Wed, 15 Aug 2012 09:11:01 +0000 (14:56 +0545)]
staging: serqt_usb2: remove unneeded return in qt_unthrottle

this return is at the end of the void function qt_unthrottle, which is
not needed, and also remove the new line below this.

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: asus_oled add MODULE_VERSION
Jonathan Brett [Wed, 15 Aug 2012 19:47:33 +0000 (20:47 +0100)]
staging: asus_oled add MODULE_VERSION

Moved version string from MODULE_DESCRIPTION to MODULE_VERSION

Signed-off-by: Jonathan Brett <jonbrett.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: asus_oled: Change printk calls to dev_xxx
Jonathan Brett [Wed, 15 Aug 2012 19:47:32 +0000 (20:47 +0100)]
staging: asus_oled: Change printk calls to dev_xxx

- Use dev_err whenever a struct device * is present
- None of the printk calls had levels set, but looked like they should
  probably be dev_err

Signed-off-by: Jonathan Brett <jonbrett.dev@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_dio200: replace macros with inline functions
Ian Abbott [Wed, 15 Aug 2012 14:31:41 +0000 (15:31 +0100)]
staging: comedi: amplc_dio200: replace macros with inline functions

Replace the IS_ISA_BOARD() and IS_PCI_BOARD() functionlike macros with
inline functions is_isa_board() and is_pci_board().  Also call
is_pci_board() in dio200_find_pci_board() instead of an explicit
comparison operator.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: make attach handler optional
Ian Abbott [Wed, 15 Aug 2012 14:02:45 +0000 (15:02 +0100)]
staging: comedi: make attach handler optional

Some low-level Comedi drivers no longer support manual configuration of
devices with the COMEDI_DEVCONFIG ioctl (used by the comedi_config
program).  For those drivers, the 'attach_pci' or 'attach_usb' handler
will be set in the struct comedi_driver to configure devices
automatically (via comedi_pci_auto_config() or
comedi_usb_auto_config()).  Their 'attach' handlers are redundant but
the the comedi core module currently requires it to be set.

Make the 'attach' handler optional and issue a warning if something
wants to call it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dnya_pci10xx: remove unused DRV_NAME
H Hartley Sweeten [Wed, 15 Aug 2012 01:25:59 +0000 (18:25 -0700)]
staging: comedi: dnya_pci10xx: remove unused DRV_NAME

This define is not used in the driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dnya_pci10xx: remove unneeded boardinfo code
H Hartley Sweeten [Wed, 15 Aug 2012 01:25:36 +0000 (18:25 -0700)]
staging: comedi: dnya_pci10xx: remove unneeded boardinfo code

The boardinfo code is not needed by this driver. Only one board
type is supported.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dnya_pci10xx: move boardinfo values into subdevice setup
H Hartley Sweeten [Wed, 15 Aug 2012 01:25:09 +0000 (18:25 -0700)]
staging: comedi: dnya_pci10xx: move boardinfo values into subdevice setup

There is only one "boardtype" actually supported by this driver.
The second entry in the boardinfo is a dummy entry that would
result in an unusable device.

Remove the boardinfo fields and just use the open coded values
in the subdevice setup.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dnya_pci10xx: remove unused fields in the boardinfo
H Hartley Sweeten [Wed, 15 Aug 2012 01:24:47 +0000 (18:24 -0700)]
staging: comedi: dnya_pci10xx: remove unused fields in the boardinfo

The *_bits information in the boardinfo is not used by the driver.
Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dnya_pci10xx: cleanup the analog output range
H Hartley Sweeten [Wed, 15 Aug 2012 01:24:19 +0000 (18:24 -0700)]
staging: comedi: dnya_pci10xx: cleanup the analog output range

The analog output channels on this board only support a single
range, 0-10V unipolar. This range is available as an exported
symbol from the comedi core and "range_unipolar10". Use that
instead of duplicating the range in this driver and remove
the information from the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dnya_pci10xx: use attach_pci callback
H Hartley Sweeten [Wed, 15 Aug 2012 01:23:49 +0000 (18:23 -0700)]
staging: comedi: dnya_pci10xx: use attach_pci callback

Convert this PCI driver to use the comedi PCI auto config attach
mechanism by adding an attach_pci callback function. Since the
driver does not require any external configuration options, disable
the legacy attach by making the attach simply return -ENOSYS. This
removes the need to walk the pci bus to find the pci_dev and the
need for the pci_dev_put() in the detach.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: dnya_pci10xx: remove thisboard and devpriv macros
H Hartley Sweeten [Wed, 15 Aug 2012 01:23:24 +0000 (18:23 -0700)]
staging: comedi: dnya_pci10xx: remove thisboard and devpriv macros

These macros rely on local variables having a specific name. Replace
them with local variables where used. Use the comedi_board() helper
to get the thisboard pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omapdrm: Expose the OMAP Z-Order property through DRM
Andre Renaud [Wed, 15 Aug 2012 20:18:02 +0000 (15:18 -0500)]
staging: omapdrm: Expose the OMAP Z-Order property through DRM

Added support for zorder changes through DRM plane properties

Signed-off-by: Andre Renaud <andre@bluewatersys.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: drm/omap: add rotation properties
Rob Clark [Wed, 15 Aug 2012 20:18:01 +0000 (15:18 -0500)]
staging: drm/omap: add rotation properties

Use tiled buffers for rotated/reflected scanout, with CRTC and plane
properties as the interface for userspace to configure rotation.

Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: adl_pci7x3x: fix pointer-to-int-cast warning
H Hartley Sweeten [Tue, 14 Aug 2012 20:45:53 +0000 (13:45 -0700)]
staging: comedi: adl_pci7x3x: fix pointer-to-int-cast warning

This driver uses the void *private variable in the comedi_subdevice
to pass the offset needed to read/write the appropriate register to
get/set the channels for the subdevice.

The adl_pci7x3x_do_insn_bits() and adl_pci7x3x_di_insn_bits() functions
were retrieving this offset by casting the s->private value as an
unsigned int. On 64-bit builds this results in a warning:

warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]

Fix these warnings by casting the void * to an unsigned long.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: variax.c: Eliminated remaining strict_stroul()s
Johannes Thumshirn [Tue, 14 Aug 2012 18:22:48 +0000 (20:22 +0200)]
staging: line6: variax.c: Eliminated remaining strict_stroul()s

Eliminated remaining calls to strict_stroul() and replaced them with
strict_kstrtou8().

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_dio200: add helper macros to check bus type
Ian Abbott [Tue, 14 Aug 2012 15:31:28 +0000 (16:31 +0100)]
staging: comedi: amplc_dio200: add helper macros to check bus type

Add helper macro IS_ISA_BOARD(board) to check if the driver supports ISA
boards and this is an ISA board, and IS_PCI_BOARD(board) to check if the
driver supports PCI boards and this is a PCI board.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_dio200: check bus type in detach routine
Ian Abbott [Tue, 14 Aug 2012 15:31:29 +0000 (16:31 +0100)]
staging: comedi: amplc_dio200: check bus type in detach routine

When detaching the device in dio200_detach() mirror the bus type checks
performed by dio200_attach().  The existing tests are safe but rely on
dev->iobase being 0 when comedi_to_pci_dev(dev) is NULL.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: amplc_dio200: abbreviate IS_ENABLED()
Ian Abbott [Tue, 14 Aug 2012 15:31:27 +0000 (16:31 +0100)]
staging: comedi: amplc_dio200: abbreviate IS_ENABLED()

The IS_ENABLED(CONFIG_COMEDI_AMPLC_DIO200_ISA) and
IS_ENABLED(CONFIG_COMEDI_AMPLC_DIO200_PCI) macro calls are a bit
long-winded.  Define a couple of macros DO_ISA and DO_PCI as
abbreviations for them.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: xgifb: fix bitwise vs logical bug
Dan Carpenter [Tue, 14 Aug 2012 07:04:45 +0000 (10:04 +0300)]
Staging: xgifb: fix bitwise vs logical bug

This is a static checker fix and not something I can test.  The intent
of the code here is to set some bit flags.  For a logical OR the ">> 1"
shift wouldn't make a difference.  So it should be using a bitwise OR.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging "vme" Fix typos.
Justin P. Mattock [Mon, 13 Aug 2012 17:28:22 +0000 (10:28 -0700)]
staging "vme" Fix typos.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Acked-by: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/iio: use module_platform_driver macro
Devendra Naga [Sat, 21 Jul 2012 08:54:00 +0000 (09:54 +0100)]
staging/iio: use module_platform_driver macro

the code which under _init and _exit does only the platform_driver_register
and platform_driver_unregister, and nothing else,
so its better to use the module_platform_driver macro rather duplicating
its implementation

Signed-off-by: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio: Constify static iio_chan_spec arrays
Lars-Peter Clausen [Thu, 9 Aug 2012 07:51:00 +0000 (08:51 +0100)]
staging:iio: Constify static iio_chan_spec arrays

The per driver iio_chan_spec arrays are usually shared between multiple device
instances. So a single device instance may not modify the iio_chan_spec array
since this would also affect the other device instances. To make this restriction
explicit mark the per driver iio_chan_spec arrays as const.

Conversion was done automatically using the following coccinelle semantic patch:

// <smpl>
@disable optional_qualifier@
identifier channels;
@@
static
+const
struct iio_chan_spec channels[] = ...;
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agostaging:iio:adis16220: Use kobj_to_dev instead of open-coding it
Lars-Peter Clausen [Tue, 7 Aug 2012 07:55:00 +0000 (08:55 +0100)]
staging:iio:adis16220: Use kobj_to_dev instead of open-coding it

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
11 years agozsmalloc: collapse internal .h into .c
Seth Jennings [Wed, 8 Aug 2012 06:12:17 +0000 (15:12 +0900)]
zsmalloc: collapse internal .h into .c

The patch collapses in the internal zsmalloc_int.h into
the zsmalloc-main.c file.

This is done in preparation for the promotion to mm/ where
separate internal headers are discouraged.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
Acked-by: Nitin Gupta <ngupta@vflare.org>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging "usbip" Fix typos.
Justin P. Mattock [Mon, 6 Aug 2012 15:00:27 +0000 (08:00 -0700)]
staging "usbip" Fix typos.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: i18n.c: Fix leak in msg_set()
Jesper Juhl [Tue, 7 Aug 2012 19:44:54 +0000 (21:44 +0200)]
staging: speakup: i18n.c: Fix leak in msg_set()

If we end up returning -EINVAL from the function we will leak the
memory allocated to 'newstr' which has been allocated but not yet
assigned to anything.
Fix the leak by properly freeing the memory again before we return.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: Fix typo in staging/rtl8192u
Masanari Iida [Fri, 10 Aug 2012 14:24:11 +0000 (23:24 +0900)]
staging: rtl8192u: Fix typo in staging/rtl8192u

Correct spelling typo in staging/rtl8192u

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8187se: Fix typo in staging/rtl8187se
Masanari Iida [Thu, 9 Aug 2012 16:06:54 +0000 (01:06 +0900)]
staging: rtl8187se: Fix typo in staging/rtl8187se

Correct spelling typo and adjust comment line length.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192e: Fix typo in staging/rtl8192e
Masanari Iida [Thu, 9 Aug 2012 16:37:31 +0000 (01:37 +0900)]
staging: rtl8192e: Fix typo in staging/rtl8192e

Correct spelling typo in staging/rtl8192e.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ft1000: Replace timeout values with USB_CTRL_G(S)ET_TIMEOUT.
Marek Belisko [Mon, 30 Jul 2012 21:07:17 +0000 (23:07 +0200)]
staging: ft1000: Replace timeout values with USB_CTRL_G(S)ET_TIMEOUT.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ft1000: Fix ft1000_control function timeout argument usage.
Marek Belisko [Mon, 30 Jul 2012 21:07:16 +0000 (23:07 +0200)]
staging: ft1000: Fix ft1000_control function timeout argument usage.

Function ft1000_control have input argument timeout which was not passed
to usb_control_msg instead hardcoded to LARGE_TIMEOUT.

Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zsmalloc: add page table mapping method
Seth Jennings [Wed, 18 Jul 2012 16:55:56 +0000 (11:55 -0500)]
staging: zsmalloc: add page table mapping method

This patchset provides page mapping via the page table.
On some archs, most notably ARM, this method has been
demonstrated to be faster than copying.

The logic controlling the method selection (copy vs page table)
is controlled by the definition of USE_PGTABLE_MAPPING which
is/can be defined for any arch that performs better with page
table mapping.

Signed-off-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>