OSDN Git Service

uclinux-h8/linux.git
10 years agostaging: comedi: pcl812: remove 'valid' from private data
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:19 +0000 (14:27 -0700)]
staging: comedi: pcl812: remove 'valid' from private data

This member of the private data is set but never used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: remove acl8216_ai_insn_read()
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:18 +0000 (14:27 -0700)]
staging: comedi: pcl812: remove acl8216_ai_insn_read()

This (*insn_read) function was used to read 16-bit analog input data
from the boardACL8216 boardtypes. The 12/16-bit differences are now
handled by the pcl812_ai_eoc() and pcl812_ai_get_sample() helpers.

Remove this function and use pcl812_ai_insn_read() for all boardtypes.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: remove 'ai_is16b' from private data
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:17 +0000 (14:27 -0700)]
staging: comedi: pcl812: remove 'ai_is16b' from private data

We can check the subdevice 'maxdata' to determine if the analog input
data is 12 or 16-bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: introduce pcl818_ai_get_sample()
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:16 +0000 (14:27 -0700)]
staging: comedi: pcl818: introduce pcl818_ai_get_sample()

Introduce a helper function to read the 12-bit analog input data
sample and optionally return the channel that the sample was for.
The channel is only used in the interrupt routine to check for
dropped samples.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: introduce pcl816_ai_get_sample()
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:15 +0000 (14:27 -0700)]
staging: comedi: pcl816: introduce pcl816_ai_get_sample()

Introduce a helper function to read the 14/16-bit analog input data
sample.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: introduce pcl812_ai_get_sample()
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:14 +0000 (14:27 -0700)]
staging: comedi: pcl812: introduce pcl812_ai_get_sample()

Introduce a helper function to read the 12/16-bit analog input data
sample.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: remove 'ai_maxdata' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:13 +0000 (14:27 -0700)]
staging: comedi: pcl812: remove 'ai_maxdata' from boardinfo

Most of the board types supported by this driver have 12-bit analog
inputs. Two of them, the acl8216 and a826pg, have 16-bit analog inputs.

Remove the 'ai_maxdata' member from the boardinfo and replace it with
a bit-field flag 'has_16bit_ai'. Refactor pcl812_attach() to use this
new boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: remove 'ao_maxdata' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:12 +0000 (14:27 -0700)]
staging: comedi: pcl818: remove 'ao_maxdata' from boardinfo

All the board types have 12-bit analog outputs. Remove this data from
the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: remove 'ai_maxdata' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:11 +0000 (14:27 -0700)]
staging: comedi: pcl818: remove 'ai_maxdata' from boardinfo

All the board types have 12-bit analog inputs. Remove this data from
the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: clarify irq request in pcl818_attach()
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:10 +0000 (14:27 -0700)]
staging: comedi: pcl818: clarify irq request in pcl818_attach()

All the board types can use IRQ 2-7 for async command support. Remove
the 'IRQbits', which is a mask of the valid IRQs, from the boardinfo
and refactor pcl818_attach().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: remove 'ai_range_type' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:06 +0000 (14:27 -0700)]
staging: comedi: pcl816: remove 'ai_range_type' from boardinfo

All the board types use the same analog input range_table. Remove this
data from the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: remove 'ao_chanlist' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:04 +0000 (14:27 -0700)]
staging: comedi: pcl816: remove 'ao_chanlist' from boardinfo

This member in the boardinfo is the same for all board types. Remove
it.

The comedi core will initalize the subdevice len_chanlist to 1 if it
is not set by the driver so remove the unnecessary initialization.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: remove 'n_ranges' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:03 +0000 (14:27 -0700)]
staging: comedi: pcl818: remove 'n_ranges' from boardinfo

This member in the boardinfo is not used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: remove 'n_ranges' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:02 +0000 (14:27 -0700)]
staging: comedi: pcl816: remove 'n_ranges' from boardinfo

This member in the boardinfo is not used. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: tidy up differential ai user option
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:01 +0000 (14:27 -0700)]
staging: comedi: pcl812: tidy up differential ai user option

Some of the boards supported by this driver can do differential analog
input when configureg with jumpers on the board. When diff. ai is used
the number of input channels is half the single-ended number of channels.
The user specifies the analog input mode for these boards when attaching
to the driver by using a configuration option.

Remove the unnecessary 'n_aichan_diff' member from the boardinfo. Add a
comment for the boards that can do differential ai.

Refactor pcl812_attach() to parse the user option before setting up the
subdevices. We can then use the 'use_diff' flag to determine if the ai
is single-ended or differential and set the subdev_flags and n_chan.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: all board types have analog inputs
H Hartley Sweeten [Mon, 17 Feb 2014 21:27:00 +0000 (14:27 -0700)]
staging: comedi: pcl818: all board types have analog inputs

All the boards supported by this driver have 16 single-ended analog input
channels. The boards can also be configued to give 8 differential inputs.

Remove the 'n_aichan_se' and 'n_aichan_diff' members from the boardinfo and
refactor pcl818_attach().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: all board types have 16 analog inputs
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:59 +0000 (14:26 -0700)]
staging: comedi: pcl816: all board types have 16 analog inputs

All the boards supported by this driver have 16 analog input channels.

Remove the 'n_aichan' member from the boardinfo and refactor pcl816_attach().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: all board types have analog inputs
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:58 +0000 (14:26 -0700)]
staging: comedi: pcl812: all board types have analog inputs

All the boards supported by this driver have 16 or 32 analog input
channels.

Remove the unnecessary check in pcl812_attach() to reduce the indent
level of the code.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: factor analog input range selection out of (*attach)
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:57 +0000 (14:26 -0700)]
staging: comedi: pcl818: factor analog input range selection out of (*attach)

The analog input subdevice range is setup in this driver based on a config
option passed by the user. Factor the code that sets the range_table out
of pcl818_attach() to clarify the (*attach).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: factor analog input range selection out of (*attach)
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:56 +0000 (14:26 -0700)]
staging: comedi: pcl812: factor analog input range selection out of (*attach)

The analog input subdevice range is setup in this driver based on a config
option passed by the user. Factor the code that sets the range_table out
of pcl812_attach() to clarify the (*attach).

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: all board types have digital inputs and outputs
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:55 +0000 (14:26 -0700)]
staging: comedi: pcl816: all board types have digital inputs and outputs

All the board types have 16 digital inputs and 16 digital outputs.

Remove the 'n_dichan' and 'n_dochan' members in the boardinfo.

The subdevice support code is currently incomplete in this driver. For
now just tidy up the incomplete subdevice code in pcl816_attach().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: all board types have digital inputs and outputs
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:54 +0000 (14:26 -0700)]
staging: comedi: pcl818: all board types have digital inputs and outputs

All the board types have 16 digital inputs and 16 digital outputs.

Remove the 'n_dichan' and 'n_dochan' members in the boardinfo. Refactor
pcl818_attach() to always setup these subdevices.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: tidy up digital subdevice boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:53 +0000 (14:26 -0700)]
staging: comedi: pcl812: tidy up digital subdevice boardinfo

For the board types that have digital inputs and outputs there are always
16 input channels and 16 output channels.

Remove the 'n_dichan' and 'n_dochan' members in the boardinfo and replace
them with a bit-field flag 'has_dio'. Refactor pcl812_attach() to use the
new boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: change 'is_818' in boardinfo to a bit-field
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:52 +0000 (14:26 -0700)]
staging: comedi: pcl818: change 'is_818' in boardinfo to a bit-field

Change this flag in the boardinfo into a bit-field.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: rename 'haveMPC508' in boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:51 +0000 (14:26 -0700)]
staging: comedi: pcl812: rename 'haveMPC508' in boardinfo

Rename this CamelCase member in the boardinfo and change it to a bit-
field flag.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: clarify dma channel request in pcl818_attach()
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:50 +0000 (14:26 -0700)]
staging: comedi: pcl818: clarify dma channel request in pcl818_attach()

All the board types that can do DMA can use DMA channels 3 or 1. Remove
the 'DMAbits', which is a mask of the valid channels, from the boardinfo
and replace it with a bit-field flag 'has_dma'.

Refactor pcl818_attach() to use the new flag and remove the need for the
goto.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: clarify dma channel request in pcl816_attach()
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:49 +0000 (14:26 -0700)]
staging: comedi: pcl816: clarify dma channel request in pcl816_attach()

All the board types can do DMA using DMA channels 3 or 1. Remove the 'DMAbits',
which is a mask of the valid channels, from the boardinfo.

Refactor pcl816_attach() to remove the need for the goto.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: clarify dma channel request in pcl812_attach()
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:48 +0000 (14:26 -0700)]
staging: comedi: pcl812: clarify dma channel request in pcl812_attach()

All the board types that can do DMA can use DMA channels 3 or 1. Remove
the 'DMAbits', which is a mask of the valid channels, from the boardinfo
and replace it with a bit-field flag 'has_dma'.

Refactor pcl812_attach() to use the new flag and remove the need for the
goto.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: remove 'rangelist_ao' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:47 +0000 (14:26 -0700)]
staging: comedi: pcl818: remove 'rangelist_ao' from boardinfo

The 'rangelist_ao' is the same for all board types. Remove this data
from the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: remove 'rangelist_ao' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:46 +0000 (14:26 -0700)]
staging: comedi: pcl816: remove 'rangelist_ao' from boardinfo

The 'rangelist_ao' is the same for all board types. Remove this data
from the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: remove 'rangelist_ao' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:45 +0000 (14:26 -0700)]
staging: comedi: pcl812: remove 'rangelist_ao' from boardinfo

The 'rangelist_ao' is the same for all board types. Remove this data
from the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: remove 'i8254_osc_base' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:44 +0000 (14:26 -0700)]
staging: comedi: pcl816: remove 'i8254_osc_base' from boardinfo

The 'i8254_osc_base' is the same for all board types. Remove this data
from the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: remove 'i8254_osc_base' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:43 +0000 (14:26 -0700)]
staging: comedi: pcl812: remove 'i8254_osc_base' from boardinfo

The 'i8254_osc_base' is the same for all board types. Remove this data
from the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: remove 'io_range' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:42 +0000 (14:26 -0700)]
staging: comedi: pcl818: remove 'io_range' from boardinfo

The 'io_range' is the same for all board types. Remove this data from
the boardinfo.

The i/o resource size is larger for board types that have a FIFO but this
larger region is only requested if the user wants to use the fifo.

Modify the pcl818_attach() to remove the need for the 'io_range' in the
private data.

For aesthetics, rename the 'fifo' member in the boardinfo to 'has_fifo'
and change it to a bit-field.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: remove 'io_range' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:41 +0000 (14:26 -0700)]
staging: comedi: pcl816: remove 'io_range' from boardinfo

The 'io_range' is the same for all board types. Remove this data from
the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: remove 'io_range' from boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:40 +0000 (14:26 -0700)]
staging: comedi: pcl812: remove 'io_range' from boardinfo

The 'io_range' is the same for all board types. Remove this data from
the boardinfo.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: remove 0/NULL initialzation in boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:39 +0000 (14:26 -0700)]
staging: comedi: pcl818: remove 0/NULL initialzation in boardinfo

The unlisted members in the boardinfo declaration will default to 0/NULL.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: remove 0/NULL initialzation in boardinfo
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:38 +0000 (14:26 -0700)]
staging: comedi: pcl812: remove 0/NULL initialzation in boardinfo

The unlisted members in the boardinfo declaration will default to 0/NULL.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl818: convert boardinfo declaration to C99 format
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:37 +0000 (14:26 -0700)]
staging: comedi: pcl818: convert boardinfo declaration to C99 format

To reduce editing errors and make the data more maintainable, convert
the boardinfo declaration to C99 format.

For aesthetics, move the declaration closer to the definition and remove
the unnecessary comments in the definition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl816: convert boardinfo declaration to C99 format
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:36 +0000 (14:26 -0700)]
staging: comedi: pcl816: convert boardinfo declaration to C99 format

To reduce editing errors and make the data more maintainable, convert
the boardinfo declaration to C99 format.

For aesthetics, move the declaration closer to the definition and remove
the unnecessary comments in the definition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: comedi: pcl812: convert boardinfo declaration to C99 format
H Hartley Sweeten [Mon, 17 Feb 2014 21:26:35 +0000 (14:26 -0700)]
staging: comedi: pcl812: convert boardinfo declaration to C99 format

To reduce editing errors and make the data more maintainable, convert
the boardinfo declaration to C99 format.

For aesthetics, move the declaration closer to the definition and remove
the unnecessary comments in the definition.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/bcm: integer underflow leads to Oom
Dan Carpenter [Mon, 17 Feb 2014 19:57:31 +0000 (22:57 +0300)]
staging/bcm: integer underflow leads to Oom

We do:

        if (NOB > DEFAULT_BUFF_SIZE)
                BuffSize = DEFAULT_BUFF_SIZE;
        else
                BuffSize = NOB;

Since NOB can be negative it results in a larger than intended BuffSize
and makes kzalloc() fail.

The code is still a bit crap because it lets the users read as much as
they want from nvram, but I don't know what a sensible upper limit
should be.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging/bcm: two information leaks in ioctl
Dan Carpenter [Mon, 17 Feb 2014 19:56:06 +0000 (22:56 +0300)]
staging/bcm: two information leaks in ioctl

There are a couple paths where we don't check how much data we copy back
to the user.

Cc: Dave Jones <davej@redhat.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: wlan-ng: replace function ieee80211_dsss_chan_to_freq()
Zhao, Gang [Tue, 18 Feb 2014 15:03:27 +0000 (23:03 +0800)]
staging: wlan-ng: replace function ieee80211_dsss_chan_to_freq()

Replace ieee80211_dsss_chan_to_freq() with more generic
ieee80211_channel_to_frequency(), and add a variable to deal with 80
characters problem.

File cfg80211.c is included by p80211netdev.c, p80211netdev.c includes
<net/cfg80211.h>, both ieee80211_channel_to_frequency() and
IEEE80211_BAND_2GHZ is defined / declared in <net/cfg80211.h>. So this
change is safe.

This change is a preparation for the removal of function
ieee80211_{dsss_chan_to_freq, freq_to_dsss_chan}.

Signed-off-by: Zhao, Gang <gamerh2o@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: gdm724x: cleanup alloc_tx_sdu_struct()
Dan Carpenter [Tue, 18 Feb 2014 12:18:10 +0000 (15:18 +0300)]
staging: gdm724x: cleanup alloc_tx_sdu_struct()

The kfree(t_sdu->buf) sets off a private static checker warning because
"t_sdu->buf" is always NULL.

This function just allocates two pointers so we can re-write it to be
simpler.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: bcm: DDRInit: fix up indentation issues.
Gary Rookard [Sun, 16 Feb 2014 16:16:41 +0000 (11:16 -0500)]
Staging: bcm: DDRInit: fix up indentation issues.

fixed up a couple of indentation issues.

Signed-off-by: Gary Alan Rookard <garyrookard@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: addi-data: do not initialize statics to 0 in hwdrv_apci035.c
Chase Southwood [Sun, 16 Feb 2014 08:41:32 +0000 (02:41 -0600)]
Staging: comedi: addi-data: do not initialize statics to 0 in hwdrv_apci035.c

This patch for hwdrv_apci035.c removes a zero initialization from two
static variables.  Static variables are initialized to zero by default,
so doing so explicitly is not necessary.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: addi-data: convert printk() to dev_err()
Chase Southwood [Tue, 18 Feb 2014 06:34:39 +0000 (00:34 -0600)]
Staging: comedi: addi-data: convert printk() to dev_err()

This patch for hwdrv_apci035.c changes a printk() call to a dev_err() call
since this is generally preferred.  It also removes a newline from the start
of the error message.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: addi-data: cleanup comments in hwdrv_apci035.c
Chase Southwood [Sun, 16 Feb 2014 08:41:09 +0000 (02:41 -0600)]
Staging: comedi: addi-data: cleanup comments in hwdrv_apci035.c

This patch for hwdrv_apci035.c aligns comment blocks and makes indentation
of comments consistent.  Removed all "spaces before tabs" in comment
indentation as well.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoStaging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c
Chase Southwood [Sun, 16 Feb 2014 08:40:06 +0000 (02:40 -0600)]
Staging: comedi: addi-data: fix brace-related coding style issues in hwdrv_apci035.c

This patch for hwdrv_apci035 removes some unneeded braces, and moves some
improperly placed braces to the correct position, as found by checkpatch.
It also removes a commented out if-statement that I found whilst cleaning
braces that is identical to another un-commented if-statement directly
above it, so it is just added clutter and so we can delete it to clean up
further.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ion: ion_cma_heap: Remove '0x' when using %pa format
Fabio Estevam [Tue, 18 Feb 2014 12:46:33 +0000 (09:46 -0300)]
staging: ion: ion_cma_heap: Remove '0x' when using %pa format

%pa format already prints in hexadecimal format, so remove the '0x' annotation
to avoid a double '0x0x' pattern.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ion: Add private buffer flag to skip page pooling on free
Mitchel Humpherys [Mon, 17 Feb 2014 21:58:39 +0000 (13:58 -0800)]
staging: ion: Add private buffer flag to skip page pooling on free

Currently, when we free a buffer it might actually just go back into a
heap-specific page pool rather than going back to the system. This poses
a problem because sometimes (like when we're running a shrinker in low
memory conditions) we need to force the memory associated with the
buffer to truly be relinquished to the system rather than just going
back into a page pool.

There isn't a use case for this flag by Ion clients, so make it a
private flag. The main use case right now is to provide a mechanism for
the deferred free code to force stale buffers to bypass page pooling.

Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweak]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ion: Move shrinker out of heaps
Colin Cross [Mon, 17 Feb 2014 21:58:38 +0000 (13:58 -0800)]
staging: ion: Move shrinker out of heaps

Every heap that uses deferred frees is going to need a shrinker
to shrink the freelist under memory pressure.  Rather than
requiring each heap to implement a shrinker, automatically
register a shrinker if the deferred free flag is set.
The system heap also needs to shrink its page pools, so add
a shrink function to the heap ops that will be called after
shrinking the freelists.

Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Resolved big conflicts with the shrinker api change.
Also minor commit subject tweak.]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ion: Make sure all clients are exposed in debugfs
Mitchel Humpherys [Mon, 17 Feb 2014 21:58:37 +0000 (13:58 -0800)]
staging: ion: Make sure all clients are exposed in debugfs

Currently, if multiple Ion clients are created with the same name, only
the first one shows up in debugfs. Rectify this by adding a
monotonically-increasing serial number to the debug names of Ion
clients.

Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweaks]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ion: Store a copy of the client name on client creation
Mitchel Humpherys [Mon, 17 Feb 2014 21:58:36 +0000 (13:58 -0800)]
staging: ion: Store a copy of the client name on client creation

Currently, we copy the pointer passed in to ion_client_create without
making a copy of the string itself. This approach is problematic since
it relies on the client keeping the name string in working order.

Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweaks]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ion: Fix debugfs handling of multiple kernel clients
Laura Abbott [Mon, 17 Feb 2014 21:58:35 +0000 (13:58 -0800)]
staging: ion: Fix debugfs handling of multiple kernel clients

Currently, Ion registers all debugfs entries for clients
via pid. If there are multiple kernel clients, this means
the debugfs entry only gets created for the first one. Fix
this by creating debugfs entries by name always. When
creating user clients, specify the name via the pid.

Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweaks]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: ion: Create separate heap and client debugfs directories
Mitchel Humpherys [Mon, 17 Feb 2014 21:58:34 +0000 (13:58 -0800)]
staging: ion: Create separate heap and client debugfs directories

It can be slightly annoying to figure out which files under the ion
debugfs directory are heap debug files and which ones are client debug
files. Create separate subdirectories under ion to hold the different
types of debug files.

Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
[jstultz: Minor commit subject tweaks]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: android: Split uapi out of binder.h
Colin Cross [Mon, 17 Feb 2014 21:58:33 +0000 (13:58 -0800)]
staging: android: Split uapi out of binder.h

Move the userspace interface of binder.h to
drivers/staging/android/uapi/binder.h.

Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Worked out the collisions from some of the type changes
made upstream. Also minor commit subject tweak]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: android: split uapi out of sync.h and sw_sync.h
Colin Cross [Mon, 17 Feb 2014 21:58:32 +0000 (13:58 -0800)]
staging: android: split uapi out of sync.h and sw_sync.h

Move the userspace interfaces of sync.h and sw_sync.h to
drivers/staging/android/uapi/

Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Fixed up some conflicts from upstream spelling fixes]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: android: Split uapi out of ashmem.h
Colin Cross [Mon, 17 Feb 2014 21:58:31 +0000 (13:58 -0800)]
staging: android: Split uapi out of ashmem.h

Move the userspace interface of ashmem.h to
drivers/staging/android/uapi/ashmem.h

Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: Minor commit message tweak]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: android: Split uapi out of android_alarm.h
Colin Cross [Mon, 17 Feb 2014 21:58:30 +0000 (13:58 -0800)]
staging: android: Split uapi out of android_alarm.h

Move the userspace interface of android_alarm.h to
drivers/staging/android/uapi/android_alarm.h

Cc: Greg KH <gregkh@linuxfoundation.org>
Cc: Colin Cross <ccross@android.com>
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Colin Cross <ccross@android.com>
[jstultz: minor commit msg tweak]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: clean up s_nsInterruptUsbIoCompleteRead
Malcolm Priestley [Mon, 17 Feb 2014 21:27:30 +0000 (21:27 +0000)]
staging: vt6656: clean up s_nsInterruptUsbIoCompleteRead

Remove comments, white space and camel case

Camel Case changes
pDevice -> priv
ntStatus -> status

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: Remove variable fKillEventPollingThread
Malcolm Priestley [Mon, 17 Feb 2014 21:24:33 +0000 (21:24 +0000)]
staging: vt6656: Remove variable fKillEventPollingThread

We already kill the urb and since patch
s_nsInterruptUsbIoCompleteRead add urb status returns.
have error handling

There is no need for this variable.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: s_nsInterruptUsbIoCompleteRead remove usb_fill_bulk_urb
Malcolm Priestley [Mon, 17 Feb 2014 21:18:40 +0000 (21:18 +0000)]
staging: vt6656: s_nsInterruptUsbIoCompleteRead remove usb_fill_bulk_urb

No need to fill urb in again, just resubmit it.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: s_nsInterruptUsbIoCompleteRead add urb status returns
Malcolm Priestley [Mon, 17 Feb 2014 21:16:20 +0000 (21:16 +0000)]
staging: vt6656: s_nsInterruptUsbIoCompleteRead add urb status returns

Drop out of urb return on usb errors and set intBuf.bInUse to false.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: s_nsInterruptUsbIoCompleteRead set intBuf.bInUse to true
Malcolm Priestley [Mon, 17 Feb 2014 21:12:51 +0000 (21:12 +0000)]
staging: vt6656: s_nsInterruptUsbIoCompleteRead set intBuf.bInUse to true

intBuf.bInUse is set to false set back to true on successful usb_submit_urb

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: Clean up and remove camel case INTnsProcessData.
Malcolm Priestley [Sun, 16 Feb 2014 19:10:18 +0000 (19:10 +0000)]
staging: vt6656: Clean up and remove camel case INTnsProcessData.

Camel Case changes
pDevice -> priv
pINTData -> int_data
pStats -> stats

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: int : Replace typedef struct tagSINTData.
Malcolm Priestley [Sun, 16 Feb 2014 19:09:20 +0000 (19:09 +0000)]
staging: vt6656: int : Replace typedef struct tagSINTData.

New struct vnt_interrupt_data removing the camel case from members.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: int.h correct endian type
Malcolm Priestley [Sun, 16 Feb 2014 19:08:21 +0000 (19:08 +0000)]
staging: vt6656: int.h correct endian type

Endian type u64 qwTSF Change to new base type __le64 tsf

In INTnsProcessData use le64_to_cpu for qwCurrTSF.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: Remove typedef _VIA_BB_TYPE
Malcolm Priestley [Sat, 15 Feb 2014 22:00:41 +0000 (22:00 +0000)]
staging: vt6656: Remove typedef _VIA_BB_TYPE

BB_TYPE_11* are already defined in baseband.h as macros.

assign variable as u8 type.

iwctl.c needs the baseband.h header for the macros.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: remove typedef VIA_PKT_TYPE.
Malcolm Priestley [Sat, 15 Feb 2014 21:58:55 +0000 (21:58 +0000)]
staging: vt6656: remove typedef VIA_PKT_TYPE.

The packet types PK_TYPE_11* are already defined in baseband.h as macros

assign variable as u8 type.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: vt6656: Replace typedef enum _CARD_OP_MODE
Malcolm Priestley [Sat, 15 Feb 2014 21:56:20 +0000 (21:56 +0000)]
staging: vt6656: Replace typedef enum _CARD_OP_MODE

Replace typedef enum _CARD_OP_MODE eOPMode with op_mode enum nl80211_iftype

enum changes
OP_MODE_INFRASTRUCTURE -> NL80211_IFTYPE_STATION
OP_MODE_AP -> NL80211_IFTYPE_AP
OP_MODE_DEF -> NL80211_IFTYPE_UNSPECIFIED
OP_MODE_ADHOC -> NL80211_IFTYPE_ADHOC

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoMerge 3.14-rc3 into staging-next
Greg Kroah-Hartman [Mon, 17 Feb 2014 22:45:02 +0000 (14:45 -0800)]
Merge 3.14-rc3 into staging-next

We want the fixes in this branch to make testing and future work easier.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoLinux 3.14-rc3 v3.14-rc3
Linus Torvalds [Sun, 16 Feb 2014 21:30:25 +0000 (13:30 -0800)]
Linux 3.14-rc3

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 16 Feb 2014 19:05:27 +0000 (11:05 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "We have a small collection of fixes in my for-linus branch.

  The big thing that stands out is a revert of a new ioctl.  Users
  haven't shipped yet in btrfs-progs, and Dave Sterba found a better way
  to export the information"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: use right clone root offset for compressed extents
  btrfs: fix null pointer deference at btrfs_sysfs_add_one+0x105
  Btrfs: unset DCACHE_DISCONNECTED when mounting default subvol
  Btrfs: fix max_inline mount option
  Btrfs: fix a lockdep warning when cleaning up aborted transaction
  Revert "btrfs: add ioctl to export size of global metadata reservation"

10 years agoMerge tag 'dt-fixes-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
Linus Torvalds [Sun, 16 Feb 2014 19:03:58 +0000 (11:03 -0800)]
Merge tag 'dt-fixes-for-3.14' of git://git./linux/kernel/git/robh/linux

Pull devicetree fixes from Rob Herring:
 "Fix booting on PPC boards.  Changes to of_match_node matching caused
  the serial port on some PPC boards to stop working.  Reverted the
  change and reimplement to split matching between new style compatible
  only matching and fallback to old matching algorithm"

* tag 'dt-fixes-for-3.14' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  of: search the best compatible match first in __of_match_node()
  Revert "OF: base: match each node compatible against all given matches first"

10 years agoof: search the best compatible match first in __of_match_node()
Kevin Hao [Fri, 14 Feb 2014 05:22:46 +0000 (13:22 +0800)]
of: search the best compatible match first in __of_match_node()

Currently, of_match_node compares each given match against all node's
compatible strings with of_device_is_compatible.

To achieve multiple compatible strings per node with ordering from
specific to generic, this requires given matches to be ordered from
specific to generic. For most of the drivers this is not true and also
an alphabetical ordering is more sane there.

Therefore, this patch introduces a function to match each of the node's
compatible strings against all given compatible matches without type and
name first, before checking the next compatible string. This implies
that node's compatibles are ordered from specific to generic while
given matches can be in any order. If we fail to find such a match
entry, then fall-back to the old method in order to keep compatibility.

Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Tested-by: Stephen Chivers <schivers@csc.com>
Signed-off-by: Rob Herring <robh@kernel.org>
10 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Sun, 16 Feb 2014 00:18:47 +0000 (16:18 -0800)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "Mostly minor fixes this time to v3.14-rc1 related changes.  Also
  included is one fix for a free after use regression in persistent
  reservations UNREGISTER logic that is CC'ed to >= v3.11.y stable"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  Target/sbc: Fix protection copy routine
  IB/srpt: replace strict_strtoul() with kstrtoul()
  target: Simplify command completion by removing CMD_T_FAILED flag
  iser-target: Fix leak on failure in isert_conn_create_fastreg_pool
  iscsi-target: Fix SNACK Type 1 + BegRun=0 handling
  target: Fix missing length check in spc_emulate_evpd_83()
  qla2xxx: Remove last vestiges of qla_tgt_cmd.cmd_list
  target: Fix 32-bit + CONFIG_LBDAF=n link error w/ sector_div
  target: Fix free-after-use regression in PR unregister

10 years agoMerge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa...
Linus Torvalds [Sun, 16 Feb 2014 00:17:51 +0000 (16:17 -0800)]
Merge branch 'i2c/for-current' of git://git./linux/kernel/git/wsa/linux

Pull i2c fixes from Wolfram Sang:
 "i2c has a bugfix and documentation improvements for you"

* 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
  Documentation: i2c: mention ACPI method for instantiating devices
  Documentation: i2c: describe devicetree method for instantiating devices
  i2c: mv64xxx: refactor message start to ensure proper initialization

10 years agoMerge branches 'irq-urgent-for-linus' and 'irq-core-for-linus' of git://git.kernel...
Linus Torvalds [Sun, 16 Feb 2014 00:06:12 +0000 (16:06 -0800)]
Merge branches 'irq-urgent-for-linus' and 'irq-core-for-linus' of git://git./linux/kernel/git/tip/tip

Pull irq update from Thomas Gleixner:
 "Fix from the urgent branch: a trivial oneliner adding the missing
  Kconfig dependency curing build failures which have been discovered by
  several build robots.

  The update in the irq-core branch provides a new function in the
  irq/devres code, which is a prerequisite for driver developers to get
  rid of boilerplate code all over the place.

  Not a bugfix, but it has zero impact on the current kernel due to the
  lack of users.  It's simpler to provide the infrastructure to
  interested parties via your tree than fulfilling the wishlist of
  driver maintainers on which particular commit or tag this should be
  based on"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Add missing irq_to_desc export for CONFIG_SPARSE_IRQ=n

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Add devm_request_any_context_irq()

10 years agoMerge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sun, 16 Feb 2014 00:04:42 +0000 (16:04 -0800)]
Merge branch 'timers-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull timer fixes from Thomas Gleixner:
 "The following trilogy of patches brings you:

   - fix for a long standing math overflow issue with HZ < 60

   - an onliner fix for a corner case in the dreaded tick broadcast
     mechanism affecting a certain range of AMD machines which are
     infested with the infamous automagic C1E power control misfeature

   - a fix for one of the ARM platforms which allows the kernel to
     proceed and boot instead of stupidly panicing for no good reason.
     The patch is slightly larger than necessary, but it's less ugly
     than the alternative 5 liner"

* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  tick: Clear broadcast pending bit when switching to oneshot
  clocksource: Kona: Print warning rather than panic
  time: Fix overflow when HZ is smaller than 60

10 years agoMerge tag 'trace-fixes-v3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 15 Feb 2014 23:03:34 +0000 (15:03 -0800)]
Merge tag 'trace-fixes-v3.14-rc2' of git://git./linux/kernel/git/rostedt/linux-trace

Pull twi tracing fixes from Steven Rostedt:
 "Two urgent fixes in the tracing utility.

  The first is a fix for the way the ring buffer stores timestamps.
  After a restructure of the code was done, the ring buffer timestamp
  logic missed the fact that the first event on a sub buffer is to have
  a zero delta, as the full timestamp is stored on the sub buffer
  itself.  But because the delta was not cleared to zero, the timestamp
  for that event will be calculated as the real timestamp + the delta
  from the last timestamp.  This can skew the timestamps of the events
  and have them say they happened when they didn't really happen.
  That's bad.

  The second fix is for modifying the function graph caller site.  When
  the stop machine was removed from updating the function tracing code,
  it missed updating the function graph call site location.  It is still
  modified as if it is being done via stop machine.  But it's not.  This
  can lead to a GPF and kernel crash if the function graph call site
  happens to lie between cache lines and one CPU is executing it while
  another CPU is doing the update.  It would be a very hard condition to
  hit, but the result is severe enough to have it fixed ASAP"

* tag 'trace-fixes-v3.14-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ftrace/x86: Use breakpoints for converting function graph caller
  ring-buffer: Fix first commit on sub-buffer having non-zero delta

10 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Sat, 15 Feb 2014 23:02:28 +0000 (15:02 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull x86 EFI fixes from Peter Anvin:
 "A few more EFI-related fixes"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/efi: Check status field to validate BGRT header
  x86/efi: Fix 32-bit fallout

10 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sat, 15 Feb 2014 23:01:33 +0000 (15:01 -0800)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Kevin Hilman:
 "A collection of ARM SoC fixes for v3.14-rc1.

  Mostly a collection of Kconfig, device tree data and compilation fixes
  along with fix to drivers/phy that fixes a boot regression on some
  Marvell mvebu platforms"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  dma: mv_xor: Silence a bunch of LPAE-related warnings
  ARM: ux500: disable msp2 device tree node
  ARM: zynq: Reserve not DMAable space in front of the kernel
  ARM: multi_v7_defconfig: Select CONFIG_SOC_DRA7XX
  ARM: imx6: Initialize low-power mode early again
  ARM: pxa: fix various compilation problems
  ARM: pxa: fix compilation problem on AM300EPD board
  ARM: at91: add Atmel's SAMA5D3 Xplained board
  spi/atmel: document clock properties
  mmc: atmel-mci: document clock properties
  ARM: at91: enable USB host on at91sam9n12ek board
  ARM: at91/dt: fix sama5d3 ohci hclk clock reference
  ARM: at91/dt: sam9263: fix compatibility string for the I2C
  ata: sata_mv: Fix probe failures with optional phys
  drivers: phy: Add support for optional phys
  drivers: phy: Make NULL a valid phy reference
  ARM: fix HAVE_ARM_TWD selection for OMAP and shmobile
  ARM: moxart: move DMA_OF selection to driver
  ARM: hisi: fix kconfig warning on HAVE_ARM_TWD

10 years agoStaging: comedi: kcomedilib: replace deprecated simple_strtoul() with kstrtouint()
Chase Southwood [Sat, 15 Feb 2014 03:59:40 +0000 (21:59 -0600)]
Staging: comedi: kcomedilib: replace deprecated simple_strtoul() with kstrtouint()

Since simple_strtoul() has been deprecated, replace it with kstrtouint().
Also, since return code checking for this new function is enforced, add a
check to ensure that the conversion has succeeded.

Signed-off-by: Chase Southwood <chase.southwood@yahoo.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Make firmware buffer persistent
Stas Sergeev [Fri, 14 Feb 2014 22:54:17 +0000 (16:54 -0600)]
staging: r8188eu: Make firmware buffer persistent

The present code reloads the firmware file from the disk every time the interface
re-inits. Change to hold the firmware in memory, and only download to the
device.

Signed-off-by: Stas Sergeev <stsp@users.sourceforge.net>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove wrapper routine _set_workitem()
Larry Finger [Fri, 14 Feb 2014 22:54:16 +0000 (16:54 -0600)]
staging: r8188eu: Remove wrapper routine _set_workitem()

This is simply a wrapper around schedule_work().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove wrapper routine _init_workitem()
Larry Finger [Fri, 14 Feb 2014 22:54:15 +0000 (16:54 -0600)]
staging: r8188eu: Remove wrapper routine _init_workitem()

This is simply another name for INIT_WORK().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove wrapper _exit_critical_mutex()
Larry Finger [Fri, 14 Feb 2014 22:54:13 +0000 (16:54 -0600)]
staging: r8188eu: Remove wrapper _exit_critical_mutex()

This wrapper is a simple call to mutex_exit().

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove unused union
Larry Finger [Fri, 14 Feb 2014 22:54:12 +0000 (16:54 -0600)]
staging: r8188eu: Remove unused union

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove get_recvframe_data()
Larry Finger [Fri, 14 Feb 2014 22:54:11 +0000 (16:54 -0600)]
staging: r8188eu: Remove get_recvframe_data()

This inline function checks that the pointer is not NULL and then returns
the rx_data member. Unfortunately, all 3 callers of this function have
dereferenced that pointer before this routine is called. As the check for
NULL is useless, eliminate the routine.

Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove get_recvframe_len()
Larry Finger [Fri, 14 Feb 2014 22:54:10 +0000 (16:54 -0600)]
staging: r8188eu: Remove get_recvframe_len()

This simple routine is replaced by a simple access of the len member.

Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove unused get_rxbuf_desc()
Larry Finger [Fri, 14 Feb 2014 22:54:09 +0000 (16:54 -0600)]
staging: r8188eu: Remove unused get_rxbuf_desc()

Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove pkt_to_recv{frame, data, mem} routines
Larry Finger [Fri, 14 Feb 2014 22:54:08 +0000 (16:54 -0600)]
staging: r8188eu: Remove pkt_to_recv{frame, data, mem} routines

These functions are not called from the outside source.

Suggested-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove union wrapping of recv_frame
Larry Finger [Fri, 14 Feb 2014 22:54:07 +0000 (16:54 -0600)]
staging: r8188eu: Remove union wrapping of recv_frame

We have now removed everthing from the union except the struct. The union
can be deleted, the struct renamed, and the referencing of members of the
struct becomes a lot simpler.

Some, but not all, of the problems noted by checkpatch.pl have been fixed.

Sugggested-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove pointless "alignment" entry in recv_frame
Larry Finger [Fri, 14 Feb 2014 22:54:06 +0000 (16:54 -0600)]
staging: r8188eu: Remove pointless "alignment" entry in recv_frame

This alignment entry in union recv_frame does nothing. It certainly
dues not ensure alignment.

Suggested-by: Jes.Sorensen@redhat.com
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes.Sorensen@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8188eu: Remove unnecessary list_head entry from recv_frame union
Larry Finger [Fri, 14 Feb 2014 22:54:05 +0000 (16:54 -0600)]
staging: r8188eu: Remove unnecessary list_head entry from recv_frame union

Struct recv_frame_hdr already contains a list head. This one is pointless.

Suggested-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: r8712u: delete unnecessary field initialization
Julia Lawall [Sat, 15 Feb 2014 07:36:11 +0000 (08:36 +0100)]
staging: r8712u: delete unnecessary field initialization

On success, the function netdev_alloc_skb initializes the dev field of its
result to its first argument, so this doesn't have to be done in the
calling context.

The semantic patch that fixes this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression skb,privn,e;
@@

skb = netdev_alloc_skb(privn,...);
... when strict
(
-skb->dev = privn;
|
?skb = e
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agostaging: rtl8821ae: fix invalid bit mask on MSR_AP check
Levente Kurusa [Fri, 14 Feb 2014 21:50:23 +0000 (22:50 +0100)]
staging: rtl8821ae: fix invalid bit mask on MSR_AP check

Since MSR_AP is 0x3, ANDing it with 0xFC will never be true.
Add a NOT operation to 0xFC so that we will AND with the last
three bits which will result in a possibility that the condition
will succeed.

Signed-off-by: Levente Kurusa <levex@linux.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
10 years agoDocumentation: i2c: mention ACPI method for instantiating devices
Wolfram Sang [Sat, 15 Feb 2014 14:58:35 +0000 (15:58 +0100)]
Documentation: i2c: mention ACPI method for instantiating devices

Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Acked-by: Guenter Roeck <linux@roeck-us.net>