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>
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>
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.
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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.
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.
staging: zsmalloc: prevent mappping in interrupt context
Because we use per-cpu mapping areas shared among the
pools/users, we can't allow mapping in interrupt context
because it can corrupt another users mappings.
staging: zsmalloc: s/firstpage/page in new copy map funcs
firstpage already has precedent and meaning the first page
of a zspage. In the case of the copy mapping functions,
it is the first of a pair of pages needing to be mapped.
This patch just renames the firstpage argument to "page" to
avoid confusion.
Larry Finger [Sat, 28 Jul 2012 16:39:48 +0000 (11:39 -0500)]
staging: r8712u: Reduce maximum receive buffer size to a more sensible value
The current value for the maximum receive buffer size is 30720, which is
too large. For long-running systems, memory fragmentation may make it
difficult to obtain the buffers of O(2) needed for aggregation. Buffers
of O(3) are even worse, particularly when not needed. The new size is set
to 9100, which will allow aggregation.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Andy Shevchenko [Thu, 2 Aug 2012 16:05:46 +0000 (19:05 +0300)]
staging: nvec: use %*ph to dump small buffers
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: ac100@lists.launchpad.net Acked-by: Julian Andres Klode <jak@jak-linux.org> Acked-By: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Ben Chan [Tue, 24 Jul 2012 14:49:42 +0000 (07:49 -0700)]
staging: gdm72xx: fix reference counting in gdm_wimax_event_init
This patch fixes the commit "staging/gdm72xx: cleanup little at
gdm_wimax_event_rcv" (8df858ea76b76dde9a39d4edd9aaded983582cfe),
which mishandles the reference counting of wm_event.
Signed-off-by: Ben Chan <benchan@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The reclaim_buffers callback has already been removed by Daniel Vetter
<daniel.vetter@ffwll.ch> with his patch "drm: kill reclaim_buffers callback"
(b0071efe82). As a result the kernel compilation fails with omapdrm support
and so the callback for reclaim_buffers is being removed from omapdrm.
Signed-off-by: Chandrabhanu Mahapatra <cmahapatra@ti.com> Reviewed-by: Sumit Semwal <sumit.semwal@ti.com> Signed-off-by: Rob Clark <rob@ti.com> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: vt6656: don't leak 'param' in vt6656_hostap_ioctl() when returning -EOPNOTSUPP
Don't return -EOPNOTSUPP directly in switch case's since it'll leak
the memory allocated to 'param' when that variable goes out of scope
without having been assigned to anything.
staging: android: logger.h: Complete documentation of logger_entry
Previously, there were simply comments after each part - Now, it is
completed properly according to "Kernel doc" Sorry in advance if I made
any mistakes.
as the init and exit functions just do a platform_driver_register and
platform_driver_unregister, and nothing else, so its better to
use the module_platform_driver macro rather replicating its implementation
Devendra Naga [Sat, 4 Aug 2012 07:16:38 +0000 (13:01 +0545)]
staging/csr: clean coding style in uf_start_thread
in bh.c the function uf_start_thread needed a coding style fixes.
The following fixes:
* fix no space at the start of line
* fix over 80 character lines
* fix no brace needed for single statement blocks (if..else or for and while)
* use tabs instead of 4 spaces at the start of every line
the following warnings were fixed:
1. removed all spaces before the start of a line and used tabs
2. removed the braces around the if as it encloses only a single statement
staging: comedi: adl_pci6208: use the 'board_name' for the resource name
Use the 'dev->board_name' instead of the 'dev->driver->driver_name'
as the resource name used when requesing the pci regions in
comedi_pci_enable(). The board_name has a closer affinity to the
card.
Also, remove the dev_err() message when comedi_pci_enable() fails.
It's just noise and doesn't actually tell the real reason why the
call failed. It could have failed either the pci_enable_device()
or the pci_request_regions().
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>
staging: comedi: adl_pci6208: split the digital i/o subdevice
The PCI-6208/6216 cards have 4 digital inputs and 4 digital outputs.
These are currently being handled by an 8 channel COMEDI_SUBD_DIO
subdevice in this driver. This causes the 4 digital outputs to
appear as channels 0 thru 3 and the 4 digital inputs to appear as
channels 4 thru 7. Userspace can only work out part thisby doing the
COMEDI_INSNLIST ioctl with the INSN_CONFIG_DIO_QUERY instruction
for each channel to determine the io direction.
Make things a bit cleaner for userspace by creating two subdevices
instead. One for the 4 digital inputs and one for the 4 digital
outputs. For both subdevices the channel number indicates the
actual digital input/output signal.
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>
staging: comedi: adl_pci6208: 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 callback 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.
For aesthetic reasons, rename the local variable 'thisboard' to '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>
Currently this driver only supports the 96-channel PCI-7296.
The 24 and 48 channel PCI-7224 and PCI-7248 boards share the
same register map and just have less 8255 devices providing
the i/o channels.
This adds the PCI PnP support for the other boards in the
ADLink PCI-72xx series.
Also, remove the legacy attach using the comedi_config utility.
This driver now supports the comedi PCI auto config attach
mechanism and the legacy attach is not supported or required
by this 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>
Currently the ADLink PCI-7230 and PCI-7432 Isolated Digital
I/O Boards are supported using two drivers (adl_pci7230 and
adl_pci7432). These drivers are very similar and only differ
in the total number of di/do channels provided.
This driver combines the support for both boards into one
common driver. In addition, it adds PCI PnP support for the
other boards in the ADLink PCI-723x and PCI-743x series.
This driver only supports the comedi PCI auto config attach
mechanism. The legacy attach using the comedi_config utility
is not supported or required by this driver.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Thu, 2 Aug 2012 18:52:39 +0000 (11:52 -0700)]
Merge branch 'for-linus-3.6' of git://dev.laptop.org/users/dilinger/linux-olpc
Pull OLPC platform updates from Andres Salomon:
"These move the OLPC Embedded Controller driver out of
arch/x86/platform and into drivers/platform/olpc.
OLPC machines are now ARM-based (which means lots of x86 and ARM
changes), but are typically pretty self-contained.. so it makes more
sense to go through a separate OLPC tree after getting the appropriate
review/ACKs."
* 'for-linus-3.6' of git://dev.laptop.org/users/dilinger/linux-olpc:
x86: OLPC: move s/r-related EC cmds to EC driver
Platform: OLPC: move global variables into priv struct
Platform: OLPC: move debugfs support from x86 EC driver
x86: OLPC: switch over to using new EC driver on x86
Platform: OLPC: add a suspended flag to the EC driver
Platform: OLPC: turn EC driver into a platform_driver
Platform: OLPC: allow EC cmd to be overridden, and create a workqueue to call it
drivers: OLPC: update various drivers to include olpc-ec.h
Platform: OLPC: add a stub to drivers/platform/ for the OLPC EC driver
Linus Torvalds [Thu, 2 Aug 2012 18:50:24 +0000 (11:50 -0700)]
Merge tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Pull arm-soc Marvell Orion device-tree updates from Olof Johansson:
"This contains a set of device-tree conversions for Marvell Orion
platforms that were staged early but took a few tries to get the
branch into a format where it was suitable for us to pick up.
Given that most people working on these platforms are hobbyists with
limited time, we were a bit more flexible with merging it even though
it came in late."
* tag 'dt2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (21 commits)
ARM: Kirkwood: Replace mrvl with marvell
ARM: Kirkwood: Describe GoFlex Net LEDs and SATA in DT.
ARM: Kirkwood: Describe Dreamplug LEDs in DT.
ARM: Kirkwood: Describe iConnects LEDs in DT.
ARM: Kirkwood: Describe iConnects temperature sensor in DT.
ARM: Kirkwood: Describe IB62x0 LEDs in DT.
ARM: Kirkwood: Describe IB62x0 gpio-keys in DT.
ARM: Kirkwood: Describe DNS32? gpio-keys in DT.
ARM: Kirkwood: Move common portions into a kirkwood-dnskw.dtsi
ARM: Kirkwood: Replace DNS-320/DNS-325 leds with dt bindings
ARM: Kirkwood: Describe DNS325 temperature sensor in DT.
ARM: Kirkwood: Use DT to configure SATA device.
ARM: kirkwood: use devicetree for SPI on dreamplug
ARM: kirkwood: Add LS-XHL and LS-CHLv2 support
ARM: Kirkwood: Initial DTS support for Kirkwood GoFlex Net
ARM: Kirkwood: Add basic device tree support for QNAP TS219.
ATA: sata_mv: Add device tree support
ARM: Orion: DTify the watchdog timer.
ARM: Orion: Add arch support needed for I2C via DT.
ARM: kirkwood: use devicetree for orion-spi
...