Eli Billauer [Wed, 31 Jul 2013 08:22:43 +0000 (11:22 +0300)]
staging: xillybus: Fixed sparse errors
Changes:
* xillybus.h: __iomem added to struct xilly_endpoint -> registers to suppress
"different address spaces" errors.
* xillybus_core.c: __user added as required for the same reason.
* The two member names of struct xilly_endpoint_hardware of the form
sync_single_for_{cpu,device} were changed to something that won't look
like the well-known functions.
* All *.c files: Variables and functions made static as required.
staging: comedi: das16: remove an unnecessary check in the attach
If the user does not specify the analog output range the private data
'user_ao_range_table' will not be allocated. The comedi core will detect
the NULL s->range_table and automatically set it to &range_unknown.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
The function das16_reset() needs a valid dev->iobase. Since the iobase
is requested after the devpriv has been allocated in the attach, move
the das16_reset() call into the if (devpriv) and add a if (dev->iobase).
Also, move the release of the extra iobase into the if (devpriv) to
prevent an invalid memory access.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das16: fail attach if board id is incorrect
This driver probes the board id during the attach to ensure that the
user is attempting to attach to the correct board type. Currently an
error message is output if the ids are not consistent but the attach
continues anyway.
Make the attach fail if the id bits do not match. Also, cleanup the
printk messages and use a dev_err() only if the probe fails.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das16: tidy up 8255 digital i/o subdevice
The 8255 digital i/o subdevice is only available on some of the boards
supported by this driver. Currently the 'i8255_offset' member of the
boardinfo is used to indicate that it is available.
To clarify this support, add a 'has_8255' bit-field flag to the boardinfo.
We can then use this flag to conditionally allocate the space for the
subdevice only when it is needed.
Also, make sure to check that subdev_8255_init() is successful and propagate
any errors.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das16: remove 'volatile' on private data variables
As indicated by checkpatch.pl, "WARNING: Use of volatile is usually
wrong: ...". The variables in the private data that are marked
volatile don't need to be. Remove the volatile.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das16: cleanup analog output subdevice
All the boards supported by this driver that have analog outputs use
the same function to handle the (*insn_write) for the subdevice. They
all also have 12-bit resolution (maxdata = 0x0fff).
Remove the 'ao' and 'ao_nbits' members from the boardinfo and replace
them with a simple bit-field flag 'has_ao'.
Tidy up the subdevice init a bit as well as the (*insn_write) function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das16: all supported board have digital outputs
All the boards supported by this driver have digital outputs and all
of then use the same function to handle the (*insn_bits) for the
subdevice.
Remove the 'do_' member from the boardinfo and always initialize the
digital output subdevice during the board attach.
Tidy up the subdevice init a bit as well as the (*insn_bits) function.
Remove SDF_READABLE from the subdev_flags. This is a pure digital output
subdevice and the outputs are not readable.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das16: fix DMA init during board attach
DMA support is optional in this driver. To enable it, the user
passes the desired DMA channel during the board attach. A timer
is then used by the driver to periodically get the analog input
data from the DMA.
Since the DMA support is optional, modify the init code so that
it only fails if the DMA channel is unavailable or the DMA buffers
can not be allocated. Don't fail just because the user passed an
invalid DMA channel (only DMA channels 1 and 3 are valid).
Remove the printk() noise about the DMA. Change the printk() when
the request_dma() fails into a dev_err().
Move the timer initialization so it's only setup if DMA is available.
It's not needed otherwise. Also, only hook up the subdevice command
support functions if DMA is available. This allows removing a couple
sanity checks in the command support.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
As noted in the driver, a timer is always used by this driver to handle
the DMA because samples could be dropped while waiting for the DMA done
interrupt.
Remove the irq setup code as well as the interrupt handler.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: das16: "timer_mode" is always used for DMA
As noted in the driver, a timer is always used by this driver to handle the
DMA due to buggy DMA controllers and the lack of a hardware fifo in some of
the supported boards.
Remove all the non-timer mode specific code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: olpc_dcon: provide detailed FB_OLPC_DCON help section
The FB_OLPC_DCON help section is to short according to checkpatch.pl.
We want more information about the controller type, its task, its video
pipeline position and so on.
There are no style issues, remove checkpatch.pl TODO entry.
Aaro Koskinen [Mon, 29 Jul 2013 17:07:56 +0000 (20:07 +0300)]
staging: octeon-usb: cvmx-usb: delete duplicated documentation from .h file
Delete duplicated function call documentation from the .h file. These
functions are just internal anyway, and the .h file will be completely
removed in the future when the driver will be made a single self-contained
.c file.
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Fix most of the whitespace issues reported by checkpatch:
- use tabs for indentation
- brace placement vs. newlines
- (foo_t*) -> (foo_t *)
- i=0 -> i = 0
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Aaro Koskinen [Mon, 29 Jul 2013 17:07:47 +0000 (20:07 +0300)]
staging: octeon-usb: cvmx-usb: utilize Linux error codes
Use generic Linux error codes to replace cvmx_usb_status_t.
The conversion table:
Before After
cvmx_usb_status_t int
CVMX_USB_SUCCESS 0
CVMX_USB_INVALID_PARAM -EINVAL
CVMX_USB_NO_MEMORY -ENOMEM
CVMX_USB_BUSY -EBUSY
CVMX_USB_TIMEOUT -ETIMEDOUT
CVMX_USB_INCORRECT_MODE Deleted (was never used)
Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Marc Dietrich [Sat, 27 Jul 2013 16:20:58 +0000 (18:20 +0200)]
staging: nvec: re-enable the clock on resume
On resume the slave controller is reinitialized. The tegra i2c master
controller disables the clock at the end of the initialiation, propably
to save some power, and enables it again on each transfer. We don't
do this yet and also forgot to enable the clock on resume. Fix this
copy-paste error by not disabling the clock after initialization.
This didn't striked us yet because suspend/resume hasn't landed in mainline
yet, but will soon.
Signed-off-by: Marc Dietrich <marvin24@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Won Kang [Sat, 27 Jul 2013 06:42:18 +0000 (15:42 +0900)]
staging: gdm724x: Modified function name conflict set_endian
Conflict resolution for function name set_endian when building for powerpc
The name changed to gdm_set_endian
Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Won Kang <wonkang@gctsemi.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Merge tag 'pinctrl-for-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl
Pull pin control fixes from Linus Walleij:
- Driver fixes for AM33xx, SIRF and PFC pin controllers
- Fix a compile warning from the pinctrl single-register driver
- Fix a little nasty memory leak
* tag 'pinctrl-for-v3.11-2' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
pinctrl: fix a memleak when freeing maps
pinctrl: pinctrl-single: fix compile warning when no CONFIG_PM
pinctrl: sh-pfc: fix SDHI0 VccQ regulator on sh73a0 with DT
arm/dts: sirf: fix the pingroup name mismatch between drivers and dts
pinctrl: sirf: add usp0_uart_nostreamctrl pin group for usp-uart without flowctrl
pinctrl: sirf: fix the pin number and mux bit for usp0
pinctrl: am33xx dt binding: correct include path
Merge tag 'trace-fixes-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
Pull tracing fixes from Steven Rostedt:
"Oleg is working on fixing a very tight race between opening a event
file and deleting that event at the same time (both must be done as
root).
I also found a bug while testing Oleg's patches which has to do with a
race with kprobes using the function tracer.
There's also a deadlock fix that was introduced with the previous
fixes"
* tag 'trace-fixes-3.11-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing: Remove locking trace_types_lock from tracing_reset_all_online_cpus()
ftrace: Add check for NULL regs if ops has SAVE_REGS set
tracing: Kill trace_cpu struct/members
tracing: Change tracing_fops/snapshot_fops to rely on tracing_get_cpu()
tracing: Change tracing_entries_fops to rely on tracing_get_cpu()
tracing: Change tracing_stats_fops to rely on tracing_get_cpu()
tracing: Change tracing_buffers_fops to rely on tracing_get_cpu()
tracing: Change tracing_pipe_fops() to rely on tracing_get_cpu()
tracing: Introduce trace_create_cpu_file() and tracing_get_cpu()
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Pull SCSI fixes from James Bottomley:
"This is five bug fixes, two of which fix long standing problems
causing crashes (sd and mvsas). The remaining three are hung (isci
race) or lost (qla2xxx, isci) devices"
* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
[SCSI] isci: fix breakage caused by >16byte CDB patch
[SCSI] mvsas: Fix kernel panic on tile due to unaligned data access
[SCSI] sd: fix crash when UA received on DIF enabled device
[SCSI] qla2xxx: Properly set the tagging for commands.
[SCSI] isci: Fix a race condition in the SSP task management path
zram: prevent data loss in error cases of function zram_bvec_write()
In function zram_bvec_write(), previous data at the index is
already freed by function zram_free_page().
When failed to compress or zs_malloc, there is no way to restore old data.
Therefore, free previous data when it's about to update.
Also, no need to check whether table is not empty outside of
function zram_free_page(), because the function properly checks inside.
staging: comedi: usbdux: move and rename the bulk transfer commands
For aesthetic reasons, move the defines used for the bulk transfer
commands out of the middle of the code and rename them so they are
a bit more readable.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: usbdux: 'dac_commands' does not need to be kzalloc()'d
The 'dac_commands' buffer is used to pass the ao channel list from
usbdux_ao_cmd() to the urb callback, usbduxsub_ao_isoc_irq(). This
buffer does not need to be allocated.
Change it into a simple array of the correct size. Rename the variable
to 'ao_chanlist' to clarify what it actually is.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: usbdux: remove unnecessary check in usbdux_ao_cmd()
This check is not necessary. The cmd->chanlist_len will always be
less than or equal to the subdevice len_chanlist that was setup
during the attach of the device.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: usbdux: remove unnecessary check in usbdux_ai_cmd()
This check is not necessary. The cmd->chanlist_len will always be
less than or equal to the subdevice len_chanlist that was setup
during the attach of the device.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: usbdux: simplify initializing the ao urb transfer_buffer
Remove the ugly casting of datap to the ao urb->transfer_buffer. The format
of the data in the buffer is simply.
[0] = # of channels to update (s->async->cmd.chanlist.len)
[1] = lsb of value for 1st channel to update
[2] = msb of value for 1st channel to update
[3] = 1st channel to update (depvriv->dac_commands[0])
If more than 1 channel is to be updated they are simply added to the buffer:
[4] = lsb of value for 2st channel to update
[5] = msb of value for 2st channel to update
[6] = 1st channel to update (depvriv->dac_commands[1])
etc.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: usbdux: cleanup the private data 'outBuffer'
This buffer is used to cache the values that are written to the
analog output channels. Currently it only caches the single writes
to the channels using the (*insn_write) callback. The async command
writes are not cached. The buffer is also being kzalloc'ed during
the attach of the driver to a size much larger that required.
Rename the CamelCase buffer and change it to an array in the private
data of the correct size to cache the analog output channel values.
Modify the analog output urb callback so it updates the cached values
with those used for the asynchronous command to allow readback after
the command completes.
The sanity check of the index to dac_commands[] (i.e. the 'chan' being
written) is not needed. The chanlist_len will always be less than the
number of channels.
Also, fix the dev_err() message so it uses the proper device pointer.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: usbdux: rename private data variables
The usbdux and usbduxsigma drivers are _very_ similar. For aesthetic
reasons, rename the private data variables in this driver to match
the names in the usbduxsigma driver so we can start sharing the
common code.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>