platform/adaptation/renesas_rcar/renesas_kernel.git
12 years agostaging: reduce stack usage in prism2fw.c
Randy Dunlap [Mon, 25 Jun 2012 04:35:29 +0000 (21:35 -0700)]
staging: reduce stack usage in prism2fw.c

Fix frame size (stack usage) warning by allocating and freeing
pointers to the data.

drivers/staging/wlan-ng/prism2fw.c:1115:1: warning: the frame size of 4288 bytes is larger than 2048 bytes

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge 3.5-rc4 into staging-next
Greg Kroah-Hartman [Mon, 25 Jun 2012 16:31:00 +0000 (09:31 -0700)]
Merge 3.5-rc4 into staging-next

This picks up the staging changes made in 3.5-rc4 so that everyone can sync up
properly.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoLinux 3.5-rc4
Linus Torvalds [Sun, 24 Jun 2012 19:53:04 +0000 (12:53 -0700)]
Linux 3.5-rc4

12 years agoFix typo in printed messages
Anatol Pomozov [Sat, 23 Jun 2012 22:54:34 +0000 (15:54 -0700)]
Fix typo in printed messages

Coult -> Could

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMerge git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Sun, 24 Jun 2012 18:02:09 +0000 (11:02 -0700)]
Merge git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fixes from Avi Kivity:
 "Fixing a scheduling-while-atomic bug in the ppc code, and a bug which
  allowed pci bridges to be assigned to guests."

* git://git.kernel.org/pub/scm/virt/kvm/kvm:
  KVM: PPC: Book3S HV: Drop locks around call to kvmppc_pin_guest_page
  KVM: Fix PCI header check on device assignment

12 years agoMerge tag 'rdma-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
Linus Torvalds [Sun, 24 Jun 2012 18:00:07 +0000 (11:00 -0700)]
Merge tag 'rdma-fixes' of git://git./linux/kernel/git/roland/infiniband

Pull InfiniBand/RDMA fixes from Roland Dreier:
 - Fixes to new ocrdma driver
 - Typo in test in CMA

* tag 'rdma-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
  RDMA/cma: QP type check on received REQs should be AND not OR
  RDMA/ocrdma: Fix off by one in ocrdma_query_gid()
  RDMA/ocrdma: Fixed RQ error CQE polling
  RDMA/ocrdma: Correct queue SGE calculation
  RDMA/ocrdma: Correct reported max queue sizes
  RDMA/ocrdma: Fixed GID table for vlan and events

12 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sun, 24 Jun 2012 17:57:59 +0000 (10:57 -0700)]
Merge tag 'fixes-for-linus' of git://git./linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Olof Johansson:
 "Nothing very controversial in here.  Most of the fixes are for OMAP
  this time around, with some orion/kirkwood and a tegra patch mixed in."

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  ARM: Orion: Fix Virtual/Physical mixup with watchdog
  ARM: Kirkwood: clk_register_gate_fn: add fn assignment
  ARM: Orion5x - Restore parts of io.h, with rework
  ARM: OMAP4: hwmod data: Force HDMI in no-idle while enabled
  ARM: OMAP2+: mux: fix sparse warning
  ARM: OMAP2+: CM: increase the module disable timeout
  ARM: OMAP4: clock data: add clockdomains for clocks used as main clocks
  ARM: OMAP4: hwmod data: fix 32k sync timer idle modes
  ARM: OMAP4+: hwmod: fix issue causing IPs not going back to Smart-Standby
  ARM: OMAP: Fix Beagleboard DVI reset gpio
  arm/dts: OMAP2: Fix interrupt controller binding
  ARM: OMAP2: Fix tusb6010 GPIO interrupt for n8x0
  ARM: OMAP2+: Fix MUSB ifdefs for platform init code
  ARM: tegra: make tegra_cpu_reset_handler_enable() __init
  ARM: OMAP: PM: Lock clocks list while generating summary
  ARM: iconnect: Remove include of removed linux/spi/orion_spi.h

12 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sun, 24 Jun 2012 17:57:15 +0000 (10:57 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Nothing major in here, one radeon SI fix for tiling, and one uninit
  var fix, two minor header file fixes."

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm: drop comment about this header being autogenerated.
  drm/edid: don't return stack garbage from supports_rb
  vga_switcheroo: Add include guard
  drm/radeon: SI tiling fixes for display

12 years agoMerge branches 'cma' and 'ocrdma' into for-linus
Roland Dreier [Sun, 24 Jun 2012 11:59:59 +0000 (04:59 -0700)]
Merge branches 'cma' and 'ocrdma' into for-linus

12 years agoARM: Orion: Fix Virtual/Physical mixup with watchdog
Andrew Lunn [Fri, 22 Jun 2012 06:54:02 +0000 (08:54 +0200)]
ARM: Orion: Fix Virtual/Physical mixup with watchdog

The orion watchdog is expecting to be passed the physcial address of
the hardware, and will ioremap() it to give a virtual address it will
use as the base address for the hardware. However, when creating the
platform resource record, a virtual address was being used.

Add the necassary #define's so we can pass the physical address as
expected.

Tested on Kirkwood and Orion5x.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Olof Johansson <olof@lixom.net>
12 years agoARM: Kirkwood: clk_register_gate_fn: add fn assignment
Marc Kleine-Budde [Fri, 22 Jun 2012 06:54:01 +0000 (08:54 +0200)]
ARM: Kirkwood: clk_register_gate_fn: add fn assignment

In commit:
    98d9986 ARM: Kirkwood: Replace clock gating
the kirkwood clock gating has been reworked. A custom variant of
clock gating, that calls a custom function before gating the clock
off, has been introduced. However in clk_register_gate_fn() this
custom function "fn" is never assigned.

This patch adds the missing fn assignment.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Marc Kleine-Budde <mkl@blackshift.org>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Olof Johansson <olof@lixom.net>
12 years agoARM: Orion5x - Restore parts of io.h, with rework
Andrew Lunn [Fri, 22 Jun 2012 18:57:57 +0000 (20:57 +0200)]
ARM: Orion5x - Restore parts of io.h, with rework

Commit 4d5fc58dbe34b78157c05b319669bb3e064ba8bd (ARM: remove bunch of
now unused mach/io.h files) removed the orion5x io.h. Unfortunately,
this is still needed for the definition of IO_SPACE_LIMIT which
overrides the default 64K. All Orion based systems have 1Mbyte of IO
space per PCI[e] bus, and try to request_resource() this size. Orion5x
has two such PCI buses.

It is likely that the original, removed version, was broken. This
version might be less broken. However, it has not been tested on
hardware with a PCI card, let alone hardware with a PCI card with IO
capabilities.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
12 years agoMerge tag 'omap-fixes-a-for-3.5rc' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Sat, 23 Jun 2012 23:16:29 +0000 (16:16 -0700)]
Merge tag 'omap-fixes-a-for-3.5rc' of git://git./linux/kernel/git/pjw/omap-pending into fixes

From Paul Walmsley (as per Tony Lindgren's request):
 "Some uncontroversial OMAP clock, hwmod, and compiler warning fixes for 3.5-rc"

* tag 'omap-fixes-a-for-3.5rc' of git://git.kernel.org/pub/scm/linux/kernel/git/pjw/omap-pending:
  ARM: OMAP4: hwmod data: Force HDMI in no-idle while enabled
  ARM: OMAP2+: mux: fix sparse warning
  ARM: OMAP2+: CM: increase the module disable timeout
  ARM: OMAP4: clock data: add clockdomains for clocks used as main clocks
  ARM: OMAP4: hwmod data: fix 32k sync timer idle modes
  ARM: OMAP4+: hwmod: fix issue causing IPs not going back to Smart-Standby
  ARM: OMAP: PM: Lock clocks list while generating summary

12 years agoMerge tag 'omap-fixes-for-v3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Sat, 23 Jun 2012 23:11:50 +0000 (16:11 -0700)]
Merge tag 'omap-fixes-for-v3.5-rc3' of git://git./linux/kernel/git/tmlind/linux-omap into fixes

From Tony Lindgren:
"Here are a few fixes with the biggest one being fix for Beagle DVI
 reset. All of them are regression fixes, except for the missing omap2
 interrupt controller binding that somehow got missed earlier."

* tag 'omap-fixes-for-v3.5-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP: Fix Beagleboard DVI reset gpio
  arm/dts: OMAP2: Fix interrupt controller binding
  ARM: OMAP2: Fix tusb6010 GPIO interrupt for n8x0
  ARM: OMAP2+: Fix MUSB ifdefs for platform init code

12 years agostaging: r8712u: Remove useless driver version info
Larry Finger [Fri, 22 Jun 2012 16:26:04 +0000 (11:26 -0500)]
staging: r8712u: Remove useless driver version info

This driver contains version information that is outdated, has no real
value in terms of the Linux update process, and tends to confuse users.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: fix typo, improve timestamp alignment comment
Peter Meerwald [Fri, 22 Jun 2012 07:47:43 +0000 (09:47 +0200)]
staging: iio: fix typo, improve timestamp alignment comment

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: simplify timestamp alignment in iio_simple_dummy
Peter Meerwald [Fri, 22 Jun 2012 07:47:42 +0000 (09:47 +0200)]
staging: iio: simplify timestamp alignment in iio_simple_dummy

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: iio: fix trigger handler of iio_simple_dummy driver
Peter Meerwald [Fri, 22 Jun 2012 07:47:41 +0000 (09:47 +0200)]
staging: iio: fix trigger handler of iio_simple_dummy driver

accessing first and last channel fails:
fakedata[0] is never accessed, out-of-bound access for last channel

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio:trigger: Use to_iio_trigger() instead of dev_get_drvdata()
Lars-Peter Clausen [Thu, 21 Jun 2012 17:11:00 +0000 (19:11 +0200)]
iio:trigger: Use to_iio_trigger() instead of dev_get_drvdata()

Use to_iio_trigger(dev) instead of dev_get_drvdata(dev). Both will return the
trigger which belongs to the device, but the the first on is a bit more
lightweight.

Since this is the last location where we used dev_get_drvdata() for retrieving
the trigger there is no need anymore to assign the the trigger to the devices
drvdata, so we can remove that as well.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging:iio:trigger: Use to_iio_trigger() instead of dev_get_drvdata()
Lars-Peter Clausen [Thu, 21 Jun 2012 17:10:59 +0000 (19:10 +0200)]
staging:iio:trigger: Use to_iio_trigger() instead of dev_get_drvdata()

Use to_iio_trigger(dev) instead of dev_get_drvdata(dev). Both will return the
trigger which belongs to the device, but the the first on is a bit more
lightweight. Also this will eventually free up the drvdata pointer of the device
for driver specific data.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: vt6656: Correct a few assignments to be compares in iwctl_siwencodeext()
Jesper Juhl [Fri, 22 Jun 2012 00:28:12 +0000 (02:28 +0200)]
staging: vt6656: Correct a few assignments to be compares in iwctl_siwencodeext()

The result of "foo = bar" is true, so in statements such as
  ...
  if((pDevice->bwextstep0 = TRUE)&&(param->u.wpa_key.key_index ==1))
  ...
an assignment  is most likely not what was intended - a comparison was. As in:
  ...
  if ((pDevice->bwextstep0 == TRUE) && (param->u.wpa_key.key_index == 1))
  ...

There are a 3 such mistakes in the iwctl_siwencodeext() function.
This patch fixes them all.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: rts5139: Remove duplicate include of rts51x.h
Jesper Juhl [Thu, 21 Jun 2012 23:00:41 +0000 (01:00 +0200)]
staging: rts5139: Remove duplicate include of rts51x.h

The header "rts51x.h" is included unconditionally at the start of the
file and then again once more under "#ifdef SUPPORT_FILE_OP".  Once is
enough, so remove the conditional include and just keep the
unconditional one.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: rts5139: rts51x_chip: fixed brace coding style issue
Erik Jones [Thu, 21 Jun 2012 03:17:03 +0000 (23:17 -0400)]
staging: rts5139: rts51x_chip: fixed brace coding style issue

Fixed a coding style issue.

Signed-off-by: Erik Jones <erik@ejnode.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: refactor the pcmcia attach/detach
H Hartley Sweeten [Fri, 22 Jun 2012 23:40:40 +0000 (16:40 -0700)]
staging: comedi: ni_daq_700: refactor the pcmcia attach/detach

Move the pcmcia_disable_device() call where needed in the
pcmcia attach/detach and delete the dio700_release() function.

Move the logic of dio700_config() directly into the attach
function and properly return an error code when the config
fails.

Only set the pcmcia_cur_dev, used by the comedi_driver, if
the pcmcia attach is successful. Also, make sure to NULL it
in the detach.

Remove all the kernel messages in the pcmcia support code. They
are just added noise.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove the pcmcia suspend/resume
H Hartley Sweeten [Fri, 22 Jun 2012 23:39:42 +0000 (16:39 -0700)]
staging: comedi: ni_daq_700: remove the pcmcia suspend/resume

The pcmcia suspend/resume callbacks don't do anything. Remove
them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove unneeded pcmcia private data
H Hartley Sweeten [Fri, 22 Jun 2012 23:38:45 +0000 (16:38 -0700)]
staging: comedi: ni_daq_700: remove unneeded pcmcia private data

The pcmcia device-specific data is not longer needed by this
driver. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove unused pcmcia 'stop' logic
H Hartley Sweeten [Fri, 22 Jun 2012 23:37:56 +0000 (16:37 -0700)]
staging: comedi: ni_daq_700: remove unused pcmcia 'stop' logic

The pcmcia support code in this driver appears to be cut-and-
paste from some other driver. It has code in it to stop the
device during suspend but nothing in the main comedi_driver
uses it.

Remove the 'stop' variable from the pcmcia private data and
all the logic that deals with it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: cleanup pcmcia debug output messages
H Hartley Sweeten [Fri, 22 Jun 2012 23:36:58 +0000 (16:36 -0700)]
staging: comedi: ni_daq_700: cleanup pcmcia debug output messages

These messages should probably just be removed. For now just clean
then up.

Remove a couple redundant KERN_INFO messages in the pcmcia support
code and leave the dev_dbg() ones.

Change the dev_dgb() messages to use __func__ instead of the open
coded string.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: fix return for insn_config function
H Hartley Sweeten [Fri, 22 Jun 2012 23:35:57 +0000 (16:35 -0700)]
staging: comedi: ni_daq_700: fix return for insn_config function

The comedi insn_config functions should return < 0 for errors or
the number of data elements used to perform the command, this value
is available as 'insn->n'. Return that instead of the open coded
number to better indicate what the return means.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: use a local var to fix a > 80 char line issue
H Hartley Sweeten [Fri, 22 Jun 2012 23:34:57 +0000 (16:34 -0700)]
staging: comedi: ni_daq_700: use a local var to fix a > 80 char line issue

The 'data[1] = ...' line is currently kept < 80 chars by breaking a pointer
access after the '->'. This makes the code a bit confusing to follow. Use
a local variable to shorten the line and make it clearer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove some dangling ';'
H Hartley Sweeten [Fri, 22 Jun 2012 23:33:52 +0000 (16:33 -0700)]
staging: comedi: ni_daq_700: remove some dangling ';'

Functions don't need the ';' at the end.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove local variable in the 'attach' function
H Hartley Sweeten [Fri, 22 Jun 2012 23:33:10 +0000 (16:33 -0700)]
staging: comedi: ni_daq_700: remove local variable in the 'attach' function

There is no need for the local variable 'iobase' in the attach
function. If it's '0' the attach fails otherwise the value is
just stored in dev->iobase.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: change the 'attach' printk's to dev_printk's
H Hartley Sweeten [Fri, 22 Jun 2012 23:32:19 +0000 (16:32 -0700)]
staging: comedi: ni_daq_700: change the 'attach' printk's to dev_printk's

Use the dev_printk() routines to output the kernel messages in the
attach routine.

The main 'attach' message had a level of KERN_ERR, I believe it should
have been KERN_INFO. Also, move that message to the end of the attach
so it only gets displayed if the attach is successful.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove the #ifdef'ed out irq code
H Hartley Sweeten [Fri, 22 Jun 2012 23:31:15 +0000 (16:31 -0700)]
staging: comedi: ni_daq_700: remove the #ifdef'ed out irq code

The irq code is not compiled in due to the '#ifdef incomplete'.
And, as stated, it's not even complete. Just remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove the subdev_700_init function
H Hartley Sweeten [Fri, 22 Jun 2012 23:30:13 +0000 (16:30 -0700)]
staging: comedi: ni_daq_700: remove the subdev_700_init function

Move the contents of subdev_700_init into the attach function.
For aesthetic reasone, add some whitespace to the initialization
of the subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove a couple unused defines
H Hartley Sweeten [Fri, 22 Jun 2012 23:29:19 +0000 (16:29 -0700)]
staging: comedi: ni_daq_700: remove a couple unused defines

These defines are not referenced in the driver. Remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove the CALLBACK_* code
H Hartley Sweeten [Fri, 22 Jun 2012 23:28:33 +0000 (16:28 -0700)]
staging: comedi: ni_daq_700: remove the CALLBACK_* code

This driver was originally copied from the 8255 driver. The 8255
uses a callback function to handle the io operations to the device.
In this driver, the callback adds unneeded complexity.

The CALLBACK_ARG for this driver is always 'dev->iobase' and the
CALLBACK_FUNC is always 'subdev_700_cb'.

The callback function is also overly complex for this driver.
It takes a 'dir' parameter to determine if the io is a write or
read, a 'port' parameter that is not used, a 'data' parameter
that is only used for writes, and an 'arg' which is the iobase
of the device.

Unwind all of it and just put the outb()/inb() call in the code
where needed.

This allows getting rid of the private data completely. Refactor
the code based on it's removal.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove unused private data variable
H Hartley Sweeten [Fri, 22 Jun 2012 23:26:46 +0000 (16:26 -0700)]
staging: comedi: ni_daq_700: remove unused private data variable

The 'have_irq' variable is not needed since this driver doesn't
use interrupts. Remove it.

The kfree(s->private) needs to remain to free the memory allocated
in subdev_700_init().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove thisboard macro
H Hartley Sweeten [Fri, 22 Jun 2012 23:25:26 +0000 (16:25 -0700)]
staging: comedi: ni_daq_700: remove thisboard macro

The 'thisboard' macro relies on a local variable having a specific
name and yields a pointer derived from that local variable.
Replace the macro with local variables and use the comedi_board()
helper to get the pointer.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: move the boardinfo variable
H Hartley Sweeten [Fri, 22 Jun 2012 23:24:06 +0000 (16:24 -0700)]
staging: comedi: ni_daq_700: move the boardinfo variable

For aesthetic reasons, move the boardinfo declaration down so it's
next to the comedi_driver. That's the only place in the driver
where it's referenced directly.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: Remove bustype variable from the boardinfo
H Hartley Sweeten [Fri, 22 Jun 2012 23:23:04 +0000 (16:23 -0700)]
staging: comedi: ni_daq_700: Remove bustype variable from the boardinfo

This driver is only used for pcmcia type devices. There is no need for
the 'bustype' check. Remove the variable from the boardinfo and refactor
the code based on it's removal.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: Remove unneeded variables from the boardinfo
H Hartley Sweeten [Fri, 22 Jun 2012 23:21:55 +0000 (16:21 -0700)]
staging: comedi: ni_daq_700: Remove unneeded variables from the boardinfo

The 'device_id' and 'have_dio' variables in the boardinfo struct are
initialized but not referenced in the driver. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: Remove unused variables from the boardinfo
H Hartley Sweeten [Fri, 22 Jun 2012 23:20:56 +0000 (16:20 -0700)]
staging: comedi: ni_daq_700: Remove unused variables from the boardinfo

The 'read_byte' and 'write_byte' function pointers in the boardinfo
struct are not referenced in the driver. Just remove them.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: Remove a "do nothing" function stub
H Hartley Sweeten [Fri, 22 Jun 2012 23:19:47 +0000 (16:19 -0700)]
staging: comedi: ni_daq_700: Remove a "do nothing" function stub

The function do_config() doesn't do anything. Just remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: Remove the unused private data struct
H Hartley Sweeten [Fri, 22 Jun 2012 23:18:51 +0000 (16:18 -0700)]
staging: comedi: ni_daq_700: Remove the unused private data struct

The private data struct in this driver is not used for anything.
Remove the struct definition and the alloc_private() call.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: Move the comedi_driver variable
H Hartley Sweeten [Fri, 22 Jun 2012 23:17:52 +0000 (16:17 -0700)]
staging: comedi: ni_daq_700: Move the comedi_driver variable

Move the comedi_driver variable to remove the need for the
forward declarations. Add some whitespace to the declaration
for aesthetic reasons.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: refactor the pcmcia support code
H Hartley Sweeten [Fri, 22 Jun 2012 23:17:20 +0000 (16:17 -0700)]
staging: comedi: ni_daq_700: refactor the pcmcia support code

Refactor the pcmcia support code to remove the need for the
forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove some useless comments
H Hartley Sweeten [Fri, 22 Jun 2012 23:16:41 +0000 (16:16 -0700)]
staging: comedi: ni_daq_700: remove some useless comments

Remove some useless comments and whitespace.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: cleanup to the pcmcia_driver declaration
H Hartley Sweeten [Fri, 22 Jun 2012 23:16:00 +0000 (16:16 -0700)]
staging: comedi: ni_daq_700: cleanup to the pcmcia_driver declaration

For aesthetic reasons, add some whitespace to the declaration
of the pcmcia_driver and reorder it a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: change driver registration order
H Hartley Sweeten [Fri, 22 Jun 2012 23:15:16 +0000 (16:15 -0700)]
staging: comedi: ni_daq_700: change driver registration order

As done with the other comedi driver types, register the
comedi_driver first then the pcmcia_driver. Also, make
sure the pcmcia_driver registration succeeds and unregister
the comedi_driver it it fails.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: consolidate the init and exit functions
H Hartley Sweeten [Fri, 22 Jun 2012 23:14:30 +0000 (16:14 -0700)]
staging: comedi: ni_daq_700: consolidate the init and exit functions

The register/unregister of the pcmcia driver is done is separate
functions that are called by the module_{init,exit} routines.
Simplify the code a bit by moving the register/unregister into
the module_{init,exit} routines.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: add the module_{init, exit} declarations
H Hartley Sweeten [Fri, 22 Jun 2012 23:13:26 +0000 (16:13 -0700)]
staging: comedi: ni_daq_700: add the module_{init, exit} declarations

The init and exit functions for this module were being declared
as global symbols. Add the module_{init,exit} declarations and
make the functions static. Also, rename the functions so they
have namespace associated with the module.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: move the MODULE_* stuff to the EOF
H Hartley Sweeten [Fri, 22 Jun 2012 23:13:00 +0000 (16:13 -0700)]
staging: comedi: ni_daq_700: move the MODULE_* stuff to the EOF

Move the MODULE_* declarations to the end of the file.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: ni_daq_700: remove exported symbols
H Hartley Sweeten [Fri, 22 Jun 2012 23:12:42 +0000 (16:12 -0700)]
staging: comedi: ni_daq_700: remove exported symbols

This driver exports a number of functions with EXPORT_SYMBOL()
but nothing actually uses them. They also are not declared in
any header for use outside this module.

As stated in the comments, this driver was based on the 8255
driver so these exports are most likely the result of cut-and-
paste from the 8255 driver.

Remove all the EXPORT_SYMBOL() lines. If the exported function
is not used in the driver, remove the entire function as well.
If the function is used, make it static.

Also, make the dio700_cs_driver variable static since it's only
referenced in this file.

This quiets the following sparse warnings:

warning: symbol 'subdev_700_interrupt' was not declared. Should it be static?
warning: symbol 'subdev_700_init' was not declared. Should it be static?
warning: symbol 'subdev_700_init_irq' was not declared. Should it be static?
warning: symbol 'subdev_700_cleanup' was not declared. Should it be static?
warning: symbol 'dio700_cs_driver' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: double unlock in usbduxsigma_attach()
Dan Carpenter [Fri, 22 Jun 2012 07:14:59 +0000 (10:14 +0300)]
staging: comedi: double unlock in usbduxsigma_attach()

There was a double unlock introduced in 60ff461067 ("staging: comedi:
usbduxsigma: use attach_usb() hook").

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: factor out the find PCI device code
H Hartley Sweeten [Thu, 21 Jun 2012 02:28:01 +0000 (19:28 -0700)]
staging: comedi: s626: factor out the find PCI device code

Factor out the code that finds a matching PCI device from attach
function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove private INLINE macro
H Hartley Sweeten [Thu, 21 Jun 2012 02:27:43 +0000 (19:27 -0700)]
staging: comedi: s626: remove private INLINE macro

The INLINE macro is not used in the code. Remove it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove private DEBUG macro
H Hartley Sweeten [Thu, 21 Jun 2012 02:27:25 +0000 (19:27 -0700)]
staging: comedi: s626: remove private DEBUG macro

The private DEBUG macro defined in this driver outputs a lot
of function tracing noise. This information might be useful
when first developing the driver but should not be in the
mainlined code.

If any of this is needed in the future it should be added back
using the proper dev_printk interface.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 7
H Hartley Sweeten [Thu, 21 Jun 2012 02:26:56 +0000 (19:26 -0700)]
staging: comedi: s626: remove forward declarations 7

Move up the remaining functions needed to remove the forward
declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 6
H Hartley Sweeten [Thu, 21 Jun 2012 02:26:31 +0000 (19:26 -0700)]
staging: comedi: s626: remove forward declarations 6

Move the enc_private_data definition down to remove the need
for the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 5
H Hartley Sweeten [Thu, 21 Jun 2012 02:26:11 +0000 (19:26 -0700)]
staging: comedi: s626: remove forward declarations 5

Move the irq set/reset/clear and ns_to_timer helper functions
up to remove the need for the forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 4
H Hartley Sweeten [Thu, 21 Jun 2012 02:25:49 +0000 (19:25 -0700)]
staging: comedi: s626: remove forward declarations 4

Move the DAC functions up to remove the need for the forward
declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 3
H Hartley Sweeten [Thu, 21 Jun 2012 02:25:32 +0000 (19:25 -0700)]
staging: comedi: s626: remove forward declarations 3

Move the I2C functions up to remove the need for the forward
declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 2
H Hartley Sweeten [Thu, 21 Jun 2012 02:25:16 +0000 (19:25 -0700)]
staging: comedi: s626: remove forward declarations 2

Move the DEBI* i/o functions up to remove the need for the
forward declarations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: remove forward declarations 1
H Hartley Sweeten [Thu, 21 Jun 2012 02:24:47 +0000 (19:24 -0700)]
staging: comedi: s626: remove forward declarations 1

Move the s626_attach and s626_detach functions down to match
the coding style of the other comedi drivers. Then remove
the forward declarations that are no longer needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: pointers should be cleared with NULL not 0
H Hartley Sweeten [Thu, 21 Jun 2012 02:24:19 +0000 (19:24 -0700)]
staging: comedi: s626: pointers should be cleared with NULL not 0

pdma->LogicalBase is a void *, NULL should be used to clear it not 0.

This quiets a sparse warning about:

warning: Using plain integer as NULL pointer

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agostaging: comedi: s626: local functions should not be exposed globally
H Hartley Sweeten [Thu, 21 Jun 2012 02:23:54 +0000 (19:23 -0700)]
staging: comedi: s626: local functions should not be exposed globally

The 'ResetADC' function is prototyped as a static but is missing
the static tag in it's definition. The function is only referenced
in this file so add the static tag to the definition.

This quiets a sparse warning about:

warning: symbol 'ResetADC' was not declared. Should it be static?

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
Linus Torvalds [Sat, 23 Jun 2012 00:47:08 +0000 (17:47 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/sage/ceph-client

Pull Ceph fixes from Sage Weil:
 "There are a couple of fixes from Yan for bad pointer dereferences in
  the messenger code and when fiddling with page->private after page
  migration, a fix from Alex for a use-after-free in the osd client
  code, and a couple fixes for the message refcounting and shutdown
  ordering."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph-client:
  libceph: flush msgr queue during mon_client shutdown
  rbd: Clear ceph_msg->bio_iter for retransmitted message
  libceph: use con get/put ops from osd_client
  libceph: osd_client: don't drop reply reference too early
  ceph: check PG_Private flag before accessing page->private

12 years agoMerge tag 'for-linus-Jun-21-2012' of git://oss.sgi.com/xfs/xfs
Linus Torvalds [Fri, 22 Jun 2012 18:07:55 +0000 (11:07 -0700)]
Merge tag 'for-linus-Jun-21-2012' of git://oss.sgi.com/xfs/xfs

Pull XFS fixes from Ben Myers:
 - Fix stale data exposure with unwritten extents
 - Fix a warning in xfs_alloc_vextent with ODEBUG
 - Fix overallocation and alignment of pages for xfs_bufs
 - Fix a cursor leak
 - Fix a log hang
 - Fix a crash related to xfs_sync_worker
 - Rename xfs log structure from struct log to struct xlog so we can use
   crash dumps effectively

* tag 'for-linus-Jun-21-2012' of git://oss.sgi.com/xfs/xfs:
  xfs: rename log structure to xlog
  xfs: shutdown xfs_sync_worker before the log
  xfs: Fix overallocation in xfs_buf_allocate_memory()
  xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near
  xfs: check for stale inode before acquiring iflock on push
  xfs: fix debug_object WARN at xfs_alloc_vextent()
  xfs: xfs_vm_writepage clear iomap_valid when !buffer_uptodate (REV2)

12 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 22 Jun 2012 17:58:57 +0000 (10:58 -0700)]
Merge branch 'perf-urgent-for-linus' of git://git./linux/kernel/git/tip/tip

Pull perf updates from Ingo Molnar.

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  ftrace: Make all inline tags also include notrace
  perf: Use css_tryget() to avoid propping up css refcount
  perf tools: Fix synthesizing tracepoint names from the perf.data headers
  perf stat: Fix default output file
  perf tools: Fix endianity swapping for adds_features bitmask

12 years agodrm: drop comment about this header being autogenerated.
Dave Airlie [Fri, 22 Jun 2012 10:04:55 +0000 (11:04 +0100)]
drm: drop comment about this header being autogenerated.

This comment is well out of date.

Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoARM: OMAP4: hwmod data: Force HDMI in no-idle while enabled
Ricardo Neri [Thu, 21 Jun 2012 08:08:53 +0000 (10:08 +0200)]
ARM: OMAP4: hwmod data: Force HDMI in no-idle while enabled

As per the OMAP4 documentation, audio over HDMI must be transmitted in
no-idle mode. This patch adds the HWMOD_SWSUP_SIDLE so that omap_hwmod uses
no-idle/force-idle settings instead of smart-idle mode.

This is required as the DSS interface clock is used as functional clock
for the HDMI wrapper audio FIFO. If no-idle mode is not used, audio could
be choppy, have bad quality or not be audible at all.

Signed-off-by: Ricardo Neri <ricardo.neri@ti.com>
[b-cousson@ti.com: Update the subject and align the .flags
location with the script template]
Signed-off-by: Benoit Cousson <b-cousson@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
12 years agoARM: OMAP2+: mux: fix sparse warning
Paul Walmsley [Sun, 17 Jun 2012 18:00:58 +0000 (12:00 -0600)]
ARM: OMAP2+: mux: fix sparse warning

Commit bbd707acee279a61177a604822db92e8164d00db ("ARM: omap2: use
machine specific hook for late init") resulted in the addition of this
sparse warning:

arch/arm/mach-omap2/mux.c:791:12: warning: symbol 'omap_mux_late_init' was not declared. Should it be static?

Fix by including the header file containing the prototype.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Shawn Guo <shawn.guo@linaro.org>
Cc: Tony Lindgren <tony@atomide.com>
12 years agoARM: OMAP2+: CM: increase the module disable timeout
Paul Walmsley [Sun, 17 Jun 2012 17:57:53 +0000 (11:57 -0600)]
ARM: OMAP2+: CM: increase the module disable timeout

Increase the timeout for disabling an IP block to five milliseconds.
This is to handle the usb_host_fs idle latency, which takes almost
four milliseconds after a host controller reset.

This is the second of two patches needed to resolve the following
boot warning:

omap_hwmod: usb_host_fs: _wait_target_disable failed

Thanks to Sergei Shtylyov <sshtylyov@mvista.com> for finding
an unrelated hunk in a previous version of this patch.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Sergei Shtylyov <sshtylyov@mvista.com>
Cc: Tero Kristo <t-kristo@ti.com>
12 years agoARM: OMAP4: clock data: add clockdomains for clocks used as main clocks
Paul Walmsley [Sun, 17 Jun 2012 17:57:52 +0000 (11:57 -0600)]
ARM: OMAP4: clock data: add clockdomains for clocks used as main clocks

Until the OMAP4 code is converted to disable the use of the clock
framework-based clockdomain enable/disable sequence, any clock used as
a hwmod main_clk must have a clockdomain associated with it.  This
patch populates some clock structure clockdomain names to resolve the
following warnings during kernel init:

omap_hwmod: dpll_mpu_m2_ck: missing clockdomain for dpll_mpu_m2_ck.
omap_hwmod: trace_clk_div_ck: missing clockdomain for trace_clk_div_ck.
omap_hwmod: l3_div_ck: missing clockdomain for l3_div_ck.
omap_hwmod: ddrphy_ck: missing clockdomain for ddrphy_ck.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Rajendra Nayak <rnayak@ti.com>
Cc: Benoît Cousson <b-cousson@ti.com>
12 years agoARM: OMAP4: hwmod data: fix 32k sync timer idle modes
Paul Walmsley [Sun, 17 Jun 2012 17:57:51 +0000 (11:57 -0600)]
ARM: OMAP4: hwmod data: fix 32k sync timer idle modes

The 32k sync timer IP block target idle modes in the hwmod data are
incorrect.  The IP block does not support any smart-idle modes.
Update the data to reflect the correct modes.

This problem was initially identified and a diff fragment posted to
the lists by Benoît Cousson <b-cousson@ti.com>.  A patch description
bug in the first version was also identified by Benoît.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Benoît Cousson <b-cousson@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
12 years agoARM: OMAP4+: hwmod: fix issue causing IPs not going back to Smart-Standby
Djamil Elaidi [Sun, 17 Jun 2012 17:57:51 +0000 (11:57 -0600)]
ARM: OMAP4+: hwmod: fix issue causing IPs not going back to Smart-Standby

If an IP is configured in Smart-Standby-Wakeup, when disabling wakeup feature the
IP will not go back to Smart-Standby, but will remain in Smart-Standby-Wakeup.

Signed-off-by: Djamil Elaidi <d-elaidi@ti.com>
Signed-off-by: Paul Walmsley <paul@pwsan.com>
12 years agoMerge tag 'nfs-for-3.5-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Thu, 21 Jun 2012 23:05:43 +0000 (16:05 -0700)]
Merge tag 'nfs-for-3.5-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:
 - Fix a write hang due to an uninitalised variable when
   !defined(CONFIG_NFS_V4)
 - Address upcall races in the legacy NFSv4 idmapper
 - Remove an O_DIRECT refcounting issue
 - Fix a pNFS refcounting bug when the file layout metadata server is
   also acting as a data server
 - Fix a pNFS module loading race.

* tag 'nfs-for-3.5-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  NFS: Force the legacy idmapper to be single threaded
  NFS: Initialise commit_info.rpc_out when !defined(CONFIG_NFS_V4)
  NFS: Fix a refcounting issue in O_DIRECT
  NFSv4.1: Fix a race in set_pnfs_layoutdriver
  NFSv4.1: Fix umount when filelayout DS is also the MDS

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Thu, 21 Jun 2012 20:41:07 +0000 (13:41 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "This is a small pull with btrfs fixes.  The biggest of the bunch is
  another fix for the new backref walking code.

  We're still hammering out one btrfs dio vs buffered reads problem, but
  that one will have to wait for the next rc."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs:
  Btrfs: delay iput with async extents
  Btrfs: add a missing spin_lock
  Btrfs: don't assume to be on the correct extent in add_all_parents
  Btrfs: introduce btrfs_next_old_item

12 years agoMerge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck...
Linus Torvalds [Thu, 21 Jun 2012 20:40:40 +0000 (13:40 -0700)]
Merge tag 'hwmon-for-linus' of git://git./linux/kernel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "Two minor fixes in emc2103 and applesmc drivers."

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (emc2103) Fix use of an uninitilized variable in error case
  hwmon: (applesmc) Limit key length in warning messages

12 years agoxfs: rename log structure to xlog
Mark Tinguely [Thu, 14 Jun 2012 14:22:15 +0000 (09:22 -0500)]
xfs: rename log structure to xlog

Rename the XFS log structure to xlog to help crash distinquish it from the
other logs in Linux.

Signed-off-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
12 years agoxfs: shutdown xfs_sync_worker before the log
Ben Myers [Fri, 25 May 2012 20:45:36 +0000 (15:45 -0500)]
xfs: shutdown xfs_sync_worker before the log

Revert commit 1307bbd, which uses the s_umount semaphore to provide
exclusion between xfs_sync_worker and unmount, in favor of shutting down
the sync worker before freeing the log in xfs_log_unmount.  This is a
cleaner way of resolving the race between xfs_sync_worker and unmount
than using s_umount.

Signed-off-by: Ben Myers <bpm@sgi.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
12 years agoxfs: Fix overallocation in xfs_buf_allocate_memory()
Jan Kara [Tue, 5 Jun 2012 22:32:26 +0000 (00:32 +0200)]
xfs: Fix overallocation in xfs_buf_allocate_memory()

Commit de1cbee which removed b_file_offset in favor of b_bn introduced a bug
causing xfs_buf_allocate_memory() to overestimate the number of necessary
pages. The problem is that xfs_buf_alloc() sets b_bn to -1 and thus effectively
every buffer is straddling a page boundary which causes
xfs_buf_allocate_memory() to allocate two pages and use vmalloc() for access
which is unnecessary.

Dave says xfs_buf_alloc() doesn't need to set b_bn to -1 anymore since the
buffer is inserted into the cache only after being fully initialized now.
So just make xfs_buf_alloc() fill in proper block number from the beginning.

CC: David Chinner <dchinner@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
12 years agoxfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near
Dave Chinner [Tue, 12 Jun 2012 04:20:26 +0000 (14:20 +1000)]
xfs: fix allocbt cursor leak in xfs_alloc_ag_vextent_near

When we fail to find an matching extent near the requested extent
specification during a left-right distance search in
xfs_alloc_ag_vextent_near, we fail to free the original cursor that
we used to look up the XFS_BTNUM_CNT tree and hence leak it.

Reported-by: Chris J Arges <chris.j.arges@canonical.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Ben Myers <bpm@sgi.com>
12 years agoxfs: check for stale inode before acquiring iflock on push
Brian Foster [Mon, 11 Jun 2012 14:39:43 +0000 (10:39 -0400)]
xfs: check for stale inode before acquiring iflock on push

An inode in the AIL can be flush locked and marked stale if
a cluster free transaction occurs at the right time. The
inode item is then marked as flushing, which causes xfsaild
to spin and leaves the filesystem stalled. This is
reproduced by running xfstests 273 in a loop for an
extended period of time.

Check for stale inodes before the flush lock. This marks
the inode as pinned, leads to a log flush and allows the
filesystem to proceed.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
12 years agoBtrfs: delay iput with async extents
Josef Bacik [Fri, 15 Jun 2012 18:19:48 +0000 (12:19 -0600)]
Btrfs: delay iput with async extents

There is some concern that these iput()'s could be the final iputs and could
induce lockups on people waiting on writeback.  This would happen in the
rare case that we don't create ordered extents because of an error, but it
is theoretically possible and we already have a mechanism to deal with this
so just make them delayed iputs to negate any worry.

Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoBtrfs: add a missing spin_lock
Josef Bacik [Mon, 18 Jun 2012 13:23:18 +0000 (07:23 -0600)]
Btrfs: add a missing spin_lock

When fixing up the locking in the delayed ref destruction work I accidently
broke the locking myself ;(.  Add back a spin_lock that should be there and
we are now all set.  Thanks,
Btrfs: add a missing spin_lock

When fixing up the locking in the delayed ref destruction work I accidently
broke the locking myself ;(.  Add back a spin_lock that should be there and
we are now all set.  Thanks,

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Josef Bacik <josef@redhat.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoBtrfs: don't assume to be on the correct extent in add_all_parents
Alexander Block [Tue, 19 Jun 2012 13:42:26 +0000 (07:42 -0600)]
Btrfs: don't assume to be on the correct extent in add_all_parents

add_all_parents did assume that path is already at a correct extent data
item, which may not be true in case of data extents that were partly
rewritten and splitted.

We need to check if we're on a matching extent for every item and only
for the ones after the first. The loop is changed to do this now.

This patch also fixes a bug introduced with commit 3b127fd8 "Btrfs:
remove obsolete btrfs_next_leaf call from __resolve_indirect_ref".
The removal of next_leaf did sometimes result in slot==nritems when
the above described case happens, and thus resulting in invalid values
(e.g. wanted_obejctid) in add_all_parents (leading to missed backrefs
or even crashes).

Signed-off-by: Alexander Block <ablock84@googlemail.com>
Signed-off-by: Jan Schmidt <list.btrfs@jan-o-sch.net>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agoBtrfs: introduce btrfs_next_old_item
Alexander Block [Tue, 19 Jun 2012 13:42:25 +0000 (07:42 -0600)]
Btrfs: introduce btrfs_next_old_item

We introduce btrfs_next_old_item that uses btrfs_next_old_leaf instead
of btrfs_next_leaf.

btrfs_next_item is also changed to simply call btrfs_next_old_item with
time_seq being 0.

Signed-off-by: Alexander Block <ablock84@googlemail.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
12 years agodrm/edid: don't return stack garbage from supports_rb
Daniel Vetter [Tue, 19 Jun 2012 09:33:06 +0000 (11:33 +0200)]
drm/edid: don't return stack garbage from supports_rb

We need to initialize this to false, because the is_rb callback only
ever sets it to true.

Noticed while reading through the code.

Cc: stable@vger.kernel.org
Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Adam Jackson <ajax@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agovga_switcheroo: Add include guard
Ozan Çağlayan [Thu, 14 Jun 2012 12:02:35 +0000 (15:02 +0300)]
vga_switcheroo: Add include guard

Guard vga_switcheroo.h against multiple inclusion.

Signed-off-by: Ozan Çağlayan <ozancag@gmail.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
12 years agoMerge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Thu, 21 Jun 2012 05:12:52 +0000 (22:12 -0700)]
Merge branch 'fixes' of git://git.infradead.org/users/vkoul/slave-dma

Pull slave-dmaengine fixes from Vinod Koul:
 "A few fixes in pl330 and imx-sdma drivers."

* 'fixes' of git://git.infradead.org/users/vkoul/slave-dma:
  DMA: PL330: Fix racy mutex unlock
  DMA: PL330: Add missing static storage class specifier
  dma: imx-sdma: buf_tail should be initialize in prepare function
  dmaengine: pl330: dont complete descriptor for cyclic dma

12 years agoMerge branch 'for-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj...
Linus Torvalds [Thu, 21 Jun 2012 05:11:04 +0000 (22:11 -0700)]
Merge branch 'for-3.5-fixes' of git://git./linux/kernel/git/tj/cgroup

Pull two cgroup fixes from Tejun Heo:
 "This containes two patches fixing a refcnt race bug during css_put().
  Decrementing and checking the value weren't atomic and two tasks could
  think that they both pushed the counter to zero."

* 'for-3.5-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup:
  cgroups: Account for CSS_DEACT_BIAS in __css_put
  cgroup: make sure that decisions in __css_put are atomic

12 years agomm, mempolicy: fix mbind() to do synchronous migration
David Rientjes [Thu, 21 Jun 2012 01:00:12 +0000 (18:00 -0700)]
mm, mempolicy: fix mbind() to do synchronous migration

If the range passed to mbind() is not allocated on nodes set in the
nodemask, it migrates the pages to respect the constraint.

The final formal of migrate_pages() is a mode of type enum migrate_mode,
not a boolean.  do_mbind() is currently passing "true" which is the
equivalent of MIGRATE_SYNC_LIGHT.  This should instead be MIGRATE_SYNC
for synchronous page migration.

Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agomedia: pms.c needs linux/slab.h
Randy Dunlap [Thu, 21 Jun 2012 01:30:30 +0000 (18:30 -0700)]
media: pms.c needs linux/slab.h

drivers/media/video/pms.c uses kzalloc() and kfree() so it should
include <linux/slab.h> to fix build errors and a warning.

  drivers/media/video/pms.c:1047:2: error: implicit declaration of function 'kzalloc'
  drivers/media/video/pms.c:1047:6: warning: assignment makes pointer from integer without a cast
  drivers/media/video/pms.c:1116:2: error: implicit declaration of function 'kfree'

Found in mmotm but applies to mainline.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agopstore/ram_core: Better ECC size checking
Anton Vorontsov [Tue, 19 Jun 2012 02:15:53 +0000 (19:15 -0700)]
pstore/ram_core: Better ECC size checking

- Instead of exploiting unsigned overflows (which doesn't work for all
  sizes), use straightforward checking for ECC total size not exceeding
  initial buffer size;

- Printing overflowed buffer_size is not informative. Instead, print
  ecc_size and buffer_size;

- No need for buffer_size argument in persistent_ram_init_ecc(),
  we can address prz->buffer_size directly.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram_core: Proper checking for post_init errors (e.g. improper ECC size)
Anton Vorontsov [Tue, 19 Jun 2012 02:15:52 +0000 (19:15 -0700)]
pstore/ram_core: Proper checking for post_init errors (e.g. improper ECC size)

We will implement variable-sized ECC buffers soon, so post_init routine
might fail much more likely, so we'd better check for its errors.

To make error handling simple, modify persistent_ram_free() to it be safe
at all times.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram: Fix error handling during przs allocation
Anton Vorontsov [Tue, 19 Jun 2012 02:15:51 +0000 (19:15 -0700)]
pstore/ram: Fix error handling during przs allocation

persistent_ram_new() returns ERR_PTR() value on errors, so during
freeing of the przs we should check for both NULL and IS_ERR() entries,
otherwise bad things will happen.

Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agopstore/ram: Probe as early as possible
Anton Vorontsov [Tue, 19 Jun 2012 02:15:50 +0000 (19:15 -0700)]
pstore/ram: Probe as early as possible

Registering the platform driver before module_init allows us to log oopses
that happen during device probing.

This requires changing module_init to postcore_initcall, and switching
from platform_driver_probe to platform_driver_register because the
platform device is not registered when the platform driver is registered;
and because we use driver_register, now can't use create_bundle() (since
it will try to register the same driver once again), so we have to switch
to platform_device_register_data().

Also, some __init -> __devinit changes were needed.

Overall, the registration logic is now much clearer, since we have only
one driver registration point, and just an optional dummy device, which
is created from the module parameters.

Suggested-by: Colin Cross <ccross@android.com>
Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
Acked-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
12 years agoiio: add vcnl4000 combined ALS and proximity sensor
Peter Meerwald [Tue, 19 Jun 2012 07:58:54 +0000 (09:58 +0200)]
iio: add vcnl4000 combined ALS and proximity sensor

minimal driver, no IR current control and proximity/event
handling yet

v5:
* checkpatch warnings
* increase msleep() to 20 ms when waiting for data ready as
  measurement/conversion can take up to 100 ms, 1 ms is too short

v4 (address comments by Jonathan Cameron)
* remove SENSORS_ prefix in Kconfig
* change from IIO_INTENSITY to IIO_LIGHT
* move from staging

v3 (address comments by Shubhrajyoti Datta)
* cleanup Kconfig entry
* call I2C read/write functions directly

v2 (address comments by Lars-Peter Clausen and Jonathan Cameron)
* unify code for reading PS and AL data into
  parameterized _measure() function
* limit wait for data to become ready within 20 tries
* drop IIO_LIGHT channel, add SCALE to IIO_INTENSITY
* drop extra string arguments used for logging purpose only

Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
Acked-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>