]> git.karo-electronics.de Git - linux-beck.git/log
linux-beck.git
11 years agostaging: vt6656: cleanup vnt_manger.
Malcolm Priestley [Thu, 17 Jan 2013 23:23:37 +0000 (23:23 +0000)]
staging: vt6656: cleanup vnt_manger.

Where appropriate replacing types defined in "type.h" with
linux/types.h.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: cleanup struct vnt_private
Malcolm Priestley [Thu, 17 Jan 2013 23:21:50 +0000 (23:21 +0000)]
staging: vt6656: cleanup struct vnt_private

Where appropriate replacing types defined in "type.h" with
linux/types.h.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: staging: vt6656 change remaining to vnt_mgmt and remove typedef.
Malcolm Priestley [Thu, 17 Jan 2013 23:19:37 +0000 (23:19 +0000)]
staging: vt6656: staging: vt6656 change remaining to vnt_mgmt and remove typedef.

Use
struct vnt_manager

Move vnt_manager from sMgmtObj to vnt_mgmt.

and remove typedef from structures
vnt_private
vnt_manager
vnt_rx_mgmt
vnt_tx_mgmt

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: datarate/dpc/hostap/power use new structures.
Malcolm Priestley [Thu, 17 Jan 2013 23:17:21 +0000 (23:17 +0000)]
staging: vt6656: datarate/dpc/hostap/power use new structures.

Use
struct vnt_private
struct vnt_manager

Move vnt_manager from sMgmtObj to vnt_mgmt.

This patch cleans up function declarations, definitions and local variables
where appropriate replacing types defined in "type.h" with linux/types.h.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6656: change bssdb/rxtx/wpa2 to new structures
Malcolm Priestley [Thu, 17 Jan 2013 23:15:22 +0000 (23:15 +0000)]
staging: vt6656: change bssdb/rxtx/wpa2 to new structures

Use
struct vnt_private
struct vnt_manager

Move vnt_manager from sMgmtObj to vnt_mgmt.

This patch cleans up function declarations, definitions and local variables
where appropriate replacing types defined in "type.h" with linux/types.h.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: alarm-dev: Implement compat_ioctl support
John Stultz [Fri, 11 Jan 2013 23:46:24 +0000 (15:46 -0800)]
staging: alarm-dev: Implement compat_ioctl support

Implement compat_ioctl support for the alarm-dev ioctl.

Cc: Serban Constantinescu <serban.constantinescu@arm.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Colin Cross <ccross@google.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: alarm-dev: Refactor alarm-dev ioctl code in prep for compat_ioctl
John Stultz [Fri, 11 Jan 2013 23:46:23 +0000 (15:46 -0800)]
staging: alarm-dev: Refactor alarm-dev ioctl code in prep for compat_ioctl

Cleanup the Android alarm-dev driver's ioctl code to refactor it
in preparation for compat_ioctl support.

Cc: Serban Constantinescu <serban.constantinescu@arm.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Colin Cross <ccross@google.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: alarm-dev: Drop pre Android 1.0 _OLD ioctls
John Stultz [Fri, 11 Jan 2013 23:46:22 +0000 (15:46 -0800)]
staging: alarm-dev: Drop pre Android 1.0 _OLD ioctls

Per Colin's comment:
"The "support old userspace code" comment for those two ioctls has
been there since pre-Android 1.0.  Those apis are not exposed to
Android apps, I don't see any problem deleting them."

Thus this patch removes the ANDROID_ALARM_SET_OLD and
ANDROID_ALARM_SET_AND_WAIT_OLD ioctl compatability
logic.

Cc: Serban Constantinescu <serban.constantinescu@arm.com>
Cc: Arve Hjønnevåg <arve@android.com>
Cc: Colin Cross <ccross@google.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi/ni_labpc_cs: Convert to module_comedi_pcmcia_driver
Peter Huewe [Mon, 14 Jan 2013 21:00:55 +0000 (22:00 +0100)]
staging/comedi/ni_labpc_cs: Convert to module_comedi_pcmcia_driver

This patch removes the boring init/exit functions with the new
module_comedi_pcmcia_driver macro.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi/ni_daq_700: Convert to module_comedi_pcmcia_driver
Peter Huewe [Mon, 14 Jan 2013 21:00:54 +0000 (22:00 +0100)]
staging/comedi/ni_daq_700: Convert to module_comedi_pcmcia_driver

This patch removes the boring init/exit functions with the new
module_comedi_pcmcia_driver macro.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi/das08_cs: Convert to module_comedi_pcmcia_driver
Peter Huewe [Mon, 14 Jan 2013 21:00:53 +0000 (22:00 +0100)]
staging/comedi/das08_cs: Convert to module_comedi_pcmcia_driver

This patch removes the boring init/exit functions with the new
module_comedi_pcmcia_driver macro.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi/cb_das16_cs: Convert to module_comedi_pcmcia_driver
Peter Huewe [Mon, 14 Jan 2013 21:00:52 +0000 (22:00 +0100)]
staging/comedi/cb_das16_cs: Convert to module_comedi_pcmcia_driver

This patch removes the boring init/exit functions with the new
module_comedi_pcmcia_driver macro.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi/quatech_daqp_cs: Convert to module_comedi_pcmcia_driver
Peter Huewe [Mon, 14 Jan 2013 21:00:51 +0000 (22:00 +0100)]
staging/comedi/quatech_daqp_cs: Convert to module_comedi_pcmcia_driver

This patch removes the boring init/exit functions with the new
module_comedi_pcmcia_driver macro.

Also removed the superflous #ifdef MODULE

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi/ni_mio_cs: Convert to module_comedi_pcmcia_driver
Peter Huewe [Mon, 14 Jan 2013 21:00:50 +0000 (22:00 +0100)]
staging/comedi/ni_mio_cs: Convert to module_comedi_pcmcia_driver

This patch removes the boring init/exit functions with the new
module_comedi_pcmcia_driver macro.

Also removed the superflous #ifdef MODULE

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi/ni_daq_dio24: Convert to module_comedi_pcmcia_driver
Peter Huewe [Mon, 14 Jan 2013 21:00:49 +0000 (22:00 +0100)]
staging/comedi/ni_daq_dio24: Convert to module_comedi_pcmcia_driver

This patch removes the boring init/exit functions with the new
module_comedi_pcmcia_driver macro.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/comedi: Add macro for registering a comedi PCMCIA driver
Peter Huewe [Mon, 14 Jan 2013 21:00:48 +0000 (22:00 +0100)]
staging/comedi: Add macro for registering a comedi PCMCIA driver

This patch introduces a new macro 'module_comedi_pcmcia_driver'
for comedi PCMCIA drivers which do not do anything special in module
init/exit. This eliminates a lot of boilerplate.

Adapted from 'module_comedi_pci_driver'

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: Comedi: ni_tio: Fixed spacing issue
Jake Champlin [Thu, 17 Jan 2013 13:55:30 +0000 (08:55 -0500)]
Staging: Comedi: ni_tio: Fixed spacing issue

Fixed coding style issue from spaces to tabs.

Signed-off-by: Jake Champlin <jake.champlin.27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: remove noise in comedi_buf_read_free()
H Hartley Sweeten [Thu, 10 Jan 2013 17:38:20 +0000 (10:38 -0700)]
staging: comedi: comedi_buf: remove noise in comedi_buf_read_free()

If an attempt is made to free more bytes than have been allocated
a dev_info message is output and the number of bytes to free is
adjusted to the allocated size.

Telling the user this happened is just noise. Remove the message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbobbi@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: remove noise in comedi_buf_write_free()
H Hartley Sweeten [Thu, 10 Jan 2013 17:37:56 +0000 (10:37 -0700)]
staging: comedi: comedi_buf: remove noise in comedi_buf_write_free()

If an attempt is made to free more bytes than have been allocated
a dev_info message is output and the number of bytes to free is
adjusted to the allocated size.

Telling the user this happened is just noise. Remove the message.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbobbi@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: remove unreachable dev_warn in comedi_buf_munge()
H Hartley Sweeten [Thu, 10 Jan 2013 17:37:27 +0000 (10:37 -0700)]
staging: comedi: comedi_buf: remove unreachable dev_warn in comedi_buf_munge()

Due to the 'while(count < num_bytes)' the computed 'block_size' will
always be a value greater than 0.

Remove the unreachable dev_warn and the (block_size < 0) test.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbobbi@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: remove BUG_ON in comedi_buf_munge()
H Hartley Sweeten [Thu, 10 Jan 2013 17:36:58 +0000 (10:36 -0700)]
staging: comedi: comedi_buf: remove BUG_ON in comedi_buf_munge()

The condition that would trigger this BUG_ON can never occur.

The 'munge_count' will be equal to 'buf_write_count' if all the data
in the buffer has been munged.

Or, the 'munge_count' will be less than the 'buf_write_count' if any
partial samples in the buffer were not munged.

The 'munge_count' will never be greater than the 'buf_write_count'.

Remove the unnecessary BUG_ON.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbobbi@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: reorder exported function prototypes
H Hartley Sweeten [Wed, 9 Jan 2013 20:32:56 +0000 (13:32 -0700)]
staging: comedi: comedi_buf: reorder exported function prototypes

For aesthetic reasons, reorder the prototypes for the exported
comedi_buf_* functions in comedidev.h to follow the function
declarations in comedi_buf.c.

Also, change a couple of the return values from 'unsigned' to
'unsigned int' to match the value actually returned.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: don't expose comedi_buf_write_n_allocated()
H Hartley Sweeten [Wed, 9 Jan 2013 20:32:18 +0000 (13:32 -0700)]
staging: comedi: comedi_buf: don't expose comedi_buf_write_n_allocated()

This helper function is only called by the comedi core in comedi_buf.c
and comedi_fops.c. For aesthetic reasons, move it to comedi_buf.c and
remove the inline. Move the prototype from comedidev.h to comedi_internal.h
so it's not exposed outside the comedi core.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: don't expose comedi_buf_read_n_allocated()
H Hartley Sweeten [Wed, 9 Jan 2013 20:31:46 +0000 (13:31 -0700)]
staging: comedi: comedi_buf: don't expose comedi_buf_read_n_allocated()

This helper function is only called in comedi_buf.c. Move it there and
make it static so it's not exposed globally.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: clarify comedi_buf_read_free()
H Hartley Sweeten [Wed, 9 Jan 2013 20:31:16 +0000 (13:31 -0700)]
staging: comedi: comedi_buf: clarify comedi_buf_read_free()

Reword the comment about the need for the smp_mb().

Clarify the check to make sure the number of bytes to free is not
more than the number of bytes allocated.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: clarify comedi_buf_read_alloc()
H Hartley Sweeten [Wed, 9 Jan 2013 20:30:49 +0000 (13:30 -0700)]
staging: comedi: comedi_buf: clarify comedi_buf_read_alloc()

Clarify the check to make sure the number of bytes to allocate is
available.

Reword the comment about the need for the smp_rmb().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: cleanup comedi_buf_read_n_available()
H Hartley Sweeten [Wed, 9 Jan 2013 20:30:22 +0000 (13:30 -0700)]
staging: comedi: comedi_buf: cleanup comedi_buf_read_n_available()

For aesthetic reasons, cleanup this function a bit.

Change the (async == NULL) test to simply (!async).

Reword the comment about the need for the smp_rmb()..

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: clarify comedi_buf_write_free()
H Hartley Sweeten [Wed, 9 Jan 2013 20:29:53 +0000 (13:29 -0700)]
staging: comedi: comedi_buf: clarify comedi_buf_write_free()

Use the helper comedi_buf_write_n_allocated() to clarify the check
to make sure the number of bytes to free is not more than the number
of bytes allocated.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: cleanup comedi_buf_munge()
H Hartley Sweeten [Wed, 9 Jan 2013 20:29:19 +0000 (13:29 -0700)]
staging: comedi: comedi_buf: cleanup comedi_buf_munge()

Refactor this function so there is a single return point and only
one BUG_ON check. The BUG_ON needs to be looked at to see if it
can be safely removed.

Clarify the test in the munge loop that checks for a block copy
that would extend pass the end of the prealloc_buf.

Reword the comment about the need for the smp_wmb().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: remove comedi_buf_write_alloc_strict
H Hartley Sweeten [Wed, 9 Jan 2013 20:28:20 +0000 (13:28 -0700)]
staging: comedi: comedi_buf: remove comedi_buf_write_alloc_strict

This function is only called by comedi_buf_put(). Remove it and just
call __comedi_buf_write_alloc() directly with the strict flag set.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: factor out common comedi_buf_write_alloc_* code
H Hartley Sweeten [Wed, 9 Jan 2013 20:27:48 +0000 (13:27 -0700)]
staging: comedi: comedi_buf: factor out common comedi_buf_write_alloc_* code

The only difference between comedi_buf_write_alloc() and the *_strict()
version is that the *_strict() one will only allocate the chunk if it
can completely fulfill the request.

Factor out the common code and add a flag parameter to indicate the 'strict'
usage. Change the exported functions so they are just wrappers around the
common function.

Cleanup the common function a bit and use the comedi_buf_write_n_available()
helper to determine the number of bytes available.

comedi_buf_write_n_available() is not used outside this module so make it
static. Since the only caller is __comedi_buf_write_alloc(), which will
always have a valid async pointer and already has a memory barrier, we
can remove the unnecessary (async == NULL) test as well as the smp_mb().
Also, the rounding of the sample size can be removed since the caller
does not need it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: rename comedi_reset_async_buf()
H Hartley Sweeten [Wed, 9 Jan 2013 20:27:07 +0000 (13:27 -0700)]
staging: comedi: comedi_buf: rename comedi_reset_async_buf()

For aesthetic reasons, rename this function to comedi_buf_reset(). This
makes all the asynchronous buffer functions have the same namespace.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: factor out new buffer allocation code
H Hartley Sweeten [Wed, 9 Jan 2013 20:26:26 +0000 (13:26 -0700)]
staging: comedi: comedi_buf: factor out new buffer allocation code

The function comedi_buf_alloc() first frees any allocated buffer then,
optionally, allocates a new buffer.

Factor out the new buffer allocation code to a new function. This
allows reducing the indent level and makes the code a bit cleaner.

Also, cleanup to factored out code to make it a bit more concise.
Use a local variable for the current comedi_buf_page being allocated.
This cleans up the ugly line breaks used to keep the lines < 80 chars.

Move the #ifdef'ery for the page protection determination out of the
vmap() call.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: comedi_buf: factor out common code to free the async buffer
H Hartley Sweeten [Wed, 9 Jan 2013 20:25:54 +0000 (13:25 -0700)]
staging: comedi: comedi_buf: factor out common code to free the async buffer

The function comedi_buf_alloc() uses two loops to free the async buffer's
buf_page_list. The first one is used at the beginning to deallocate the
current buffer. The second is used to cleanup if the new buffer allocation
fails.

Factor out the common code to a new function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: separate out comedi_buf_* functions
H Hartley Sweeten [Wed, 9 Jan 2013 20:25:06 +0000 (13:25 -0700)]
staging: comedi: separate out comedi_buf_* functions

Create a new file, comedi_buf.c, to hold all the comedi_async buffer
functions. Currently they are all in drivers.c and really don't have
any association with that source file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: deprecate loading firmware with comedi_config
H Hartley Sweeten [Wed, 9 Jan 2013 16:46:10 +0000 (09:46 -0700)]
staging: comedi: deprecate loading firmware with comedi_config

All the comedi drivers have been converted to use the request_firmware()
hotplug interface. The COMEDI_DEVCONFIG ioctl support for passing the
firmware blob as 'aux_data' is no longer required.

Remove the feature and give the user a dev_warn message if it is
attempted.

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: (core): add comedi_dev_from_file_info()
Ian Abbott [Tue, 8 Jan 2013 13:27:48 +0000 (13:27 +0000)]
staging: comedi: (core): add comedi_dev_from_file_info()

Setting `info = comedi_file_info_from_minor(minor)` and `dev =
comedi_dev_from_minor(minor)` in the same function is a bit of a waste.
The latter function is just a call of the former followed by a
conditional return of an embedded pointer (`info->device`) or NULL.  The
former function uses a spin-lock which is where the wastfulness comes
in.

Move the "followed by a conditional return of an embedded pointer" part
into a new function `comedi_dev_from_file_info` and call this instead of
`comedi_dev_from_minor()` in the places where
`comedi_file_info_from_minor()` is also called.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: tidspbridge: remove unused code to handle iva_img
Omar Ramirez Luna [Thu, 10 Jan 2013 09:37:02 +0000 (03:37 -0600)]
staging: tidspbridge: remove unused code to handle iva_img

There is no way to specify the value of iva_img and since this code
is not being used, remove it.

This analysis resulted from a report by
Chen Gang <gang.chen@asianux.com>, mentioning that the existing code
was wrongly specifying the size to be copied.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: tidspbridge: use scm functions to set boot address and mode
Omar Ramirez Luna [Thu, 10 Jan 2013 09:37:01 +0000 (03:37 -0600)]
staging: tidspbridge: use scm functions to set boot address and mode

Instead of ioremapping SCM registers, use the correspondent layer
to write into them.

This allows us to get rid of a layer violation, since the registers
are no longer touched by driver code.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: tidspbridge: fix uninitialized variable sym_name
Omar Ramirez Luna [Thu, 10 Jan 2013 09:37:00 +0000 (03:37 -0600)]
staging: tidspbridge: fix uninitialized variable sym_name

On both counts, sym_name could be printed uninitialized, this
is solved by moving the pr_* statement to be triggered if the
value is assigned.

Reported-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: tidspbridge: fix memory corruption on long string names
Omar Ramirez Luna [Thu, 10 Jan 2013 09:36:59 +0000 (03:36 -0600)]
staging: tidspbridge: fix memory corruption on long string names

The value allocated doesn't match the one that is meant to be
stored, resulting in corruption of memory for longer strings
that can't be held in such space.

Fix by allocating the correct byte value for the string meant to
be stored.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: tidspbridge: fix potential array out of bounds write
Omar Ramirez Luna [Thu, 10 Jan 2013 09:36:58 +0000 (03:36 -0600)]
staging: tidspbridge: fix potential array out of bounds write

The name of the firmware (drv_datap->base_img) could potentially
become equal to 255 valid characters (size of exec_file), this
will result in an out of bounds write, given that the 255 chars
along with a '\0' terminator will be copied into an array of
255 chars.

Produce an error on this cases, because the driver expects the NULL
ending to be among the 255 char limit.

Reported-by: Chen Gang <gang.chen@asianux.com>
Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: usbip: usbipcommon: Fixed single line bracing issue
Jake Champlin [Thu, 17 Jan 2013 03:16:05 +0000 (22:16 -0500)]
Staging: usbip: usbipcommon: Fixed single line bracing issue

Fixed coding style issue with single line braces.

Signed-off-by: Jake Champlin <jake.champlin.27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: sb105x: clean up interface type test
Dan Carpenter [Wed, 9 Jan 2013 07:12:14 +0000 (10:12 +0300)]
staging: sb105x: clean up interface type test

IIR_RS232 is zero so "if (IIR_RS232 == (b_ret & IIR_RS232))" is always
true so RS232 was always chosen by default.  The test should be
"if (0 == (b_ret & 0x30)) { ".  The other tests should also be in that
format.

This does change how the code works...  If 0x30 is set then it now
defaults to RS232 instead of RS485.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: sb105x: move dereference under IS_ERR() check
Dan Carpenter [Wed, 9 Jan 2013 07:10:59 +0000 (10:10 +0300)]
staging: sb105x: move dereference under IS_ERR() check

Avoid dereverencing the ERR_PTR() by shifting the dereference down a
couple lines.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: slicoss: Fix space-related checkpatch.pl warnings
Cruz Julian Bishop [Mon, 14 Jan 2013 02:29:09 +0000 (12:29 +1000)]
staging: slicoss: Fix space-related checkpatch.pl warnings

This fixes all instances of
"Please, no spaces at start of a new line"
"Please, no spaces before tabs"

Please note that I probably got the warning names wrong,
but they should be close enough for usage here :)

Additional post-commit note: There is one comment on line 230ish in slic.h
that appears to have lost it's formatting. It was fine when I was working
in Geany, but it caught my eye in the below diff. Sorry if it actually happened!

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: slicoss: Fix three checkpatch.pl errors in slicoss.c
Cruz Julian Bishop [Mon, 14 Jan 2013 02:29:08 +0000 (12:29 +1000)]
staging: slicoss: Fix three checkpatch.pl errors in slicoss.c

The errors fixed are all instances of
"ERROR: do not use assignment in if condition"

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: slicoss: Stop swearing in slicoss.c
Cruz Julian Bishop [Mon, 14 Jan 2013 02:29:07 +0000 (12:29 +1000)]
staging: slicoss: Stop swearing in slicoss.c

I'm assuming that "CRC shit reg" is referencing the CRC register/registry.
Please ignore this patch if "shit" is actually in context

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: comedi: add a missing break statement
Dan Carpenter [Sun, 13 Jan 2013 20:05:05 +0000 (23:05 +0300)]
Staging: comedi: add a missing break statement

This is a static checker fix.  From the context it looks like there
should be a break here.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: et131x: Only configure regs if link state changes
Mark Einon [Sun, 13 Jan 2013 20:31:16 +0000 (20:31 +0000)]
staging: et131x: Only configure regs if link state changes

Some config regs get set whenever adjust_link() is called. Change this
so that these registers only get set when the link state changes to UP.

Also remove unnecessary second assignment of boot_coma.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ipu-di: Change DI address info to dev_dbg
Fabio Estevam [Wed, 9 Jan 2013 15:52:30 +0000 (13:52 -0200)]
staging: ipu-di: Change DI address info to dev_dbg

Currently when ipuv3 is probed we have:

imx-ipuv3 40000000.ipu: DI0 base: 0x5e040000 remapped to a08aa000
imx-ipuv3 40000000.ipu: DI1 base: 0x5e048000 remapped to a08ac000
imx-ipuv3 40000000.ipu: IPUv3EX probed

The DI base address and the remapped address are more interesting for debug
purposes, so mark this message as dev_dbg instead.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: copying more data than intended
Dan Carpenter [Wed, 9 Jan 2013 07:09:19 +0000 (10:09 +0300)]
Staging: bcm: copying more data than intended

This was changed to bcm_flash2x_cs_info instead of bcm_flash_cs_info
when we got rid of the typedefs.  bcm_flash2x_cs_info is quite a bit
larger than bcm_flash_cs_info (436 bytes instead of 96) so it would
corrupt user memory and it's an info leak.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: speakup: kobjects.c: checkpatch.pl fixes
Lijo Antony [Tue, 8 Jan 2013 18:39:03 +0000 (22:39 +0400)]
Staging: speakup: kobjects.c: checkpatch.pl fixes

Fixed two "line over 80 characters" warnings reported by checkpatch.pl

Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: speakup: keyhelp.c: checkpatch.pl fixes
Lijo Antony [Tue, 8 Jan 2013 18:39:02 +0000 (22:39 +0400)]
Staging: speakup: keyhelp.c: checkpatch.pl fixes

Breaking 2 lines to fit 80 char limit

Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: speakup: buffers.c: checkpatch.pl fixes
Lijo Antony [Tue, 8 Jan 2013 18:39:01 +0000 (22:39 +0400)]
Staging: speakup: buffers.c: checkpatch.pl fixes

Fixed two camel case issues.

Signed-off-by: Lijo Antony <lijo.kernel@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omapdrm/omap_gem_dmabuf.c: fix memory leakage
Cong Ding [Tue, 15 Jan 2013 19:46:50 +0000 (20:46 +0100)]
staging: omapdrm/omap_gem_dmabuf.c: fix memory leakage

There is a memory leakage in variable sg if it goes to error.

Signed-off-by: Cong Ding <dinggnu@gmail.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: imx-drm: ipu-common: Remove unused variable
Fabio Estevam [Wed, 9 Jan 2013 02:32:02 +0000 (00:32 -0200)]
staging: imx-drm: ipu-common: Remove unused variable

Fix the following warning when building with W=1 option:

drivers/staging/imx-drm/ipu-v3/ipu-common.c: In function 'ipu_remove':
drivers/staging/imx-drm/ipu-v3/ipu-common.c:1145:19: warning: variable 'res' set but not used [-Wunused-but-set-variable]

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrm/omap: Add OMAP5 support
Andy Gross [Wed, 19 Dec 2012 20:53:38 +0000 (14:53 -0600)]
drm/omap: Add OMAP5 support

Add support for OMAP5 processor.  The main differences are that the OMAP5
has 2 containers, one for 1D and one for 2D.  Each container is 128MiB in
size.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agodrm/omap: Add PM capabilities
Andy Gross [Wed, 19 Dec 2012 20:53:37 +0000 (14:53 -0600)]
drm/omap: Add PM capabilities

Added power management capabilities into the omapdrm and DMM drivers.
During suspend, we don't need to do anything to maintain the state of
the LUT.  We have all the necessary information to recreate the mappings
of the GEM object list maintained by the omapdrm driver.

On resume, the DMM resume handler will first reprogram the LUT to point
to the dummy page.  The subsequent resume handler in the omapdrm will call
into the DMM and reprogram each of the buffer objects.  This will ensure
that all of the necessary objects will be pinned into the DMM properly.

Order of suspend/resume handlers is done by device creation.  We create
the DMM device before the omapdrm, so the correct order is maintained.

Signed-off-by: Andy Gross <andy.gross@ti.com>
Signed-off-by: Rob Clark <rob@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6655: no braces needed for single statement if , for blocks
Devendra Naga [Tue, 8 Jan 2013 17:52:35 +0000 (12:52 -0500)]
staging: vt6655: no braces needed for single statement if , for blocks

there is only one line inside the if and for blocks, so the braces are
not needed

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6655: s/kmalloc + memset / kzalloc
Devendra Naga [Tue, 8 Jan 2013 17:52:34 +0000 (12:52 -0500)]
staging: vt6655: s/kmalloc + memset / kzalloc

replace kmalloc and subsequent memset with kzalloc
and drop the null checks and casts and clean the coding style a bit too

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6655: checkpatch fixes
Devendra Naga [Tue, 8 Jan 2013 17:52:33 +0000 (12:52 -0500)]
staging: vt6655: checkpatch fixes

put opening brace in a new line
4 ---> 8 spaces

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vt6655: s/kmalloc + memset/kzalloc in alloc_rd_info
Devendra Naga [Tue, 8 Jan 2013 17:52:32 +0000 (12:52 -0500)]
staging: vt6655: s/kmalloc + memset/kzalloc in alloc_rd_info

replace kmalloc and memset if the pointer is valid with kzalloc,
and remove the check around the null pointer cases as we dont need it.

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zsmalloc: comment zs_create_pool function
Davidlohr Bueso [Fri, 4 Jan 2013 20:14:00 +0000 (12:14 -0800)]
staging: zsmalloc: comment zs_create_pool function

Just as with zs_malloc() and zs_map_object(), it is worth
formally commenting the zs_create_pool() function.

Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: zcache: delete it
Greg Kroah-Hartman [Wed, 16 Jan 2013 07:46:58 +0000 (23:46 -0800)]
Staging: zcache: delete it

Dan Magenheimer says that it is now safe to delete zcache, so quick,
before he changes his mind, drop the thing on the floor and run
screaming away.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zram: drop zram_stat_dec/inc functions
Davidlohr Bueso [Wed, 2 Jan 2013 05:24:29 +0000 (21:24 -0800)]
staging: zram: drop zram_stat_dec/inc functions

It seems like an overkill to have adding and subtracting
1 functions from the 32bit counters. Just do it directly.

Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zram: show correct disksize
Davidlohr Bueso [Wed, 2 Jan 2013 05:24:22 +0000 (21:24 -0800)]
staging: zram: show correct disksize

The ->disksize variable stores values in units of bytes,
print the correct size in Kb

Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: zram: simplify num_devices paramater
Davidlohr Bueso [Wed, 2 Jan 2013 05:24:13 +0000 (21:24 -0800)]
staging: zram: simplify num_devices paramater

Simplify dealing with num_devices when initializing zram.
Also cleanup some of the output messages.

Signed-off-by: Davidlohr Bueso <davidlohr.bueso@hp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: ced1401: fix GFP_KERNEL in spinlock context
Alexey Khoroshilov [Fri, 11 Jan 2013 09:01:39 +0000 (13:01 +0400)]
staging: ced1401: fix GFP_KERNEL in spinlock context

Allowi() calls usb_submit_urb(pdx->pUrbCharIn, bInCallback ? GFP_ATOMIC : GFP_KERNEL)
under spin_lock_irqsave(&pdx->charInLock, flags). That means it should use GFP_ATOMIC anyway.
As soon as it is the only usage of bInCallback argument, the patch removes it at all.

Found by Linux Driver Verification project (linuxtesting.org).

Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoStaging: bcm: add a missing break statement
Dan Carpenter [Fri, 11 Jan 2013 06:55:18 +0000 (22:55 -0800)]
Staging: bcm: add a missing break statement

My static checker complains that there is a missing break statement
here.  From the context, it does look like a break statement was
intended.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: avoid CamelCase POD_* enums in pod.c
Stefan Hajnoczi [Fri, 11 Jan 2013 22:08:14 +0000 (23:08 +0100)]
staging: line6: avoid CamelCase POD_* enums in pod.c

Fix the following checkpatch.pl warnings:

  WARNING: Avoid CamelCase: <POD_monitor_level>
  #4512: FILE: staging/line6/pod.c:41:
  +       POD_monitor_level  = 0x04,

  WARNING: Avoid CamelCase: <POD_system_invalid>
  #4513: FILE: staging/line6/pod.c:42:
  +       POD_system_invalid = 0x10000

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: rename MidiBuffer to avoid CamelCase
Stefan Hajnoczi [Fri, 11 Jan 2013 22:08:09 +0000 (23:08 +0100)]
staging: line6: rename MidiBuffer to avoid CamelCase

Fix checkpatch.pl warnings related to MidiBuffer:

  WARNING: Avoid CamelCase: <MidiBuffer>
  #947: FILE: staging/line6/driver.c:363:
  +       struct MidiBuffer *mb = &line6->line6midi->midibuf_in;

Rename MidiBuffer to midi_buffer.

Note that "midibuf" would be another good name but sound/oss/midibuf.c
already uses it for a different concept.  Avoid possible confusion by
using "midi_buffer" instead.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: use pr_err() instead of printk(KERN_ERR, ...)
Stefan Hajnoczi [Fri, 11 Jan 2013 22:08:11 +0000 (23:08 +0100)]
staging: line6: use pr_err() instead of printk(KERN_ERR, ...)

Fix the following checkpatch.pl warning:

  WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(...  to printk(KERN_ERR ...
  #1861: FILE: staging/line6/driver.h:56:
  +       printk(KERN_ERR "line6usb driver bug: missing case in %s:%d\n", \

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: wrap comment to 80 chars in driver.c
Stefan Hajnoczi [Fri, 11 Jan 2013 22:08:10 +0000 (23:08 +0100)]
staging: line6: wrap comment to 80 chars in driver.c

Fix the following checkpatch.pl warning:

  WARNING: line over 80 characters
  #1107: FILE: staging/line6/driver.c:523:
  +       /* Wait for data length. We'll get a couple of 0xff until length arrives. */

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: wrap lines to 80 chars in pod.c
Stefan Hajnoczi [Fri, 11 Jan 2013 22:08:12 +0000 (23:08 +0100)]
staging: line6: wrap lines to 80 chars in pod.c

Fix the following checkpatch.pl warnings:

  WARNING: line over 80 characters
  #4508: FILE: staging/line6/pod.c:37:
  +       /* POD_SYSEX_DUMPMEM2  = 0x76 */   /* dumps entire internal memory of PODxt Pro */

  WARNING: line over 80 characters
  #4630: FILE: staging/line6/pod.c:159:
  +               if (memcmp(buf + 1, line6_midi_id, sizeof(line6_midi_id)) == 0) {

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: line6: drop ToneportSourceInfo CamelCase name
Stefan Hajnoczi [Fri, 11 Jan 2013 22:08:13 +0000 (23:08 +0100)]
staging: line6: drop ToneportSourceInfo CamelCase name

Fix the following checkpatch.pl warning:

  WARNING: Avoid CamelCase: <ToneportSourceInfo>
  #5383: FILE: staging/line6/toneport.c:90:
  +struct ToneportSourceInfo {

Since the struct is only used to define the global
toneport_source_info[] table, I have chosen to make the struct
anonymous and part of the table definition.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: remove unused definitions from ethernet.h
Przemo Firszt [Mon, 10 Dec 2012 23:21:25 +0000 (23:21 +0000)]
rtl8712: remove unused definitions from ethernet.h

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: remove all NDIS_* definitions and use rndis.h instead
Przemo Firszt [Mon, 10 Dec 2012 23:21:24 +0000 (23:21 +0000)]
rtl8712: remove all NDIS_* definitions and use rndis.h instead

Remove duplicate code.The definitions are already in
include/linux/rndis.h

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: remove unused macros
Przemo Firszt [Mon, 10 Dec 2012 23:21:23 +0000 (23:21 +0000)]
rtl8712: remove unused macros

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: replace min with min_t
Przemo Firszt [Mon, 10 Dec 2012 23:21:22 +0000 (23:21 +0000)]
rtl8712: replace min with min_t

I've changed the ugly casting here and used min_t() instead.  I
also changed the u16 to a u32 because ->network.Ssid.SsidLength
is 32 bits.  It doesn't make a difference, but truncating the
upper bits away is sloppy.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: replace printk with better solutions
Przemo Firszt [Mon, 10 Dec 2012 23:21:21 +0000 (23:21 +0000)]
rtl8712: replace printk with better solutions

Replace printk with netdev_printk helpers, dev_printk helpers or
pr_err/warn/info if there is no device info available.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: remove unused macros from rtl8712/wifi.h
Przemo Firszt [Mon, 10 Dec 2012 23:21:20 +0000 (23:21 +0000)]
rtl8712: remove unused macros from rtl8712/wifi.h

Those definitions are not used anywhere in the kernel. If you know any
reason why they should stay in the code please speak up!

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: code clean up
Przemo Firszt [Mon, 10 Dec 2012 23:21:19 +0000 (23:21 +0000)]
rtl8712: code clean up

Clean some trivial formating problems in rtl8712 from staging tree. This patch
also changes the way preprocessor macros are defined to keep checkpatch.pl
quiet.

Signed-off-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fixed coding style issues in r8192U_core.c
Patrik Karlin [Wed, 9 Jan 2013 08:40:56 +0000 (09:40 +0100)]
staging: rtl8192u: fixed coding style issues in r8192U_core.c

This patch fixes some coding style issuses in r8192U_core.c
No logic is changed

Signed-off-by: Patrik Kårlin <patrik.karlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: removed some non used else's
Patrik Karlin [Wed, 9 Jan 2013 08:40:23 +0000 (09:40 +0100)]
staging: rtl8192u: removed some non used else's

This patch removes some else blocks that has no function in the
code

Signed-off-by: Patrik Kårlin <patrik.karlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8192u: fixed some coding style issues in r8192U_core.c
Patrik Karlin [Wed, 9 Jan 2013 08:39:44 +0000 (09:39 +0100)]
staging: rtl8192u: fixed some coding style issues in r8192U_core.c

This patch fixes some coding style issues. in r8192U_core.c
No logic is changed.

Signed-off-by: Patrik Kårlin <patrik.karlin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agortl8712: remove useless calls to memset().
Cyril Roelandt [Sun, 2 Dec 2012 02:40:21 +0000 (03:40 +0100)]
rtl8712: remove useless calls to memset().

These calls are followed by calls to memcpy() on the same memory area, so they
can be safely removed.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Acked-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agoMerge branch 'staging-linus' into staging-next
Greg Kroah-Hartman [Mon, 7 Jan 2013 23:17:52 +0000 (15:17 -0800)]
Merge branch 'staging-linus' into staging-next

This is to get the comedi fixes, and resolve the issue in comdi_test.c
and comedi_fops.c that were caused by changes in both branches.

It also allows the fwserial driver changes to be applied, as they
required the fixes that are in staging-linus.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: tidspbridge: use prepare/unprepare on dsp clocks
Omar Ramirez Luna [Mon, 24 Dec 2012 14:10:25 +0000 (08:10 -0600)]
staging: tidspbridge: use prepare/unprepare on dsp clocks

This solves runtime failures while trying to enable WDT3 related
functionality on firmware load, however it does affect other clocks
controlled by the driver. Seen on 3.8-rc1.

CCF provides clk_prepare and clk_unprepare for enable and disable
operations respectively, this needs to be called in the correct
order while handling clocks.

Code path to enable/disable dsp clocks can still be reached from an
atomic context, hence we can't use clk_prepare_enable and
clk_disable_unprepare yet.

Signed-off-by: Omar Ramirez Luna <omar.ramirez@copitl.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: tidspbridge: Fix build breakage due to splitting CM functions.
Enric Balletbo i Serra [Wed, 19 Dec 2012 09:48:46 +0000 (10:48 +0100)]
staging: tidspbridge: Fix build breakage due to splitting CM functions.

Commit ff4ae5d (ARM: OMAP2+: CM/hwmod: split CM functions into OMAP2, OMAP3-specific files)
resulted in a build breakage for tidspbridge driver.

   ...
   CC [M]  drivers/staging/tidspbridge/core/tiomap3430.o
   staging/tidspbridge/core/tiomap3430.c: In function ‘bridge_brd_start’:
   staging/tidspbridge/core/tiomap3430.c:550:24: error: ‘OMAP3430_CM_AUTOIDLE_PLL’
     undeclared (first use in this function)
   make[3]: *** [drivers/staging/tidspbridge/core/tiomap3430.o] Error 1
   ...

Fix this by including the appropriate header file.

Signed-off-by: Enric Balletbo i Serra <eballetbo@iseebcn.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: android: Add some Kconfig help entries
Cruz Julian Bishop [Fri, 21 Dec 2012 23:00:46 +0000 (09:00 +1000)]
staging: android: Add some Kconfig help entries

This commit adds Kconfig entries for the following:

1: ANDROID_BINDER_IPC
2: ASHMEM (additional text)
3: ANDROID_LOGGER

It also changes "Register" to "Registers" in
ANDROID_LOW_MEMORY_KILLER

Finally, all "help" instances are changed to "---help---",
as recommended by kconfig-language.txt in order to visually
aid developers.

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: android: Fix two checkpatch issues in binder.c
Cruz Julian Bishop [Fri, 21 Dec 2012 23:00:45 +0000 (09:00 +1000)]
staging: android: Fix two checkpatch issues in binder.c

This fixes two instances of
"static const char * array should probably be static const char * const"

I have seen other commits doing this in other files, so I am
assuming it should be done here as well.

Please tell me if this is wrong :)

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: android: Avoid using camelcase in binder.h
Cruz Julian Bishop [Fri, 21 Dec 2012 23:00:44 +0000 (09:00 +1000)]
staging: android: Avoid using camelcase in binder.h

This changes the following:

1: BinderDriverReturnProtocol -> binder_driver_return_protocol
2: BinderDriverCommandProtocol -> binder_driver_return_protocol

These enums are not currently used, but still generate noise in checkpatch.

Well, did. They don't now :)

Signed-off-by: Cruz Julian Bishop <cruzjbishop@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging/csr: Fix dereference before check
Peter Huewe [Mon, 7 Jan 2013 22:09:53 +0000 (23:09 +0100)]
staging/csr: Fix dereference before check

Smatch complains about some pointers that are dereferenced before being
checked:

drivers/staging/csr/sme_sys.c:285
CsrWifiRouterCtrlHipReqHandler() warn: variable dereferenced before
check 'priv' (see line 283)
drivers/staging/csr/sme_sys.c:1503
CsrWifiRouterMaPacketReqHandler() warn: variable dereferenced before
check 'priv' (see line 1501)
drivers/staging/csr/sme_sys.c:2062
CsrWifiRouterCtrlPeerDelReqHandler() warn: variable dereferenced before
check 'priv' (see line 2059)
drivers/staging/csr/sme_sys.c:2477
CsrWifiRouterCtrlPeerAddReqHandler() warn: variable dereferenced before
check 'priv' (see line 2474)
drivers/staging/csr/sme_sys.c:3045
CsrWifiRouterCtrlWapiRxPktReqHandler() warn: variable dereferenced
before check 'priv' (see line 3039)

We put the check before the dereferencing and prevent an oops and fix
the warning.

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: Add angle bracket before and after the URL
Masanari Iida [Mon, 7 Jan 2013 14:28:10 +0000 (23:28 +0900)]
staging: Add angle bracket before and after the URL

Add missing angle bracket before and after the URL.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: vme: Fix URL in Kconfig
Masanari Iida [Mon, 7 Jan 2013 14:38:35 +0000 (23:38 +0900)]
staging: vme: Fix URL in Kconfig

The URL vmelinux.org is not accessible.
Change it to www.vmelinux.org.

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: rtl8712: avoid a useless call to memset().
Cyril Roelandt [Tue, 11 Dec 2012 00:20:48 +0000 (01:20 +0100)]
staging: rtl8712: avoid a useless call to memset().

In r8711_wx_get_wap(), make sure we do not call memcpy() on a memory area that
has just been zeroed by a call to memset().

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Acked-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: omap-thermal: fix error check in omap_thermal_expose_sensor() and in omap_th...
Cyril Roelandt [Wed, 12 Dec 2012 00:24:50 +0000 (01:24 +0100)]
staging: omap-thermal: fix error check in omap_thermal_expose_sensor() and in omap_thermal_register_cpu_cooling().

The omap_bandgap_get_sensor_data() function returns ERR_PTR(), so we need to use
IS_ERR() rather than a NULL check.

Signed-off-by: Cyril Roelandt <tipecaml@gmail.com>
Acked-by: Eduardo Valentin <eduardo.valentin@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
11 years agostaging: comedi: Makefile: conditionally compile multi-file core module
H Hartley Sweeten [Thu, 20 Dec 2012 00:49:24 +0000 (17:49 -0700)]
staging: comedi: Makefile: conditionally compile multi-file core module

Instead of using the #ifdef'ery in the comedi_compat32.c and proc.c
files to include/exclude them from the comedi core, modify the Makefile
to include those files automatically when enabled in the .config.

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: comedi_test: fix race when cancelling command
Ian Abbott [Fri, 4 Jan 2013 11:33:21 +0000 (11:33 +0000)]
staging: comedi: comedi_test: fix race when cancelling command

Éric Piel reported a kernel oops in the "comedi_test" module.  It was a
NULL pointer dereference within `waveform_ai_interrupt()` (actually a
timer function) that sometimes occurred when a running asynchronous
command is cancelled (either by the `COMEDI_CANCEL` ioctl or by closing
the device file).

This seems to be a race between the caller of `waveform_ai_cancel()`
which on return from that function goes and tears down the running
command, and the timer function which uses the command.  In particular,
`async->cmd.chanlist` gets freed (and the pointer set to NULL) by
`do_become_nonbusy()` in "comedi_fops.c" but a previously scheduled
`waveform_ai_interrupt()` timer function will dereference that pointer
regardless, leading to the oops.

Fix it by replacing the `del_timer()` call in `waveform_ai_cancel()`
with `del_timer_sync()`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reported-by: Éric Piel <piel@delmic.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>