]> Pileus Git - ~andy/linux/log
~andy/linux
12 years agostaging/line6: refactor device information and add POD HD 500
Markus Grabner [Mon, 5 Dec 2011 22:51:53 +0000 (23:51 +0100)]
staging/line6: refactor device information and add POD HD 500

This patch refactors the device information code and adds preliminary support for the POD HD 500 device.

Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging/line6: Remove obsolete code
Markus Grabner [Mon, 5 Dec 2011 22:51:52 +0000 (23:51 +0100)]
staging/line6: Remove obsolete code

This patch removes experimental code which is no longer used.

Signed-off-by: Markus Grabner <grabner@icg.tugraz.at>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: line6/midi.c: Fixed call of obsolete function strict_strtoul
Andor Daam [Mon, 5 Dec 2011 09:10:37 +0000 (10:10 +0100)]
Staging: line6/midi.c: Fixed call of obsolete function strict_strtoul

The obsolete function strict_strtoul should be replaced by the kstrto*
functions.

In this context kstrtou16 should be use, as midi_mask_receive is only
used as unsigned short. All corresponding datatypes were adapted
accordingly.

Signed-off-by: Andor Daam <andor.daam@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: line6/midi.c: Fixed call of obsolete function strict_strtoul
Andor Daam [Mon, 5 Dec 2011 09:09:25 +0000 (10:09 +0100)]
Staging: line6/midi.c: Fixed call of obsolete function strict_strtoul

The function strict_strtoul is obsolete and should be replaced by the
new kstrto* functions.

The variable midi_mask_transmit is only used as unsigned short and the
datatypes of all affected variables were adjusted accordingly.

Signed-off-by: Andor Daam <andor.daam@googlemail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: comedi: unlock on error in usbduxsigma_attach()
Dan Carpenter [Wed, 30 Nov 2011 08:42:58 +0000 (11:42 +0300)]
Staging: comedi: unlock on error in usbduxsigma_attach()

We should release the udev->sem lock before returning.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: comedi: unlock on error in usbdux_ao_inttrig()
Dan Carpenter [Wed, 30 Nov 2011 08:42:21 +0000 (11:42 +0300)]
Staging: comedi: unlock on error in usbdux_ao_inttrig()

If we had an invalid trignum (anything other than zero is invalid) then
we returned without unlocking.  I've modified this function to just have
one return point.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: enable forcecrt2type as a module parameter
Aaro Koskinen [Mon, 5 Dec 2011 22:10:49 +0000 (00:10 +0200)]
staging: xgifb: enable forcecrt2type as a module parameter

Enable forcecrt2type as a module parameter.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: enable forcecrt2type on XG21
Aaro Koskinen [Mon, 5 Dec 2011 22:10:48 +0000 (00:10 +0200)]
staging: xgifb: enable forcecrt2type on XG21

Make "forcecrt2type" to apply also for XG21. The patch enables user to
switch LVDS LCD ON/OFF without the need to update the video BIOS.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: delete "userom" option
Aaro Koskinen [Mon, 5 Dec 2011 22:10:47 +0000 (00:10 +0200)]
staging: xgifb: delete "userom" option

Delete a redundant option.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: vb_table: delete XGI21_LCDCapList
Aaro Koskinen [Mon, 5 Dec 2011 22:10:46 +0000 (00:10 +0200)]
staging: xgifb: vb_table: delete XGI21_LCDCapList

Delete XGI21_LCDCapList. This data is display specific and does not
belong to the driver. It should be provided by the video BIOS.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: move XGI21_LVDSCapStruct into xgifb_video_info
Aaro Koskinen [Mon, 5 Dec 2011 22:10:45 +0000 (00:10 +0200)]
staging: xgifb: move XGI21_LVDSCapStruct into xgifb_video_info

Move the LVDS data into a device-specific data, and eliminate the global
variable usage.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: disable LVDS on XG27
Aaro Koskinen [Mon, 5 Dec 2011 22:10:44 +0000 (00:10 +0200)]
staging: xgifb: disable LVDS on XG27

XG27 has the second display output already hardcoded to disabled. Just
in case, ensure that it has the LVDS code paths disabled. This will
simplify the future cleanups.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: delete XGIfb_GetXG21LVDSData()
Aaro Koskinen [Mon, 5 Dec 2011 22:10:43 +0000 (00:10 +0200)]
staging: xgifb: delete XGIfb_GetXG21LVDSData()

Delete XGIfb_GetXG21LVDSData() and code which duplicates
xgifb_read_vbios().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: ReadVBIOSTablData(): rename to xgifb_read_vbios()
Aaro Koskinen [Mon, 5 Dec 2011 22:10:42 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): rename to xgifb_read_vbios()

Rename the function to xgifb_read_vbios().

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: ReadVBIOSTablData(): copy only a single LVDS entry
Aaro Koskinen [Mon, 5 Dec 2011 22:10:41 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): copy only a single LVDS entry

Only a single LVDS table entry is needed by the driver.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: ReadVBIOSTablData(): check the BIOS size
Aaro Koskinen [Mon, 5 Dec 2011 22:10:40 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): check the BIOS size

Check the BIOS size to avoid out of bounds array access. Disable LVDS
in case errors are detected.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: use u8 for video BIOS data
Aaro Koskinen [Mon, 5 Dec 2011 22:10:39 +0000 (00:10 +0200)]
staging: xgifb: use u8 for video BIOS data

Use u8 for video BIOS data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: delete pjVirtualRomBase
Aaro Koskinen [Mon, 5 Dec 2011 22:10:38 +0000 (00:10 +0200)]
staging: xgifb: delete pjVirtualRomBase

Delete a redundant struct member.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: delete ROMAddr
Aaro Koskinen [Mon, 5 Dec 2011 22:10:37 +0000 (00:10 +0200)]
staging: xgifb: delete ROMAddr

Delete a redundant struct member.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: move video BIOS handling completely to ReadVBIOSTablData()
Aaro Koskinen [Mon, 5 Dec 2011 22:10:36 +0000 (00:10 +0200)]
staging: xgifb: move video BIOS handling completely to ReadVBIOSTablData()

We need the video BIOS only on XG21 and only during the init, so let's
do everything at the same place.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: XGINew_GetXG21Sense(): eliminate video BIOS access
Aaro Koskinen [Mon, 5 Dec 2011 22:10:35 +0000 (00:10 +0200)]
staging: xgifb: XGINew_GetXG21Sense(): eliminate video BIOS access

Remove video BIOS access from the routine, use the flag instead which
is initialized according to the BIOS data.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: ReadVBIOSTablData(): use a pointer to access the array
Aaro Koskinen [Mon, 5 Dec 2011 22:10:34 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): use a pointer to access the array

Use a pointer variable to make some lines shorter and more readable.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: ReadVBIOSTablData(): rename pVideoMemory
Aaro Koskinen [Mon, 5 Dec 2011 22:10:33 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): rename pVideoMemory

Rename pVideoMemory to vbios, and also remove volatile at the same go.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: ReadVBIOSTablData(): use ARRAY_SIZE
Aaro Koskinen [Mon, 5 Dec 2011 22:10:32 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): use ARRAY_SIZE

Use ARRAY_SIZE.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: ReadVBIOSTablData(): rearrange code to avoid nesting
Aaro Koskinen [Mon, 5 Dec 2011 22:10:31 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): rearrange code to avoid nesting

Rearrange code to avoid deep nesting.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging: xgifb: ReadVBIOSTablData(): avoid duplicating code
Aaro Koskinen [Mon, 5 Dec 2011 22:10:30 +0000 (00:10 +0200)]
staging: xgifb: ReadVBIOSTablData(): avoid duplicating code

If the count (j) is 0xff, just do the loop once.

Signed-off-by: Aaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoMerge branch 'work-next' into staging-next
Greg Kroah-Hartman [Thu, 8 Dec 2011 20:22:28 +0000 (12:22 -0800)]
Merge branch 'work-next' into staging-next

12 years agostaging:iio: Fix scan mask update
Lars-Peter Clausen [Thu, 8 Dec 2011 17:35:53 +0000 (18:35 +0100)]
staging:iio: Fix scan mask update

When updating the scan mask we have to check the actual scan mask for if the
channel is already enabled, not the matching scan mask from the available
scan masks. The bit will already be set there and as a result the actual
scan mask will not get updated and the channel stays disabled.

Also fix the return value of iio_scan_el_store which would return 1 instead of
the number of bytes written if the channel was already active in the scan mask.

Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoMerge branch 'work-next' into staging-next
Greg Kroah-Hartman [Thu, 8 Dec 2011 20:16:43 +0000 (12:16 -0800)]
Merge branch 'work-next' into staging-next

12 years agostaging:iio: Fix sw_ring memory corruption
Lars-Peter Clausen [Thu, 8 Dec 2011 17:35:51 +0000 (18:35 +0100)]
staging:iio: Fix sw_ring memory corruption

The sw_ring does not properly handle the case where the write pointer already
has wrapped around, the read pointer has not and the remaining buffer space at
the end is enough to fill the read buffer:

  +-----------------------------------+
  |     |              |##data##|     |
  +-----------------------------------+
     write_p        read_p

In this case the current code will copy all available data to the buffer and
as a result will write beyond the bounds of the buffer and cause a memory
corruption.

To address this issue this patch adds code to calculate the available buffer
space and makes sure that the number of bytes to copy does not exceed this
number. This allows the code which copies the data around to be simplified as
it only has to consider two cases: Read wraps around and read does not wrap
around.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: Fix typo
Lars-Peter Clausen [Thu, 8 Dec 2011 17:20:37 +0000 (18:20 +0100)]
staging:iio: Fix typo

Fix a small typo in the iio_modifer enum.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:buffer.h update struct buffer docs.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:30 +0000 (22:18 +0000)]
staging:iio:buffer.h update struct buffer docs.

These docs have lagged recent developments.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:buffer struct iio_buffer doesn't need an indio_dev pointer.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:29 +0000 (22:18 +0000)]
staging:iio:buffer struct iio_buffer doesn't need an indio_dev pointer.

In all existing cases, the calls are coming from a location where
the indio_dev is already available.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:buffer scrap to_iio_buffer as it no longer has meaning.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:28 +0000 (22:18 +0000)]
staging:iio:buffer scrap to_iio_buffer as it no longer has meaning.

Now buffers do not have a specific dev structure, this is garbage.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:buffer stop allowing for read_last callback.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:27 +0000 (22:18 +0000)]
staging:iio:buffer stop allowing for read_last callback.

No longer needed now we don't allow sysfs acccess to buffer data.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:ring_sw don't provide read last function.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:26 +0000 (22:18 +0000)]
staging:iio:ring_sw don't provide read last function.

No longer needed as we don't have drivers providing sysfs access
to buffered data.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:max1363 stop reading from buffer for sysfs access
Jonathan Cameron [Mon, 5 Dec 2011 22:18:25 +0000 (22:18 +0000)]
staging:iio:adc:max1363 stop reading from buffer for sysfs access

No known use case and makes in kernel interface work more complex.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:ad799x stop reading from buffer for sysfs accesses
Jonathan Cameron [Mon, 5 Dec 2011 22:18:24 +0000 (22:18 +0000)]
staging:iio:adc:ad799x stop reading from buffer for sysfs accesses

No known use case and makes in kernel interface work more complex.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:ad7887 stop reading from buffer for sysfs access.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:23 +0000 (22:18 +0000)]
staging:iio:adc:ad7887 stop reading from buffer for sysfs access.

No known use case and complicates in kernel interface work.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:ad7993 stop reading from buffer for sysfs raw read.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:22 +0000 (22:18 +0000)]
staging:iio:adc:ad7993 stop reading from buffer for sysfs raw read.

No known usecase and makes in kernel interface work more complex.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:ad7606 remove buffer access to data from sysfs read.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:21 +0000 (22:18 +0000)]
staging:iio:adc:ad7606 remove buffer access to data from sysfs read.

No known use case and complicates in kernel interface work.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:ad7606 remove buffer access for sysfs interfaces.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:20 +0000 (22:18 +0000)]
staging:iio:adc:ad7606 remove buffer access for sysfs interfaces.

No known use case and complicates in kernel interface work.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:ad7476 scrap read from buffer for sysfs access.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:19 +0000 (22:18 +0000)]
staging:iio:adc:ad7476 scrap read from buffer for sysfs access.

No known use case and complicates in kernel interface work.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:ad7192 scrap read from buffer for sysfs access.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:18 +0000 (22:18 +0000)]
staging:iio:adc:ad7192 scrap read from buffer for sysfs access.

No known use case and complicates in kernel interface work.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:accel:lis3l02dq scrap reading from buffer for sysfs access.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:17 +0000 (22:18 +0000)]
staging:iio:accel:lis3l02dq scrap reading from buffer for sysfs access.

No obvious usecase and complicates in kernel interface work.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:buffer remove unused owner field from struct iio_buffer
Jonathan Cameron [Mon, 5 Dec 2011 22:18:16 +0000 (22:18 +0000)]
staging:iio:buffer remove unused owner field from struct iio_buffer

Legacy of having multiple chrdevs that never got cleaned up.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: scrap scan_count and ensure all drivers use active_scan_mask
Jonathan Cameron [Mon, 5 Dec 2011 22:18:15 +0000 (22:18 +0000)]
staging:iio: scrap scan_count and ensure all drivers use active_scan_mask

Obviously drivers should only use this for pushing to buffers.
They need buffer->scan_mask for pulling from them post demux.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:buffer move setup ops from buffer instance to iio_dev
Jonathan Cameron [Mon, 5 Dec 2011 22:18:14 +0000 (22:18 +0000)]
staging:iio:buffer move setup ops from buffer instance to iio_dev

These callbacks should not be buffer instance specific.
Hence move them out of the buffer.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: remove userspace access to bytes per datum.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:13 +0000 (22:18 +0000)]
staging:iio: remove userspace access to bytes per datum.

There are no known reasons why userspace should want this value.
It can be established from the buffer description anyway.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:buffer drop bpe field.
Jonathan Cameron [Mon, 5 Dec 2011 22:18:12 +0000 (22:18 +0000)]
staging:iio:buffer drop bpe field.

Has no remaining users.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:max1363 add datasheet_name entries.
Jonathan Cameron [Mon, 5 Dec 2011 21:56:01 +0000 (21:56 +0000)]
staging:iio:adc:max1363 add datasheet_name entries.

Kind of obvious for this device but useful
for testing purposes.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: core: add datasheet_name to chan_spec
Jonathan Cameron [Mon, 5 Dec 2011 21:56:00 +0000 (21:56 +0000)]
staging:iio: core: add datasheet_name to chan_spec

This allows for matching against the name given
on a datasheet, however silly/inconsistent it might
be.

Useful for in kernel interfaces.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:max1363 correctly set channels as big endian.
Jonathan Cameron [Mon, 5 Dec 2011 21:37:16 +0000 (21:37 +0000)]
staging:iio:adc:max1363 correctly set channels as big endian.

Also, the differential channels should always have been signed.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:max1363 use new demuxing support.
Jonathan Cameron [Mon, 5 Dec 2011 21:37:15 +0000 (21:37 +0000)]
staging:iio:adc:max1363 use new demuxing support.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: add demux optionally to path from device to buffer
Jonathan Cameron [Mon, 5 Dec 2011 21:37:14 +0000 (21:37 +0000)]
staging:iio: add demux optionally to path from device to buffer

This gives you only what you ask for which is handy
for some devices with weird scan combinations.

Routes all data flow through a core utility function.
That and this demuxing support will be needed to do
demuxing to multiple destinations in kernel.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: make iio_sw_buffer_preenable much more general.
Jonathan Cameron [Mon, 5 Dec 2011 21:37:13 +0000 (21:37 +0000)]
staging:iio: make iio_sw_buffer_preenable much more general.

Also introduces active_scan_mask storage to tell the core what is
really being currently captured from the device (different from
what is desired as often has bonus channels).

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
Tested-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: add hook to allow core to perform scan related config.
Jonathan Cameron [Mon, 5 Dec 2011 21:37:12 +0000 (21:37 +0000)]
staging:iio: add hook to allow core to perform scan related config.

Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:buffer add a cache of the timestamp scan index.
Jonathan Cameron [Mon, 5 Dec 2011 21:37:11 +0000 (21:37 +0000)]
staging:iio:buffer add a cache of the timestamp scan index.

Basically avoids looking it up lots of times.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:find iio channel from scan index util function
Jonathan Cameron [Mon, 5 Dec 2011 21:37:10 +0000 (21:37 +0000)]
staging:iio:find iio channel from scan index util function

Useful for getting to the channel based on scan mask alone.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio: Remove redundant spi driver bus initialization
Lars-Peter Clausen [Mon, 5 Dec 2011 15:53:05 +0000 (16:53 +0100)]
staging:iio: Remove redundant spi driver bus initialization

In ancient times it was necessary to manually initialize the bus field of an
spi_driver to spi_bus_type. These days this is done in spi_register_driver() so
we can drop the manual assignment.

The patch was generated using the following coccinelle semantic patch:
// <smpl>
@@
identifier _driver;
@@
 struct spi_driver _driver = {
  .driver = {
- .bus = &spi_bus_type,
  },
 };
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:dac: Add AD5380 driver
Lars-Peter Clausen [Tue, 6 Dec 2011 09:07:02 +0000 (10:07 +0100)]
staging:iio:dac: Add AD5380 driver

This patch adds support for the Analog Devices D5380, AD5381,
AD5382, AD5383, AD5384, AD5390, AD5391, AD5392 multi-channel
Digital to Analog Converters.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:dac: Add AD5764 driver
Lars-Peter Clausen [Mon, 5 Dec 2011 16:05:41 +0000 (17:05 +0100)]
staging:iio:dac: Add AD5764 driver

This patch adds support for the Analog Devices AD5764, AD5764R, AD5744, AD5744R
quad channel analog-to-digital converter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:adc:max1363 actually make timestamp controllable
Jonathan Cameron [Sun, 4 Dec 2011 20:44:36 +0000 (20:44 +0000)]
staging:iio:adc:max1363 actually make timestamp controllable

Previously timestamps were always on in this driver.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:generic_buffer example - handle endian differences
Jonathan Cameron [Sun, 4 Dec 2011 19:10:59 +0000 (19:10 +0000)]
staging:iio:generic_buffer example - handle endian differences

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agostaging:iio:Documentation: cleanup properly in buffer handling code
Jonathan Cameron [Sun, 4 Dec 2011 19:10:58 +0000 (19:10 +0000)]
staging:iio:Documentation: cleanup properly in buffer handling code

Eating the endian description for now.

Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoiio: light sensor: Improve granularity of tsl2583 lux values.
Bryan Freed [Fri, 2 Dec 2011 22:19:30 +0000 (14:19 -0800)]
iio: light sensor: Improve granularity of tsl2583 lux values.

When illuminance0_calibbias gets 4000 (for a 4x multiplier), we see lux
granularity of 4.  Reversing the order of the right shift and multiplication
retains the precision of the unadjusted lux value.

Signed-off-by: Bryan Freed <bfreed@chromium.org>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: iio/accel: Added a range check for val in store_measurement_mode()
Andreas Ruprecht [Fri, 2 Dec 2011 16:30:23 +0000 (17:30 +0100)]
Staging: iio/accel: Added a range check for val in store_measurement_mode()

In sca3000_store_measurement_mode() we use val to and it with a mask.
This mask is only two bits long (as we are only interested in the
lowest two bits), so a value bigger than 3 was silently ignored so
far.

Now this function will return -EINVAL, if val is bigger than 3.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoStaging: iio/accel: Changed data type of mask in store_measurement_mode() to u8
Andreas Ruprecht [Fri, 2 Dec 2011 16:56:55 +0000 (17:56 +0100)]
Staging: iio/accel: Changed data type of mask in store_measurement_mode() to u8

In sca3000_store_measurement_mode() we parse a value from a string
buffer via kstrtou8, and store the parsed value into a u8 after
and-ing it with mask.

As we are only interested in the lowest two bits here and mask is
initialized with a fixed value 0x03, mask may as well be a u8.

Signed-off-by: Andreas Ruprecht <rupran@einserver.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
12 years agoMerge branch 'fixes' of git://github.com/hzhuang1/linux into fixes
Arnd Bergmann [Thu, 8 Dec 2011 15:52:23 +0000 (15:52 +0000)]
Merge branch 'fixes' of git://github.com/hzhuang1/linux into fixes

12 years agoBtrfs: drop spin lock when memory alloc fails
Liu Bo [Thu, 8 Dec 2011 01:08:40 +0000 (20:08 -0500)]
Btrfs: drop spin lock when memory alloc fails

Drop spin lock in convert_extent_bit() when memory alloc fails,
otherwise, it will be a deadlock.

Signed-off-by: Liu Bo <liubo2009@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: check if the to-be-added device is writable
Li Zefan [Thu, 8 Dec 2011 01:08:40 +0000 (20:08 -0500)]
Btrfs: check if the to-be-added device is writable

If we call ioctl(BTRFS_IOC_ADD_DEV) directly, we'll succeed in adding
a readonly device to a btrfs filesystem, and btrfs will write to
that device, emitting kernel errors:

[ 3109.833692] lost page write due to I/O error on loop2
[ 3109.833720] lost page write due to I/O error on loop2
...

Signed-off-by: Li Zefan <lizf@cn.fujitsu.com>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoBtrfs: try cluster but don't advance in search list
Alexandre Oliva [Thu, 8 Dec 2011 01:08:40 +0000 (20:08 -0500)]
Btrfs: try cluster but don't advance in search list

When we find an existing cluster, we switch to its block group as the
current block group, possibly skipping multiple blocks in the process.
Furthermore, under heavy contention, multiple threads may fail to
allocate from a cluster and then release just-created clusters just to
proceed to create new ones in a different block group.

This patch tries to allocate from an existing cluster regardless of its
block group, and doesn't switch to that group, instead proceeding to
try to allocate a cluster from the group it was iterating before the
attempt.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoARM: sa1100: fix build error
Jett.Zhou [Wed, 30 Nov 2011 06:32:54 +0000 (14:32 +0800)]
ARM: sa1100: fix build error

arm-eabi-4.4.3-ld:--defsym zreladdr=: syntax error
make[2]: *** [arch/arm/boot/compressed/vmlinux] Error 1
make[1]: *** [arch/arm/boot/compressed/vmlinux] Error 2
make: *** [uImage] Error 2

Signed-off-by: Haojian Zhuang <haojian.zhuang@gmail.com>
Signed-off-by: Jett.Zhou <jtzhou@marvell.com>
12 years agomd/raid5: never wait for bad-block acks on failed device.
NeilBrown [Thu, 8 Dec 2011 05:27:57 +0000 (16:27 +1100)]
md/raid5: never wait for bad-block acks on failed device.

Once a device is failed we really want to completely ignore it.
It should go away soon anyway.

In particular the presence of bad blocks on it should not cause us to
block as we won't be trying to write there anyway.

So as soon as we can check if a device is Faulty, do so and pretend
that it is already gone if it is Faulty.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd: ensure new badblocks are handled promptly.
NeilBrown [Thu, 8 Dec 2011 05:26:08 +0000 (16:26 +1100)]
md: ensure new badblocks are handled promptly.

When we mark blocks as bad we need them to be acknowledged by the
metadata handler promptly.

For an in-kernel metadata handler that was already being done.  But
for an external metadata handler we need to alert it of the change by
sending a notification through the sysfs file.  This adds that
notification.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd: bad blocks shouldn't cause a Blocked status on a Faulty device.
NeilBrown [Thu, 8 Dec 2011 05:22:48 +0000 (16:22 +1100)]
md: bad blocks shouldn't cause a Blocked status on a Faulty device.

Once a device is marked Faulty the badblocks - whether acknowledged or
not - become irrelevant.  So they shouldn't cause the device to be
marked as Blocked.

Without this patch, a process might write "-blocked" to clear the
Blocked status, but while that will correctly fail the device, it
won't remove the apparent 'blocked' status.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd: take a reference to mddev during sysfs access.
NeilBrown [Thu, 8 Dec 2011 04:49:46 +0000 (15:49 +1100)]
md: take a reference to mddev during sysfs access.

When we are accessing an mddev via sysfs we know that the
mddev cannot disappear because it has an embedded kobj which
is refcounted by sysfs.
And we also take the mddev_lock.
However this is not enough.

The final mddev_put could have been called and the
mddev_delayed_delete is waiting for sysfs to let go so it can destroy
the kobj and mddev.
In this state there are a lot of changes that should not be attempted.

To to guard against this we:
 - initialise mddev->all_mddevs in on last put so the state can be
   easily detected.
 - in md_attr_show and md_attr_store, check ->all_mddevs under
   all_mddevs_lock and mddev_get the mddev if it still appears to
   be active.

This means that if we get to sysfs as the mddev is being deleted we
will get -EBUSY.

rdev_attr_store and rdev_attr_show are similar but already have
sufficient protection.  They check that rdev->mddev still points to
mddev after taking mddev_lock.  As this is cleared  before delayed
removal which can only be requested under the mddev_lock, this
ensure the rdev and mddev are still alive.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agomd: refine interpretation of "hold_active == UNTIL_IOCTL".
NeilBrown [Thu, 8 Dec 2011 04:49:12 +0000 (15:49 +1100)]
md: refine interpretation of "hold_active == UNTIL_IOCTL".

We like md devices to disappear when they really are not needed.
However it is not possible to tell from the current state whether it
is needed or not.  We can only tell from recent history of changes.

In particular immediately after we create an md device it looks very
similar to immediately after we have finished with it.

So we always preserve a newly created md device until something
significant happens.  This state is stored in 'hold_active'.

The normal case is to keep it until an ioctl happens, as that will
normally either activate it, or explicitly de-activate it.  If it
doesn't then it was probably created by mistake and it is now time to
get rid of it.

We can also modify an array via sysfs (instead of via ioctl) and we
currently treat any change via sysfs like an ioctl as a sign that if
it now isn't more active, it should be destroyed.
However this is not appropriate as changes made via sysfs are more
gradual so we should look for a more definitive change.

So this patch only clears 'hold_active' from UNTIL_IOCTL to clear when
the array_state is changed via sysfs.  Other changes via sysfs
are ignored.

Signed-off-by: NeilBrown <neilb@suse.de>
12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux...
Olof Johansson [Thu, 8 Dec 2011 04:36:27 +0000 (20:36 -0800)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

12 years agoMerge branch '3.2-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab...
Linus Torvalds [Thu, 8 Dec 2011 02:18:27 +0000 (18:18 -0800)]
Merge branch '3.2-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending

* '3.2-rc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending: (25 commits)
  iscsi-target: Fix hex2bin warn_unused compile message
  target: Don't return an error if disabling unsupported features
  target/rd: fix or rewrite the copy routine
  target/rd: simplify the page/offset computation
  target: remove the unused se_dev_list
  target/file: walk properly over sg list
  target: remove unused struct fields
  target: Fix page length in emulated INQUIRY VPD page 86h
  target: Handle 0 correctly in transport_get_sectors_6()
  target: Don't return an error status for 0-length READ and WRITE
  iscsi-target: Use kmemdup rather than duplicating its implementation
  iscsi-target: Add missing F_BIT for iscsi_tm_rsp
  iscsi-target: Fix residual count hanlding + remove iscsi_cmd->residual_count
  target: Reject SCSI data overflow for fabrics using transport_generic_map_mem_to_cmd
  target: remove the unused t_task_pt_sgl and t_task_pt_sgl_num se_cmd fields
  target: remove the t_tasks_bidi se_cmd field
  target: remove the t_tasks_fua se_cmd field
  target: remove the se_ordered_node se_cmd field
  target: remove the se_obj_ptr and se_orig_obj_ptr se_cmd fields
  target: Drop config_item_name usage in fabric TFO->free_wwn()
  ...

12 years agoBtrfs: try to allocate from cluster even at LOOP_NO_EMPTY_SIZE
Alexandre Oliva [Thu, 8 Dec 2011 00:50:42 +0000 (19:50 -0500)]
Btrfs: try to allocate from cluster even at LOOP_NO_EMPTY_SIZE

If we reach LOOP_NO_EMPTY_SIZE, we won't even try to use a cluster that
others might have set up.  Odds are that there won't be one, but if
someone else succeeded in setting it up, we might as well use it, even
if we don't try to set up a cluster again.

Signed-off-by: Alexandre Oliva <oliva@lsd.ic.unicamp.br>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Thu, 8 Dec 2011 00:13:54 +0000 (16:13 -0800)]
Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs

* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: fix the logspace waiting algorithm
  xfs: fix nfs export of 64-bit inodes numbers on 32-bit kernels
  xfs: fix allocation length overflow in xfs_bmapi_write()

12 years agoMerge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm
Linus Torvalds [Thu, 8 Dec 2011 00:12:29 +0000 (16:12 -0800)]
Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  PM / Driver core: leave runtime PM enabled during system shutdown

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux...
Linus Torvalds [Thu, 8 Dec 2011 00:12:14 +0000 (16:12 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
  m68k: Wire up process_vm_{read,write}v

12 years agoMerge branch 'perf/urgent' of git://github.com/acmel/linux into perf/urgent
Ingo Molnar [Wed, 7 Dec 2011 22:23:44 +0000 (23:23 +0100)]
Merge branch 'perf/urgent' of git://github.com/acmel/linux into perf/urgent

12 years agoPM / Driver core: leave runtime PM enabled during system shutdown
Alan Stern [Tue, 6 Dec 2011 22:24:52 +0000 (23:24 +0100)]
PM / Driver core: leave runtime PM enabled during system shutdown

Disabling all runtime PM during system shutdown turns out not to be a
good idea, because some devices may need to be woken up from a
low-power state at that time.

The whole point of disabling runtime PM for system shutdown was to
prevent untimely runtime-suspend method calls.  This patch (as1504)
accomplishes the same result by incrementing the usage count for each
device and waiting for ongoing runtime-PM callbacks to finish.  This
is what we already do during system suspend and hibernation, which
makes sense since the shutdown method is pretty much a legacy analog
of the pm->poweroff method.

This fixes a recent regression on some OMAP systems introduced by
commit af8db1508f2c9f3b6e633e2d2d906c6557c617f9 (PM / driver core:
disable device's runtime PM during shutdown).

Reported-and-tested-by: NeilBrown <neilb@suse.de>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agospi/gpio: fix section mismatch warning
Manuel Lauss [Sat, 19 Nov 2011 12:08:10 +0000 (13:08 +0100)]
spi/gpio: fix section mismatch warning

Fixes:
The function __devinit spi_gpio_probe() references
a function __init spi_gpio_alloc.isra.4().
If spi_gpio_alloc.isra.4 is only used by spi_gpio_probe then
annotate spi_gpio_alloc.isra.4 with a matching annotation.

[wsa: fix spi_gpio_request(), too]

Signed-off-by: Manuel Lauss <manuel.lauss@googlemail.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
12 years agospi/fsl-espi: disable CONFIG_SPI_FSL_ESPI=m build
Jiri Slaby [Wed, 7 Dec 2011 20:18:16 +0000 (21:18 +0100)]
spi/fsl-espi: disable CONFIG_SPI_FSL_ESPI=m build

When spi_fsl_espi is chosen to be built as a module, there is a build
error because we test only CONFIG_SPI_FSL_ESPI in declaration of
struct mpc8xxx_spi in drivers/spi/spi_fsl_lib.h. Also some called
functions are not exported.

So we forbid CONFIG_SPI_FSL_ESPI to be tristate here.

The error looks like:
drivers/spi/spi_fsl_espi.c: In function 'fsl_espi_bufs':
drivers/spi/spi_fsl_espi.c:232: error: 'struct mpc8xxx_spi' has no member named 'len'
...

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Kumar Gala <galak@kernel.crashing.org>
Cc: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
12 years agospi/nuc900: Include linux/module.h
Axel Lin [Thu, 24 Nov 2011 03:10:51 +0000 (11:10 +0800)]
spi/nuc900: Include linux/module.h

Include linux/module.h to fix below build error:

  CC      drivers/spi/spi-nuc900.o
drivers/spi/spi-nuc900.c:484: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/spi/spi-nuc900.c:489: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-nuc900.c:489: warning: data definition has no type or storage class
drivers/spi/spi-nuc900.c:489: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/spi/spi-nuc900.c:489: warning: function declaration isn't a prototype
drivers/spi/spi-nuc900.c:490: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-nuc900.c:490: warning: data definition has no type or storage class
drivers/spi/spi-nuc900.c:490: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/spi/spi-nuc900.c:490: warning: function declaration isn't a prototype
drivers/spi/spi-nuc900.c:491: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-nuc900.c:491: warning: data definition has no type or storage class
drivers/spi/spi-nuc900.c:491: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/spi/spi-nuc900.c:491: warning: function declaration isn't a prototype
drivers/spi/spi-nuc900.c:492: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-nuc900.c:492: warning: data definition has no type or storage class
drivers/spi/spi-nuc900.c:492: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS'
drivers/spi/spi-nuc900.c:492: warning: function declaration isn't a prototype
make[2]: *** [drivers/spi/spi-nuc900.o] Error 1
make[1]: *** [drivers/spi] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
12 years agospi/ath79: fix compile error due to missing include
Gabor Juhos [Wed, 16 Nov 2011 19:01:43 +0000 (20:01 +0100)]
spi/ath79: fix compile error due to missing include

Whithout including 'linux/module.h' spi-ath79 driver fails to compile
with the these errors:

drivers/spi/spi-ath79.c:273:12: error: 'THIS_MODULE' undeclared here (not in a function)
drivers/spi/spi-ath79.c:278:20: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-ath79.c:278:1: warning: data definition has no type or storage class
drivers/spi/spi-ath79.c:278:1: warning: type defaults to 'int' in declaration of 'MODULE_DESCRIPTION'
drivers/spi/spi-ath79.c:278:20: warning: function declaration isn't a prototype
drivers/spi/spi-ath79.c:279:15: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-ath79.c:279:1: warning: data definition has no type or storage class
drivers/spi/spi-ath79.c:279:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/spi/spi-ath79.c:279:15: warning: function declaration isn't a prototype
drivers/spi/spi-ath79.c:280:16: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-ath79.c:280:1: warning: data definition has no type or storage class
drivers/spi/spi-ath79.c:280:1: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
drivers/spi/spi-ath79.c:280:16: warning: function declaration isn't a prototype
drivers/spi/spi-ath79.c:281:14: error: expected declaration specifiers or '...' before string constant
drivers/spi/spi-ath79.c:281:1: warning: data definition has no type or storage class
drivers/spi/spi-ath79.c:281:1: warning: type defaults to 'int' in declaration of 'MODULE_ALIAS'
drivers/spi/spi-ath79.c:281:14: warning: function declaration isn't a prototype

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: Wolfram Sang <w.sang@pengutronix.de>
12 years agoof/irq: Get rid of NO_IRQ usage
Anton Vorontsov [Tue, 6 Dec 2011 23:16:26 +0000 (03:16 +0400)]
of/irq: Get rid of NO_IRQ usage

PPC32/64 defines NO_IRQ to zero, so no problems expected.
ARM defines NO_IRQ to -1, but OF code relies on IRQ domains support,
which returns correct ('0') value in 'no irq' case. So everything
should be fine.

Other arches might break if some of their OF drivers rely on NO_IRQ
being not 0. If so, the drivers must be fixed, finally.

[ Rob Herring points out that microblaze should be fixed, and has posted
  a patch for testing for that.   - Linus ]

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoALSA: hda/realtek - Fix lost speaker volume controls
Takashi Iwai [Wed, 7 Dec 2011 16:20:30 +0000 (17:20 +0100)]
ALSA: hda/realtek - Fix lost speaker volume controls

When there are the same or more number of HP pins are available, HP pins
are used as the primary outputs instead of the speaker pins.  But, in
some cases (especially with ALC663 & co), some DACs are available only
with a later pin and it's assigned to a speaker, and since the driver
parses the pins from the lower NID, such a DAC was skipped eventually
without assignments.  This resulted in a regression, the missing speaker
volume control in the new parser.

As a workaround for this, now the driver retries the pin->DAC mapping
again after restoring the speaker-pins as primary.  This is still an ad
hoc fix, but it works so far for most of Realtek codecs.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda/realtek - Create "Bass Speaker" for two speaker pins
Takashi Iwai [Wed, 7 Dec 2011 16:14:20 +0000 (17:14 +0100)]
ALSA: hda/realtek - Create "Bass Speaker" for two speaker pins

On systems with two speaker pins, the secondary speaker pin is mostly
assigned to a bass speaker instead of a surround.  Thus it makes more
sense to rename the control properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: hda/realtek - Don't create extra controls with channel suffix
Takashi Iwai [Wed, 7 Dec 2011 15:55:19 +0000 (16:55 +0100)]
ALSA: hda/realtek - Don't create extra controls with channel suffix

The multiple headphone or speaker pins are usually provided to
output the same stream unlike line-out jacks (which are supposed
to be multi-channel surrounds).  Thus giving a mixer name like
"Headphone Surround" is rather confusing.  Instead, when multiple
headphone volumes are available, use index with the same "Headphone"
name.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Wed, 7 Dec 2011 16:20:01 +0000 (08:20 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  vmwgfx: Use kcalloc instead of kzalloc to allocate array
  drm/i915: fix infinite recursion on unbind due to ilk vt-d w/a
  drm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_id

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Linus Torvalds [Wed, 7 Dec 2011 16:14:42 +0000 (08:14 -0800)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fix apparmor dereferencing potentially freed dentry, sanitize __d_path() API

12 years agoperf: Do no try to schedule task events if there are none
Gleb Natapov [Tue, 22 Nov 2011 14:08:21 +0000 (16:08 +0200)]
perf: Do no try to schedule task events if there are none

perf_event_sched_in() shouldn't try to schedule task events if there
are none otherwise task's ctx->is_active will be set and will not be
cleared during sched_out. This will prevent newly added events from
being scheduled into the task context.

Fixes a boo-boo in commit 1d5f003f5a9 ("perf: Do not set task_ctx
pointer in cpuctx if there are no events in the context").

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/20111122140821.GF2557@redhat.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
12 years agovmwgfx: Use kcalloc instead of kzalloc to allocate array
Thomas Meyer [Tue, 29 Nov 2011 21:08:00 +0000 (22:08 +0100)]
vmwgfx: Use kcalloc instead of kzalloc to allocate array

The advantage of kcalloc is, that will prevent integer overflows which could
result from the multiplication of number of elements and size and it is also
a bit nicer to read.

The semantic patch that makes this change is available
in https://lkml.org/lkml/2011/11/25/107

Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/i915: fix infinite recursion on unbind due to ilk vt-d w/a
Daniel Vetter [Tue, 6 Dec 2011 11:12:33 +0000 (12:12 +0100)]
drm/i915: fix infinite recursion on unbind due to ilk vt-d w/a

The recursion loop goes retire_requests->unbind->gpu_idle->retire_reqeusts.

Every time we go through this we need a
- active object that can be retired
- and there are no other references to that object than the one from
  the active list, so that it gets unbound and freed immediately.
Otherwise the recursion stops. So the recursion is only limited by the
number of objects that fit these requirements sitting in the active list
any time retire_request is called.

Issue exercised by tests/gem_unref_active_buffers from i-g-t.

There's been a decent bikeshed discussion whether it wouldn't be
better to pass around a flag, but imo this is o.k. for such a limited
case that only supports a w/a.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=42180

Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Chris Wilson <chris@chris-wilson>
[ickle- we built better bikesheds, but this keeps the rain off for now]
Tested-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agodrm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_id
Alex Deucher [Fri, 2 Dec 2011 23:15:27 +0000 (18:15 -0500)]
drm/radeon/kms: fix return type for radeon_encoder_get_dp_bridge_encoder_id

Seems like something got mis-merged here.

Noticed by kallisti5 on IRC.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>