]> git.openfabrics.org - ~emulex/infiniband.git/log
~emulex/infiniband.git
11 years agostaging: comedi: usbduxfast: tidy up firmwareUpload()
H Hartley Sweeten [Tue, 14 May 2013 20:39:34 +0000 (13:39 -0700)]
staging: comedi: usbduxfast: tidy up firmwareUpload()

Rename the CamelCase function and just pass the const struct
firmware * directly instead of parsing out the data and size.

Rename the CamelCasae local val 'fwBuf'.

Use goto to provide a common exit path that frees the local
buffer for the firmware when an error is encountered.

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: usbduxfast: fix a > 80 char line issue
H Hartley Sweeten [Tue, 14 May 2013 20:39:15 +0000 (13:39 -0700)]
staging: comedi: usbduxfast: fix a > 80 char line issue

Fix a line over 80 characters issue reported by checkpatch.pl.

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: usbduxfast: tidy up usbduxfast_ai_cancel()
H Hartley Sweeten [Tue, 14 May 2013 20:38:48 +0000 (13:38 -0700)]
staging: comedi: usbduxfast: tidy up usbduxfast_ai_cancel()

Remove the unnecessary comments and dev_err() noise.

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: usbduxfast: tidy up usbduxfast_ai_stop()
H Hartley Sweeten [Tue, 14 May 2013 20:38:21 +0000 (13:38 -0700)]
staging: comedi: usbduxfast: tidy up usbduxfast_ai_stop()

Remove the devpriv sanity check, all the callers have previously
verified that its valid.

Absorb usbduxfast_unlink_urbs() into this function since it's the
only caller and the only thing it does is call usb_kill_urb().

This function will always succeed so just return 0 and remove the
local variable '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: usbduxfast: tidy up usbduxfastsub_unlink_InURBs()
H Hartley Sweeten [Tue, 14 May 2013 20:38:00 +0000 (13:38 -0700)]
staging: comedi: usbduxfast: tidy up usbduxfastsub_unlink_InURBs()

Rename this function so it has namespace associated with the driver.

Remove the local variables 'j' and 'ret'. They are not used and the
function always returns '0'.

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: usbduxfast: tidy up send_dux_commands()
H Hartley Sweeten [Tue, 14 May 2013 20:37:38 +0000 (13:37 -0700)]
staging: comedi: usbduxfast: tidy up send_dux_commands()

Rename this function so it has namespace associated with the driver.

For aesthetic reasons, rename the local variable 'tmp' to 'ret' as
this is more common for checking errno values.

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: usbduxfast: remove extra dev_err() messages
H Hartley Sweeten [Tue, 14 May 2013 20:37:07 +0000 (13:37 -0700)]
staging: comedi: usbduxfast: remove extra dev_err() messages

A dev_err() message is output if send_dux_commands() fails. Remove
the extra dev_err() messages output by the callers.

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: usbduxfast: rename 'dux_commands' in private data
H Hartley Sweeten [Tue, 14 May 2013 20:36:47 +0000 (13:36 -0700)]
staging: comedi: usbduxfast: rename 'dux_commands' in private data

For aesthetic reasons, rename this variable to 'duxbuf' and also
rename the define used for its size.

This helps fix some of the > 80 char lines reported by checkpatch.pl.

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: usbduxfast: rename 'transfer_buffer' in private data
H Hartley Sweeten [Tue, 14 May 2013 20:36:23 +0000 (13:36 -0700)]
staging: comedi: usbduxfast: rename 'transfer_buffer' in private data

For aesthetic reasons, rename this variable to 'inbuf' to match the
define used for its size (SIZEINBUF).

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: usbduxfast: rename 'insnBuffer' from private data
H Hartley Sweeten [Tue, 14 May 2013 20:36:02 +0000 (13:36 -0700)]
staging: comedi: usbduxfast: rename 'insnBuffer' from private data

This buffer space is kmalloc'ed and free'ed but never used. Just
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: usbduxfast: rename 'urbIn' in private data
H Hartley Sweeten [Tue, 14 May 2013 20:35:40 +0000 (13:35 -0700)]
staging: comedi: usbduxfast: rename 'urbIn' in private data

Rename the CamelCase variable 'urbIn' in the private data to
simply 'urb'.

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: usbduxfast: remove 'usb' from the private data
H Hartley Sweeten [Tue, 14 May 2013 20:35:15 +0000 (13:35 -0700)]
staging: comedi: usbduxfast: remove 'usb' from the private data

The usb_device pointer can be fetched when needed from the comedi_device
by using comedi_to_usb_interface() then interface_to_usbdev().

Do that instead and remove the pointer from 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: usbduxfast: remove 'intf' from the private data
H Hartley Sweeten [Tue, 14 May 2013 20:34:54 +0000 (13:34 -0700)]
staging: comedi: usbduxfast: remove 'intf' from the private data

The usb_interface pointer is already saved in the comedi_device
by the comedi core.

Remove the pointer from the private data and use comedi_to_usb_interface()
to get the usb_interface when needed.

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: usbduxfast: use dev->class_dev for all dev_{level} messages
H Hartley Sweeten [Tue, 14 May 2013 20:34:31 +0000 (13:34 -0700)]
staging: comedi: usbduxfast: use dev->class_dev for all dev_{level} messages

For consistency in the driver, change all the dev_{level} messages
so they use dev->class_dev for the device.

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: usbduxfast: remove 'comedidev' from the private data
H Hartley Sweeten [Tue, 14 May 2013 20:33:34 +0000 (13:33 -0700)]
staging: comedi: usbduxfast: remove 'comedidev' from the private data

Now that the comedi_device is passed to the internal functions, the
back pointer to it is not needed in the private data. 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: usbduxfast: don't pass the private data directly
H Hartley Sweeten [Tue, 14 May 2013 20:33:13 +0000 (13:33 -0700)]
staging: comedi: usbduxfast: don't pass the private data directly

Instead of passing the private data to the internal functions, pass
the comedi_device pointer and get the private data from 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: usbduxfast: remove 'ifnum' from private data
H Hartley Sweeten [Tue, 14 May 2013 20:32:53 +0000 (13:32 -0700)]
staging: comedi: usbduxfast: remove 'ifnum' from private data

The interface number is only needed during the attach of the
device. Remove it from 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: usbduxfast: remove 'attached' from private data
H Hartley Sweeten [Tue, 14 May 2013 20:32:32 +0000 (13:32 -0700)]
staging: comedi: usbduxfast: remove 'attached' from private data

The subdevice function pointers are only setup if the device is
attached. The 'attached' flag in the private data is unnecessary.
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: usbduxfast: remove 'probed' from private data
H Hartley Sweeten [Tue, 14 May 2013 20:31:17 +0000 (13:31 -0700)]
staging: comedi: usbduxfast: remove 'probed' from private data

The 'probed' flag in the private data was used to handle the
disconnect between the usb (*probe) and the comedi_driver
(*auto_attach) so that if the comedi_driver was attached without
an associated usb_device the subdevice functions would return
-ENODEV.

Now that the usb_driver (*probe) is part of the comedi_driver
(*auto_attach), the comedi_driver can only attach if the usb
device is present.

Remove the unnecessary variable from the private data and its
uses in 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: usbduxfast: absorb tidy_up() into the (*detach)
H Hartley Sweeten [Tue, 14 May 2013 20:30:52 +0000 (13:30 -0700)]
staging: comedi: usbduxfast: absorb tidy_up() into the (*detach)

Now that the usb (*probe) is handled in the comedi_driver (*auto_attach)
the comedi_driver (*detach) will be called automatically if the
attach fails.

The tidy_up() calls in the (*auto_attach) are not needed. Remove them
and absorb the code in tidy_up() into 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: usbduxfast: remove some unused defines
H Hartley Sweeten [Tue, 14 May 2013 20:30:30 +0000 (13:30 -0700)]
staging: comedi: usbduxfast: remove some unused defines

Now that the private data is kzalloc'ed when the device is attached,
the NUMUSBDUXFAST define is not used. Remove it.

The SUBDEV_AD define is only used when setting up the subdevice.
Remove it and just open-code the value.

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: usbduxfast: Move usb_driver (*probe) into comedi_driver
H Hartley Sweeten [Tue, 14 May 2013 20:30:09 +0000 (13:30 -0700)]
staging: comedi: usbduxfast: Move usb_driver (*probe) into comedi_driver

Currently, the usb_driver (*probe) locates a free place in the static
usbduxfast array to use for the private data in this driver. It then
does some initial setup of the usb device and allocates the buffers
needed. The firmware for the device is then requested and uploaded
before calling comedi_usb_auto_config() to allow the comedi core to
complete the (*auto_attach) of the device.

Move the bulk of the (*probe) into the comedi_driver (*auto_attach).
This allows the private data to be kzalloc'ed. We can then remove the
static array along with the semaphore that protected it.

This also removes the 16 attached devices limitation.

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: usbduxfast: Use comedi_usb_auto_unconfig() for (*disconnect)
H Hartley Sweeten [Tue, 14 May 2013 20:29:35 +0000 (13:29 -0700)]
staging: comedi: usbduxfast: Use comedi_usb_auto_unconfig() for (*disconnect)

The usb_driver (*disconnect) calls comedi_usb_auto_unconfig() then
frees any allocations by calling tidy_up(). comedi_usb_auto_unconfig()
calls the comedi_driver (*detach) function, usbduxfast_detach().

Move the tidy_up() call into usbduxfast_detach() and use the
comedi_usb_auto_unconfig() directly for the (*disconnect).

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: usbduxfast: tidy up usbduxfastsub_ai_Irq()
H Hartley Sweeten [Tue, 14 May 2013 20:29:09 +0000 (13:29 -0700)]
staging: comedi: usbduxfast: tidy up usbduxfastsub_ai_Irq()

Rename the CamelCase function,

Rename some of the local variables to the normal names used in
comedi drivers. Add a local variable for the comedi_async *.

Remove the sanity checking. The urb that causes this function to
be called can only be submitted if the sanity checks already
passed.

Change the way the comedi_subdevice is fetched. The attach function
sets the dev->read_subev pointer to the correct subdevice. Use that
instead of accessing the dev->subdevices array directly.

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: usbduxfast: remove all COMEDI_DEBUG messages
H Hartley Sweeten [Tue, 14 May 2013 20:28:48 +0000 (13:28 -0700)]
staging: comedi: usbduxfast: remove all COMEDI_DEBUG messages

These messages are just function trace 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: usbduxfast: tidy up usbduxfast_attach_common()
H Hartley Sweeten [Tue, 14 May 2013 20:28:27 +0000 (13:28 -0700)]
staging: comedi: usbduxfast: tidy up usbduxfast_attach_common()

Remove the unnecessary comments and tidy up the whitespace in
this function.

Also, remove the dev_info() at the end. It's just added noise.

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: usbduxfast: remove 'owner' from usb_driver
H Hartley Sweeten [Tue, 14 May 2013 20:28:02 +0000 (13:28 -0700)]
staging: comedi: usbduxfast: remove 'owner' from usb_driver

The struct usb_driver does not have an 'owner' field. Remove the
code in this driver that initializes 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: usbduxfast: rename usbduxfastsub_s variables
H Hartley Sweeten [Tue, 14 May 2013 20:27:37 +0000 (13:27 -0700)]
staging: comedi: usbduxfast: rename usbduxfastsub_s variables

For aesthetic reasons, globally rename the variables used for the
struct usbduxfastsub_s * in this driver to 'devpriv'. This variable
pointes to the comedi_device private data.

Also, rename the struct to 'usbduxfast_private' to make its use
a bit 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: usbduxfast: rename usb_device variables
H Hartley Sweeten [Tue, 14 May 2013 20:26:38 +0000 (13:26 -0700)]
staging: comedi: usbduxfast: rename usb_device variables

For aesthetic reasons, globally rename the variables used for the
struct usb_device * in this driver to simply 'usb'.

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: usbduxfast: rename usb_interface variables
H Hartley Sweeten [Tue, 14 May 2013 20:25:56 +0000 (13:25 -0700)]
staging: comedi: usbduxfast: rename usb_interface variables

For aesthetic reasons, globally rename the variables used for the
struct usb_interface * in this driver to simply 'intf'.

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: usbduxfast: use a local var for the usbduxfastsub_s
H Hartley Sweeten [Tue, 14 May 2013 20:25:22 +0000 (13:25 -0700)]
staging: comedi: usbduxfast: use a local var for the usbduxfastsub_s

Add a local variable to hold the pointer to the place in the
usbduxfast array the is being configured for the device.

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: usbduxfast: remove COMEDI_DEBUG noise in usb (*probe)
H Hartley Sweeten [Tue, 14 May 2013 20:24:41 +0000 (13:24 -0700)]
staging: comedi: usbduxfast: remove COMEDI_DEBUG noise in usb (*probe)

The COMEDI_DEBUG noise in the usb (*probe) is just added function
trace noise. Remove it along with the final dev_info().

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: usbduxfast: request firmware synchronously
H Hartley Sweeten [Tue, 14 May 2013 20:24:17 +0000 (13:24 -0700)]
staging: comedi: usbduxfast: request firmware synchronously

Change the request_firmware_nowait() to a request_firmware() so
that the usb_driver (*probe) and continue with the comedi_driver
(*auto_attach).

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: speakup: Fix return value in synth.c
Sachin Kamat [Mon, 13 May 2013 10:38:55 +0000 (16:08 +0530)]
Staging: speakup: Fix return value in synth.c

The function return type is a pointer. Hence return NULL instead
of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: speakup: Fix sparse warning in varhandlers.c
Sachin Kamat [Mon, 13 May 2013 10:00:42 +0000 (15:30 +0530)]
Staging: speakup: Fix sparse warning in varhandlers.c

'cp' is a pointer. Fix the incorrect comparison with integer to
avoid the below warning:
drivers/staging/speakup/varhandlers.c:283:19: warning:
Using plain integer as NULL pointer

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: speakup: Return NULL instead of 0 in speakup_decpc.c
Sachin Kamat [Mon, 13 May 2013 10:00:41 +0000 (15:30 +0530)]
Staging: speakup: Return NULL instead of 0 in speakup_decpc.c

The function returns a pointer. Hence return NULL instead of 0.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: remove custom locking macro definitions
William Hubbs [Mon, 13 May 2013 18:31:40 +0000 (13:31 -0500)]
staging: speakup: remove custom locking macro definitions

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: synth: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:03:08 +0000 (00:03 -0500)]
staging: speakup: synth: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: thread: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:03:07 +0000 (00:03 -0500)]
staging: speakup: thread: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: soft: remove custom locking macros
William Hubbs [Mon, 13 May 2013 18:31:39 +0000 (13:31 -0500)]
staging: speakup: soft: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: keypc: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:03:05 +0000 (00:03 -0500)]
staging: speakup: keypc: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: dtlk: remove custom locking macros
William Hubbs [Mon, 13 May 2013 18:31:38 +0000 (13:31 -0500)]
staging: speakup: dtlk: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: dectlk: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:03:03 +0000 (00:03 -0500)]
staging: speakup: dectlk: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: decpc: remove custom locking macros
William Hubbs [Mon, 13 May 2013 18:31:37 +0000 (13:31 -0500)]
staging: speakup: decpc: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: decext: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:03:01 +0000 (00:03 -0500)]
staging: speakup: decext: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: apollo: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:03:00 +0000 (00:03 -0500)]
staging: speakup: apollo: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: acntpc: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:02:59 +0000 (00:02 -0500)]
staging: speakup: acntpc: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: serialio: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:02:58 +0000 (00:02 -0500)]
staging: speakup: serialio: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: remove spk_trylock macro definition
William Hubbs [Mon, 13 May 2013 05:02:57 +0000 (00:02 -0500)]
staging: speakup: remove spk_trylock macro definition

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: main: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:02:56 +0000 (00:02 -0500)]
staging: speakup: main: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: i18n: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:02:55 +0000 (00:02 -0500)]
staging: speakup: i18n: remove custom locking macros

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: devsynth: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:02:54 +0000 (00:02 -0500)]
staging: speakup: devsynth: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: speakup: kobjects: remove custom locking macros
William Hubbs [Mon, 13 May 2013 05:02:53 +0000 (00:02 -0500)]
staging: speakup: kobjects: remove custom locking macros

Signed-off-by: William Hubbs <w.d.hubbs@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: wlags49_h2: fix up "205179d staging: wlags49_h2: strncpy, need checking...
Chen Gang [Thu, 16 May 2013 01:37:32 +0000 (09:37 +0800)]
staging: wlags49_h2: fix up "205179d staging: wlags49_h2: strncpy, need checking the memory length" for avoiding warnings

Type of 'probe_rsp->rawData[1]' is 'hcf_8' which is 'u8', it will
compare with 'int', so use min_t() to cast to 'u8' to avoid related
warning.

If use min(), it has '(void) (&_min1 == &_min2);', so if no type cast,
the compiler will report 'pointer types lacks a cast':

  drivers/staging/wlags49_h2/wl_main.c:3174:122: warning: comparison of distinct pointer types lacks a cast [enabled by default]

Signed-off-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: nvec: Convert to use devm_input_allocate
Leon Romanovsky [Tue, 14 May 2013 09:22:07 +0000 (12:22 +0300)]
staging: nvec: Convert to use devm_input_allocate

nvec_kbd is converted to use devm_input_allocate.
This simplifies error handling and remove path.

Signed-off-by: Leon Romanovsky <leon@leon.nu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: ni_labpc: remove *_ai_gain_bits tables
H Hartley Sweeten [Tue, 14 May 2013 00:07:24 +0000 (17:07 -0700)]
staging: comedi: ni_labpc: remove *_ai_gain_bits tables

The bits needed to set the analog input gain can be simply calculated
based on the 'range'.

The LabPC versions of the board do not have the '0x10' gain that the
LabPC+ board supports. By incrementing the range appropriately the
correct gain bits can still be calculated.

This allows removing the two gain tables, as well as the export, along
with the 'ai_range_code' data in the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: ft1000: Change C99 comments in ft1000_dnld.c
Dylan Socolobsky [Mon, 13 May 2013 22:47:33 +0000 (19:47 -0300)]
Staging: ft1000: Change C99 comments in ft1000_dnld.c

This simple patch fixes the ERRORs found by checkpatch.pl in the file
ft1000_dnld.c by switching to the standard Kernel comment style.

Signed-off-by: Dylan Socolobsky <dsocolobsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: ft1000: fix brace coding style in ft1000_dnld.c
Dylan Socolobsky [Mon, 13 May 2013 22:42:28 +0000 (19:42 -0300)]
Staging: ft1000: fix brace coding style in ft1000_dnld.c

This simple patch fixes a brace warning raised by checkpatch.pl in ft1000_dnld.c

Signed-off-by: Dylan Socolobsky <dsocolobsky@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/xgifb: Fix always false condition in vb_setmode.c (smatch)
Peter Huewe [Mon, 13 May 2013 21:41:49 +0000 (23:41 +0200)]
staging/xgifb: Fix always false condition in vb_setmode.c (smatch)

Smatch complains:
drivers/staging/xgifb/vb_setmode.c:3181
XGI_SetLockRegs() warn: bitwise AND condition is false here

Since SetNTSCTV is defined as 0 in drivers/video/sis/initdef.h this is
correct.
-> Change the condition to == to fix this.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/xgifb: Remove unnecessary binary calculation in GetXG27FPBits
Peter Huewe [Mon, 13 May 2013 21:41:48 +0000 (23:41 +0200)]
staging/xgifb: Remove unnecessary binary calculation in GetXG27FPBits

If temp <= 2 no other bits than the lowest two (0x03) can be set anyway
-> this operation can be removed.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/xgifb: Consolidate function almost identical calls in XGINew_GetXG21Sense
Peter Huewe [Mon, 13 May 2013 21:41:47 +0000 (23:41 +0200)]
staging/xgifb: Consolidate function almost identical calls in XGINew_GetXG21Sense

Instead of calling xgifb_reg_and_or with almost identical parameters in
a simple if/else scenario, we assign the changing parameter to a temp
variable and call xgifb_reg_and_or only from one location.

-> Easier to read, easier to understand (especially wrt the line breaks)

(For the if condition we don't need the Temp variable, so we can use the
value directly).

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/xgifb: Remove unnecessary cases in XGINew_SenseLCD
Peter Huewe [Mon, 13 May 2013 21:41:46 +0000 (23:41 +0200)]
staging/xgifb: Remove unnecessary cases in XGINew_SenseLCD

The switch statement sets the temp value to zero for certain cases and
leaves it untouched for other cases -> all these other cases can be
combined in the default case.

Since an empty case containing only a break, it can be removed.

The patch also removes the if statement, as it uses the same value as the switch
for comparison, and includes the code into the switch.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/xgifb: Remove uneccessary/simply if in XGINew_GetXG20DRAMType
Peter Huewe [Mon, 13 May 2013 21:41:45 +0000 (23:41 +0200)]
staging/xgifb: Remove uneccessary/simply if in XGINew_GetXG20DRAMType

Instead of storing the value in a temp variable, anding it with 1 and
assign data conditionally we can assign the value directly.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/sb105x: remove asm/segment.h dependency
Jeff Mahoney [Tue, 7 May 2013 14:18:22 +0000 (16:18 +0200)]
staging/sb105x: remove asm/segment.h dependency

sb105x doesn't seem to actually need <asm/segment.h> (builds on x86
without it) and ppc/ppc64 doesn't provide it so it fails to build there.

This patch removes the dependency.

CC: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: Panel: panel: Fixed checkpatch line length warnings
Jake Champlin [Sat, 4 May 2013 15:21:17 +0000 (11:21 -0400)]
Staging: Panel: panel: Fixed checkpatch line length warnings

Fixed 4 cases of line length issues with checkpatch. Checkpatch is now clean
for panel.c.

Signed-off-by: 'Jake Champlin <jake.champlin.27@gmail.com>'
Acked-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: Fixed warning 'preferred seq_puts instead of seq_printf'.
Tülin İzer [Wed, 15 May 2013 23:22:18 +0000 (02:22 +0300)]
Staging: silicom: Fixed warning 'preferred seq_puts instead of seq_printf'.

This patch fixes warning in silicom/bpctl_mod.c : seq_puts has to be preferred
to seq_printf when the format is a constant string.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: vt6655: Fixed ERROR: do not use C99 // comments in vt6655/80211hdr.h
Tülin İzer [Wed, 15 May 2013 20:42:24 +0000 (23:42 +0300)]
Staging: vt6655: Fixed ERROR: do not use C99 // comments in vt6655/80211hdr.h

This patch fixes ERROR: do not use C99 // comments found by checkpatch
in vt6655/80211hdr.h.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: vt6655: Fixed ERROR: do not use C99 // comments in vt6655/aes_ccmp.h.
Tülin İzer [Wed, 15 May 2013 20:41:56 +0000 (23:41 +0300)]
Staging: vt6655: Fixed ERROR: do not use C99 // comments in vt6655/aes_ccmp.h.

This patch fixes ERROR: do not use C99 // comments found by checkpatch
in vt6655/aes_ccmp.c.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: vt6655: Fixed ERROR: do not use C99 // comments in vt6655/aes_ccmp.c
Tülin İzer [Wed, 15 May 2013 20:41:28 +0000 (23:41 +0300)]
Staging: vt6655: Fixed ERROR: do not use C99 // comments in vt6655/aes_ccmp.c

This patch fixes ERROR: do not use C99 // comments found by checkpatch
in vt6655/aes_ccmp.c.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: vt6655: Fixed ERROR: do not use C99 // comments in vt6655/80211mgr.h
Tülin İzer [Wed, 15 May 2013 20:40:59 +0000 (23:40 +0300)]
Staging: vt6655: Fixed ERROR: do not use C99 // comments in vt6655/80211mgr.h

This patch fixes ERROR: do not use C99 // comments found by checkpatch.pl
in vt6655/80211mgr.c

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: vt6655: Fixed ERROR: do not use C99 // comments in 80211mgr.c
Tülin İzer [Wed, 15 May 2013 20:40:30 +0000 (23:40 +0300)]
Staging: vt6655: Fixed ERROR: do not use C99 // comments in 80211mgr.c

This patch fixes ERROR: do not use C99 // comments in vt6655/802mgr.c

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: Fixed error 'space prohibited before that close parenthesis ')''
Tülin İzer [Wed, 15 May 2013 02:34:20 +0000 (05:34 +0300)]
Staging: silicom: Fixed error 'space prohibited before that close parenthesis ')''

This patch fixes error 'space prohibited before that close parenthesis ')'' found by
checkpatch in driver silicom.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: Fixed error 'space required after that ',''.
Tülin İzer [Wed, 15 May 2013 02:33:48 +0000 (05:33 +0300)]
Staging: silicom: Fixed error 'space required after that ',''.

This patch fixes error 'space required after that ','' found by
checkpatch in driver silicom.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: Fixed warning 'please, no space before tabs'.
Tülin İzer [Wed, 15 May 2013 02:33:15 +0000 (05:33 +0300)]
Staging: silicom: Fixed warning 'please, no space before tabs'.

This patch fixes warning 'please, no space before tabs' found by checkpatch
in driver silicom.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom : Fixed error 'exactly one space required after that #ifdef'
Tülin İzer [Wed, 15 May 2013 02:32:34 +0000 (05:32 +0300)]
Staging: silicom : Fixed error 'exactly one space required after that #ifdef'

This patch fixes error 'exactly one space required after that #ifdef' found by
checkpatch in driver silicom.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: Fixed warning 'space prohibited before semicolon'.
Tülin İzer [Wed, 15 May 2013 02:32:03 +0000 (05:32 +0300)]
Staging: silicom: Fixed warning 'space prohibited before semicolon'.

This patch fixes warning 'space prohibited before semicolon' found by
checkpatch.pl in driver silicom.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: silicom: Fixed error 'do not initialise statics to 0 or NULL'.
Tülin İzer [Wed, 15 May 2013 02:31:33 +0000 (05:31 +0300)]
Staging: silicom: Fixed error 'do not initialise statics to 0 or NULL'.

This patch fixes error 'do not initialise statics to 0 or NULL'. found by
checkpatch in driver silicom.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Fixed warning 'space required before the open parenthesis '(''.
Tülin İzer [Wed, 15 May 2013 00:43:51 +0000 (03:43 +0300)]
Staging: bcm: Fixed warning 'space required before the open parenthesis '(''.

This patch fixes warning 'space required before the open parenthesis '(''
found by checkpacth.pl in driver bcm.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Fixed error 'else should follow close brace '}''.
Tülin İzer [Wed, 15 May 2013 00:43:18 +0000 (03:43 +0300)]
Staging: bcm: Fixed error 'else should follow close brace '}''.

This patch fixes error 'else should follow close brace '}''
found by checkpatch in driver bcm.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Fixed warning 'braces {} are not necessary for single statement blocks'.
Tülin İzer [Wed, 15 May 2013 00:42:46 +0000 (03:42 +0300)]
Staging: bcm: Fixed warning 'braces {} are not necessary for single statement blocks'.

This patch fixes warning: 'braces {} are not necessary for single
statement blocks' found by checkpatch.pl in driver bcm.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Fixed error 'that open brace { should be on the previous line'.
Tülin İzer [Wed, 15 May 2013 00:42:12 +0000 (03:42 +0300)]
Staging: bcm: Fixed error 'that open brace { should be on the previous line'.

This patch fixes error 'that open brace { should be on the previous line'
found by checkpatch in driver bcm.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Fixed warning 'space required around '=''.
Tülin İzer [Wed, 15 May 2013 00:41:37 +0000 (03:41 +0300)]
Staging: bcm: Fixed warning 'space required around '=''.

This patch fixes warning 'space required around '='' found by
checkpatch in driver bcm.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: Fixed warning about C99 comments.
Tülin İzer [Wed, 15 May 2013 00:40:48 +0000 (03:40 +0300)]
Staging: bcm: Fixed warning about C99 comments.

Fixed warning 'C99 comments' found by checkpatch in driver bcm.

Signed-off-by: Tülin İzer <tulinizer@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: add USB MTK bluetooth driver
Cho, Yu-Chen [Thu, 16 May 2013 08:31:59 +0000 (16:31 +0800)]
Staging: add USB MTK bluetooth driver

This driver is for the Mediatek Bluetooth that can be found in many
different laptops.  It was written by Mediatek, but cleaned up to
work properly in the kernel tree by SUSE.

--
Changes since v1:
 1.fixed built error , because build path typo.
 2.change to correct version number.

Signed-off-by: Cho, Yu-Chen <acho@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: imx-drm: use devm_ioremap_resource()
Laurent Navet [Thu, 2 May 2013 11:41:41 +0000 (13:41 +0200)]
staging: imx-drm: use devm_ioremap_resource()

Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.

Found with coccicheck and this semantic patch:
 scripts/coccinelle/api/devm_request_and_ioremap.cocci.

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers/staging/nvec: don't check resource with devm_ioremap_resource
Wolfram Sang [Thu, 16 May 2013 11:15:47 +0000 (13:15 +0200)]
drivers/staging/nvec: don't check resource with devm_ioremap_resource

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: lustre: fix return type of lo_release.
Cyril Roelandt [Thu, 16 May 2013 16:06:20 +0000 (18:06 +0200)]
staging: lustre: fix return type of lo_release.

The return type of block_device_operations.release() changed to void in commit
db2a144b.

Found with the following Coccinelle patch:
<smpl>
@has_release_func@
identifier i;
identifier release_func;
@@
struct block_device_operations i = {
 .release = release_func
};

@depends on has_release_func@
identifier has_release_func.release_func;
@@
- int
+ void
release_func(...) {
...
- return ...;
}
</smpl>

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrivers/staging/dwc2: don't check resource with devm_ioremap_resource
Wolfram Sang [Thu, 16 May 2013 11:15:46 +0000 (13:15 +0200)]
drivers/staging/dwc2: don't check resource with devm_ioremap_resource

devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: use devm_ioremap_resource()
Laurent Navet [Thu, 2 May 2013 11:23:17 +0000 (13:23 +0200)]
staging: dwc2: use devm_ioremap_resource()

Replace a call to deprecated devm_request_and_ioremap by devm_ioremap_resource.

Found with coccicheck and this semantic patch:
 scripts/coccinelle/api/devm_request_and_ioremap.cocci.

Signed-off-by: Laurent Navet <laurent.navet@gmail.com>
Reviewed-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2/pci.c: add STMICRO vendor and device ID for STA2X11 board
Federico Vaga [Mon, 13 May 2013 17:54:12 +0000 (19:54 +0200)]
staging: dwc2/pci.c: add STMICRO vendor and device ID for STA2X11 board

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Giancarlo Asnaghi <giancarlo.asnaghi@st.com>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: remove some useless debug prints
Matthijs Kooijman [Mon, 29 Apr 2013 19:50:35 +0000 (19:50 +0000)]
staging: dwc2: remove some useless debug prints

This removes some debug prints from pci.c and makes platform.c and pci.c
a bit more similar again.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: add const to handling of dwc2_core_params
Stephen Warren [Mon, 29 Apr 2013 19:49:08 +0000 (19:49 +0000)]
staging: dwc2: add const to handling of dwc2_core_params

Now the functions use proper const annotations, the global variable with
default params can be marked const, which prevents these values from
being changed for a specific device (in theory there could be multiple
controllers with different settings, for example).

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
[matthijs@stdin.nl: Split patch from bigger patch, marked
    dwc2_module_params in pci.c as const and added
    commit message]
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: remove unneeded check
Matthijs Kooijman [Mon, 29 Apr 2013 19:46:35 +0000 (19:46 +0000)]
staging: dwc2: remove unneeded check

The value in params->enable_dynamic_fifo can only be true if the
corresponding bit in hwcfg2 is set, this is already checked by
dwc2_set_param_enable_dynamic_fifo.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: remove some device-mode related debug code
Matthijs Kooijman [Mon, 29 Apr 2013 19:44:45 +0000 (19:44 +0000)]
staging: dwc2: remove some device-mode related debug code

This code appears to be partially incorrect. Since this is only debug
code and only applies to device mode, it seems better to remove this
code for now than to invest time fixing it.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: add helper variable to simplify code
Matthijs Kooijman [Mon, 29 Apr 2013 19:42:00 +0000 (19:42 +0000)]
staging: dwc2: add helper variable to simplify code

Now a register is masked only in once place, instead of twice. This
makes the two uses of this value shorter so they no longer need to be
linewrapped.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: use dwc2_hcd_get_frame_number where possible
Matthijs Kooijman [Mon, 29 Apr 2013 19:40:23 +0000 (19:40 +0000)]
staging: dwc2: use dwc2_hcd_get_frame_number where possible

Before, there were two places that manually read the FRNUM registers,
while there is a function to do this.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: replace some magic numbers by constants
Matthijs Kooijman [Mon, 29 Apr 2013 19:36:48 +0000 (19:36 +0000)]
staging: dwc2: replace some magic numbers by constants

There were already macros for these, they just weren't being used in a
few places.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: remove dummy interrupt handling
Matthijs Kooijman [Thu, 25 Apr 2013 21:39:16 +0000 (23:39 +0200)]
staging: dwc2: remove dummy interrupt handling

The handling for the IC2INT and RESTOREDONE interrupts just cleared the
interrupt flag, but did not do anything else. Since these interrupts are
not enabled anywhere, they should never trigger and there should never
be a need to clear their flags, so we can safely remove this code.

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: rename dwc2_hcd_intr() to dwc2_handle_hcd_intr()
Matthijs Kooijman [Thu, 25 Apr 2013 21:39:15 +0000 (23:39 +0200)]
staging: dwc2: rename dwc2_hcd_intr() to dwc2_handle_hcd_intr()

This makes the function name more clear and consistent with
dwc2_handle_common_intr().

Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: dwc2: use irq_return_t for interrupt handlers
Matthijs Kooijman [Thu, 25 Apr 2013 21:39:14 +0000 (23:39 +0200)]
staging: dwc2: use irq_return_t for interrupt handlers

The top-level hcd interrupt handlers already used irq_return_t, but the
functions to which it delegates the actual work and the common irq
handler returned plain ints. In addition, they used the IRQ_RETVAL in
the wrong way (but because of the values of the various constants, this
didn't result in wrong behaviour).

Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
[matthijs@stdin.nl: Split patch from bigger patch and added commit message]
Signed-off-by: Matthijs Kooijman <matthijs@stdin.nl>
Acked-by: Paul Zimmerman <paulz@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>