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.

Reported-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Eli Billauer <eli.billauer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: vt6656: dead code wCTSDuration.

Always set to zero, so remove.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: vt6656: device.h unused variables

wACKDuration
wRTSTransmitLen
byRTSServiceField
byRTSSignalField

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: usbdux: generalize the usb_submit_urb functions

Generalize a helper function to replace usbduxsub_submit_{in,out}urbs().

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: usbduxsigma: generalize the ai/ao usb_kill_urb()

Generalize a helper function to replace for() loops in usbduxsigma_{ai,ao}_stop()
that call usb_kill_urb() to unlink all the urbs.

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: usbduxsigma: remove the usb endpoint defines

The endpoint defines are each only used in one place and don't help
clarify the code. Remove the defines and just open code the values.

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: tidy up usbdux_pwm_period()

Rename the local variable used for the private data pointer to 'devpriv'.

Fix the fx2delay calculation so it does not use floating point values.

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: tidy up usbdux_pwm_pattern()

Rename the local variable used for the private data pointer to 'devpriv'.

Remove the sanity check of the private data. This function can only be
called if the private data was successfully allocated in the attach.

Tidy up the function to make it more concise.

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: tidy up usbdux_pwm_write()

Remove the sanity check of the private data. This function can only be
called if the private data was successfully allocated in the attach.

Tidy up the function a bit.

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 usbdux_pwm_read()

The pwm subdevice is not readable so this callback function is not
needed. Remove it.

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: tidy up usbdux_pwm_config()

Rename the local variable used for the private data pointer to 'devpriv'.

Tidy up the function a bit.

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: return void from usbdux_pwm_pattern()

This function never fails and currently returns '1' so that the
usbdux_pwm_write() function returns to proper value (insn->n).

It's also called by usbdux_pwm_config() which also returns the '1'
value. The proper return code for this function should be '0' to
indicate success.

Change the return type of the function to void and just have the
callers return the proper values.

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: usbduxsigma: return void from usbduxsigma_pwm_pattern()

This function never fails and currently returns '1' so that the
usbduxsigma_pwm_write() function returns to proper value (insn->n).

It's also called by usbduxsigma_pwm_config() which also returns the
'1' value. The proper return code for this function should be '0' to
indicate success.

Change the return type of the function to void and just have the
callers return the proper values.

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: tidy up usbdux_alloc_usb_buffers()

Tidy up the error path by doing all the basic allocations then checking
for failures.

We have the comedi device now so fill in the urb->context.

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: usbduxsigma: 'dac_commands' does not need to be kzalloc()'d

The 'dac_commands' buffer is used to pass the ao channel list from
usbduxsigma_ao_cmd() to the urb callback, usbduxsigma_ao_urb_complete().
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: usbduxsigma: init 'pwm_buf_sz' in usbduxsigma_auto_attach()

Initialize this variable with then_ai_urbs and n_ao_urbs in the
attach. Then usbduxsigma_alloc_usb_buffers() can just check the
variable to determine if the urb needs to be allocated.

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: usbduxsigma: move urb unlink into usbduxsigma_detach()

For aesthetics, move the final force unlink of the urbs from
usbduxsigma_free_usb_buffers() to usbduxsigma_detach().

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: usbduxsigma: always clear the usb intfdata in (*detach)

Make sure the usb intfdata is always cleared when the device is
detached.

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: tidy up usbdux_detach()

Make sure the usb intfdata is always cleared when the device is
detached.

Refactor the code to remove an indent level.

Always unlink the urbs when the device is detached.

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: tidy up usbdux_free_usb_buffers()

For aesthetics, pass the comedi_device pointer to this function
instead of the private data pointer.

The usb_kill_urb() calls are not needed. All the urbs were unlinked
before this function was called.

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>