]> Pileus Git - ~andy/linux/log
~andy/linux
12 years agodrivers/media: video/a5k6aa is a module and so needs module.h
Paul Gortmaker [Tue, 8 Nov 2011 19:56:50 +0000 (14:56 -0500)]
drivers/media: video/a5k6aa is a module and so needs module.h

This file uses core functions like module_init() and module_exit()
and so it explicitly needs to include the module.h header.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agoBtrfs: fix oops on NULL trans handle in btrfs_truncate
Chris Mason [Tue, 8 Nov 2011 19:49:59 +0000 (14:49 -0500)]
Btrfs: fix oops on NULL trans handle in btrfs_truncate

If we fail to reserve space in the transaction during truncate, we can
error out with a NULL trans handle.  The cleanup code needs an extra
check to make sure we aren't trying to use the bad handle.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'for_3.2/gpio-cleanup' of git://gitorious.org/khilman/linux-omap-pm...
Grant Likely [Tue, 8 Nov 2011 19:48:27 +0000 (12:48 -0700)]
Merge branch 'for_3.2/gpio-cleanup' of git://gitorious.org/khilman/linux-omap-pm into gpio/merge

12 years agon_gsm: Fix timings
Alan Cox [Tue, 8 Nov 2011 18:02:10 +0000 (18:02 +0000)]
n_gsm: Fix timings

Alek Du reported that the code erroneously applies time to jiffies
conversions twice to the t1 and t2 values. In normal use on a modem link
this cases no visible problem but on a slower link it will break as with
HZ=1000 as is typical we are running t1/t2 ten times too fast.

Alek's original patch removed the conversion from the timer setting but we
in fact have to be more careful as the contents of t1/t2 are visible via
the device API and we thus need to correct the constants.

Signed-off-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoARM: msm: fix compilation flags for MSM_SCM
Marc Zyngier [Tue, 8 Nov 2011 13:07:36 +0000 (13:07 +0000)]
ARM: msm: fix compilation flags for MSM_SCM

CONFIG_MSM_SCM uses the smc instruction, which with some
toolchains requires a ".arch_extension" directive.

Cc: David Brown <davidb@codeaurora.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: David Brown <davidb@codeaurora.org>
12 years agoALSA: usb-audio - Fix the missing volume quirks at delayed init
Takashi Iwai [Tue, 8 Nov 2011 16:50:27 +0000 (17:50 +0100)]
ALSA: usb-audio - Fix the missing volume quirks at delayed init

In the recent usb-audio driver, the initialization of volume ranges
may be delayed when the device doesn't respond well at the probing time.
But the volume quirks for certain devices are applied only in
mixer_ctl_feature_info() thus only at the very first probe and will be
missing when the volume range is initialized later.

This patch moves the volume quirk code to be always called from the
volume-range extraction (get_min_max()), so that the quirks are properly
applied in the later init time.

Reported-and-tested-by: Alexey Fisher <bug-track@fisher-privat.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoxfs: fix force shutdown handling in xfs_end_io
Christoph Hellwig [Tue, 8 Nov 2011 08:56:15 +0000 (08:56 +0000)]
xfs: fix force shutdown handling in xfs_end_io

Ensure ioend->io_error gets propagated back to e.g. AIO completions.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Alex Elder <aelder@sgi.com>
12 years agoxfs: constify xfs_item_ops
Christoph Hellwig [Fri, 28 Oct 2011 09:54:24 +0000 (09:54 +0000)]
xfs: constify xfs_item_ops

The log item ops aren't nessecarily the biggest exploit vector, but marking
them const is easy enough.  Also remove the unused xfs_item_ops_t typedef
while we're at it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Alex Elder <aelder@sgi.com>
12 years agoxfs: Fix possible memory corruption in xfs_readlink
Carlos Maiolino [Mon, 7 Nov 2011 16:10:24 +0000 (16:10 +0000)]
xfs: Fix possible memory corruption in xfs_readlink

Fixes a possible memory corruption when the link is larger than
MAXPATHLEN and XFS_DEBUG is not enabled. This also remove the
S_ISLNK assert, since the inode mode is checked previously in
xfs_readlink_by_handle() and via VFS.

Updated to address concerns raised by Ben Hutchings about the loose
attention paid to 32- vs 64-bit values, and the lack of handling a
potentially negative pathlen value:
 - Changed type of "pathlen" to be xfs_fsize_t, to match that of
   ip->i_d.di_size
 - Added checking for a negative pathlen to the too-long pathlen
   test, and generalized the message that gets reported in that case
   to reflect the change
As a result, if a negative pathlen were encountered, this function
would return EFSCORRUPTED (and would fail an assertion for a debug
build)--just as would a too-long pathlen.

Signed-off-by: Alex Elder <aelder@sgi.com>
Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
12 years agoiommu: omap: Fix compile failure
Ming Lei [Tue, 8 Nov 2011 10:29:15 +0000 (18:29 +0800)]
iommu: omap: Fix compile failure

Fix compile failure in drivers/iommu/omap-iommu-debug.c
because of missing module.h include.

Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
12 years ago[media] V4L menu: add submenu for platform devices
Hans Verkuil [Tue, 8 Nov 2011 14:02:34 +0000 (11:02 -0300)]
[media] V4L menu: add submenu for platform devices

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agoarm/mxs: fix mmc device adding for mach-mx28evk
Shawn Guo [Tue, 8 Nov 2011 13:57:59 +0000 (21:57 +0800)]
arm/mxs: fix mmc device adding for mach-mx28evk

The merge commit "526b264 Merge branch 'imx/cleanup' into imx/devel"
left a duplicated mx28_add_mxs_mmc() call, which causes the problem
below during boot.

  kobject_add_internal failed for mxs-mmc.1 with -EEXIST, don't try
  to register things with the same name in the same directory.

The patch removes this leftover and also change mmc0 adding to align
with mmc1.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
12 years ago[media] cx88: fix menu level for the VP-3054 module
Hans Verkuil [Mon, 7 Nov 2011 09:26:59 +0000 (06:26 -0300)]
[media] cx88: fix menu level for the VP-3054 module

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L menu: move all PCI(e) devices to their own submenu
Hans Verkuil [Fri, 30 Sep 2011 12:14:19 +0000 (09:14 -0300)]
[media] V4L menu: move all PCI(e) devices to their own submenu

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L menu: reorganize the radio menu
Hans Verkuil [Fri, 30 Sep 2011 08:31:24 +0000 (05:31 -0300)]
[media] V4L menu: reorganize the radio menu

Move all USB radio devices to the top of the list and move all ISA
devices to a separate menu.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L menu: remove duplicate USB dependency
Hans Verkuil [Fri, 30 Sep 2011 08:16:48 +0000 (05:16 -0300)]
[media] V4L menu: remove duplicate USB dependency

Thanks to Guennadi Liakhovetski <g.liakhovetski@gmx.de> for pointing this
out to me.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L menu: move all platform drivers to the bottom of the menu
Hans Verkuil [Fri, 30 Sep 2011 12:06:11 +0000 (09:06 -0300)]
[media] V4L menu: move all platform drivers to the bottom of the menu

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L menu: remove the EXPERIMENTAL tag from vino and c-qcam
Hans Verkuil [Fri, 30 Sep 2011 12:03:57 +0000 (09:03 -0300)]
[media] V4L menu: remove the EXPERIMENTAL tag from vino and c-qcam

These are really, really old drivers. These are really no longer experimental...

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L menu: move ISA and parport drivers into their own submenu
Hans Verkuil [Fri, 30 Sep 2011 12:03:06 +0000 (09:03 -0300)]
[media] V4L menu: move ISA and parport drivers into their own submenu

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] V4L menu: move USB drivers section to the top
Hans Verkuil [Fri, 30 Sep 2011 08:05:35 +0000 (05:05 -0300)]
[media] V4L menu: move USB drivers section to the top

USB webcams are some of the most used V4L devices, so move it to a more
prominent place in the menu instead of being at the end.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] usbvision: Drop broken 10-bit I2C address support
Jean Delvare [Mon, 7 Nov 2011 08:24:49 +0000 (05:24 -0300)]
[media] usbvision: Drop broken 10-bit I2C address support

The support for 10-bit I2C addresses in usbvision seems plain broken
to me. I had already noticed that back in February 2007 [1]. The code
was not fixed since then, so I take it that it's not actually needed.
And as a matter of fact I don't know of any 10-bit addressed I2C
tuner, encode, decoder or the like.

So let's simply get rid of the broken and useless code.

I'm also adding I2C_FUNC_I2C, as the driver and hardware support plain
I2C messaging.

[1] http://marc.info/?l=linux-i2c&m=117499415208244&w=2

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] Support for Sveon STV22 (IT9137)
Malcolm Priestley [Sun, 6 Nov 2011 21:30:26 +0000 (18:30 -0300)]
[media] Support for Sveon STV22 (IT9137)

This indeed a clone of Kworld UB499 2T

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Eliminate as10x_handle_t alias
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:50 +0000 (16:31 -0300)]
[media] staging: as102: Eliminate as10x_handle_t alias

Remove pre-processor defined as10x_handle_t data type by directly
replacing it with struct as102_bus_adapter_t. phandle is renamed
to adap inside function bodies.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Define device name string pointers constant
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:49 +0000 (16:31 -0300)]
[media] staging: as102: Define device name string pointers constant

Supresses following checkpatch warning:
WARNING: static const char * array should probably be static const char * const

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Move variable declarations to the header
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:48 +0000 (16:31 -0300)]
[media] staging: as102: Move variable declarations to the header

Fixes following checkpatch.pl warning:
WARNING: externs should be avoided in .c files

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Use linux/uaccess.h instead of asm/uaccess.h
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:47 +0000 (16:31 -0300)]
[media] staging: as102: Use linux/uaccess.h instead of asm/uaccess.h

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Remove linkage specifiers for C++
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:46 +0000 (16:31 -0300)]
[media] staging: as102: Remove linkage specifiers for C++

The as10x_cmd.h header is not public so there should be no need
for an "extern "C"" in it.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Replace printk(KERN_<LEVEL> witk pr_<level>
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:45 +0000 (16:31 -0300)]
[media] staging: as102: Replace printk(KERN_<LEVEL> witk pr_<level>

While at it also correct some spelling errors.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Whitespace and indentation cleanup
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:44 +0000 (16:31 -0300)]
[media] staging: as102: Whitespace and indentation cleanup

Remove some unnecessary braces. Replace spaces with tabs where
expected. Replace gcc specific __FUNCTION__ with  C99 __func__.
No functional changes.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Fix the dvb device registration error path
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:43 +0000 (16:31 -0300)]
[media] staging: as102: Fix the dvb device registration error path

Release already acquired resources when error happens during
devices registration steps.
Use dev_err()  where struct device is available, instead of driver
specific err().

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Replace pragma(pack) with attribute __packed
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:42 +0000 (16:31 -0300)]
[media] staging: as102: Replace pragma(pack) with attribute __packed

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Make the driver select CONFIG_FW_LOADER
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:41 +0000 (16:31 -0300)]
[media] staging: as102: Make the driver select CONFIG_FW_LOADER

It doesn't seem to be of much advantage to compile in FW_LOADER
support conditionally, then make the driver always select FW_LOADER
and remove #idefs from the code.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Remove leftovers of the SPI bus driver
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:40 +0000 (16:31 -0300)]
[media] staging: as102: Remove leftovers of the SPI bus driver

SPI bus driver support is not included in this module, the SPI
driver files are missing. But some bits are still present so
clean up the unused code.
The SPI driver support can be properly added later if needed.

Then CONFIG_AS102_SPI and CONFIG_AS102_USB is now not needed
and the pre-processor statements using these config options
can now be removed from *.c files.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Remove unnecessary typedefs
Sylwester Nawrocki [Sun, 6 Nov 2011 19:31:39 +0000 (16:31 -0300)]
[media] staging: as102: Remove unnecessary typedefs

According to the kernel coding rules typedefs should be avoided,
so replace theit occurances with explicit enum/union types.

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] staging: as102: Remove comment tags for editors configuration
Piotr Chmura [Sun, 6 Nov 2011 19:31:38 +0000 (16:31 -0300)]
[media] staging: as102: Remove comment tags for editors configuration

Cc: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Piotr Chmura <chmooreck@poczta.onet.pl>
Signed-off-by: Sylwester Nawrocki <snjw23@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] it913x-fe ver 1.10 correct SNR reading from frontend
Malcolm Priestley [Sun, 6 Nov 2011 14:19:14 +0000 (11:19 -0300)]
[media] it913x-fe ver 1.10 correct SNR reading from frontend

Correction of reading from frontend and represents
a SNR nonlinear scale of minimum signal to full signal.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] bt8xx: add support for PCI device ID 0x36c
Peter De Schrijver [Sun, 6 Nov 2011 13:47:58 +0000 (10:47 -0300)]
[media] bt8xx: add support for PCI device ID 0x36c

add support for conexant PCI device 0x36c. Seems to be fully compatible with
the currently supported chips, yet the chip has different PCI ID.

Signed-off-by: Peter De Schrijver <p2@psychaos.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] bt8xx: add support for Tongwei Video Technology TD-3116
Peter De Schrijver [Sun, 6 Nov 2011 13:15:47 +0000 (10:15 -0300)]
[media] bt8xx: add support for Tongwei Video Technology TD-3116

The following patch adds support for the Tongwei Video Technology TD-3116 board. This
is a Bt878 based capture card with 16 inputs meant for surveilance applications.
It also offers a way to check which inputs have a video signal while capturing another
input. In addition there are a number of alarm inputs and outputs available and there
is microcontroller which is presumably intended for use as a system watchdog. None of
these extra capabilities are supported by the patch.

Signed-off-by: Peter De Schrijver <p2@psychaos.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] it913x ver 1.09 support for USB 1 devices (IT9135)
Malcolm Priestley [Sun, 6 Nov 2011 13:24:30 +0000 (10:24 -0300)]
[media] it913x ver 1.09 support for USB 1 devices (IT9135)

IT9135 devices do support USB 1.
Support added with restricton on pid count to 5.
IT9137 devices wil not connect in USB 1 mode.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-ctrl: Send change events to all fh for auto cluster slave controls
Hans de Goede [Mon, 31 Oct 2011 14:16:44 +0000 (11:16 -0300)]
[media] v4l2-ctrl: Send change events to all fh for auto cluster slave controls

Otherwise the fh changing the master control won't get the inactive state
change event for the slave controls.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-event: Don't set sev->fh to NULL on unsubscribe
Hans de Goede [Wed, 26 Oct 2011 08:52:47 +0000 (05:52 -0300)]
[media] v4l2-event: Don't set sev->fh to NULL on unsubscribe

Setting sev->fh to NULL causes problems for the del op added in the next
patch of this series, since this op needs a way to get to its own data
structures, and typically this will be done by using container_of on an
embedded v4l2_fh struct.

The reason the original code is setting sev->fh to NULL is to signal
to users of the event framework that the unsubscription has happened,
but since their is no shared lock between the event framework and users
of it, this is inherently racy, and it also turns out to be unnecessary
as long as both the event framework and the user of the framework do their
own locking properly and the user guarantees that it holds no references
to the subcribed_event structure after its del operation has been called.

This is best explained by looking at the only code currently checking for
sev->fh being set to NULL on unsubscribe, which is the v4l2-ctrls.c send_event
function. Here is the relevant code from v4l2-ctrls: send_event():

if (sev->fh && (sev->fh != fh ||
(sev->flags & V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK)))
v4l2_event_queue_fh(sev->fh, &ev);

Now lets say that v4l2_event_unsubscribe and v4l2-ctrls: send_event() race
on the same sev, then the following could happens:

1) send_event checks sev->fh, finds it is not NULL
<thread switch>
2) v4l2_event_unsubscribe sets sev->fh NULL
3) v4l2_event_unsubscribe calls v4l2_ctrls del_event function, this blocks
   as the thread calling send_event holds the ctrl_lock
<thread switch>
4) send_event calls v4l2_event_queue_fh(sev->fh, &ev) which not is equivalent
   to calling: v4l2_event_queue_fh(NULL, &ev)
5) oops, NULL pointer deref.

Now again without setting sev->fh to NULL in v4l2_event_unsubscribe and
without the (now senseless since always true) sev->fh != NULL check in

1) send_event is about to call v4l2_event_queue_fh(sev->fh, &ev)
<thread switch>
2) v4l2_event_unsubscribe removes sev->list from the fh->subscribed list
<thread switch>
3) send_event calls v4l2_event_queue_fh(sev->fh, &ev)
4) v4l2_event_queue_fh blocks on the fh_lock spinlock
<thread switch>
5) v4l2_event_unsubscribe unlocks the fh_lock spinlock
6) v4l2_event_unsubscribe calls v4l2_ctrls del_event function, this blocks
   as the thread calling send_event holds the ctrl_lock
<thread switch>
8) v4l2_event_queue_fh takes the fh_lock
7) v4l2_event_queue_fh calls v4l2_event_subscribed, does not find it since
   sev->list has been removed from fh->subscribed already -> does nothing
9) v4l2_event_queue_fh releases the fh_lock
10) the caller of send_event releases the ctrl lock (mutex)
<thread switch>
11) v4l2_ctrls del_event takes the ctrl lock
12) v4l2_ctrls del_event removes sev->node from the ev_subs list
13) v4l2_ctrls del_event releases the ctrl lock
14) v4l2_event_unsubscribe frees the sev, to which no references are being
    held anymore

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-event: Remove pending events from fh event queue when unsubscribing
Hans de Goede [Wed, 26 Oct 2011 08:40:27 +0000 (05:40 -0300)]
[media] v4l2-event: Remove pending events from fh event queue when unsubscribing

The kev pointers inside the pending events queue (the available queue) of the
fh point to data inside the sev, unsubscribing frees the sev, thus making these
pointers point to freed memory!

This patch fixes these dangling pointers in the available queue by removing
all matching pending events on unsubscription.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL
Hans de Goede [Mon, 24 Oct 2011 08:03:27 +0000 (05:03 -0300)]
[media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] tvp5150: replace video standard "magic" numbers
Javier Martinez Canillas [Fri, 4 Nov 2011 16:23:21 +0000 (13:23 -0300)]
[media] tvp5150: replace video standard "magic" numbers

64933337e3cb61ca555969a35ab68b477db34ee2
[media] tvp5150: Add video format registers configuration values

Added constants for each video standard supported by TVP5150, so this patch
get rid of the magic numbers.

Signed-off-by: Javier Martinez Canillas <martinez.javier@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] MAINTAINERS: add a maintainer for s5p-mfc driver
Jeongtae Park [Fri, 14 Oct 2011 03:03:23 +0000 (00:03 -0300)]
[media] MAINTAINERS: add a maintainer for s5p-mfc driver

Add a maintainer for s5p-mfc driver.

Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: add G2D driver for s5p device family
Kamil Debski [Thu, 6 Oct 2011 14:32:12 +0000 (11:32 -0300)]
[media] v4l: add G2D driver for s5p device family

G2D is a 2D graphics accelerator engine present in the s5p family
of Samsung SoCs. It is capable of bitblt and raster operations on
images having dimensions of up to 8000x8000.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] v4l: s5p-mfc: fix reported capabilities
Kamil Debski [Thu, 6 Oct 2011 14:34:05 +0000 (11:34 -0300)]
[media] v4l: s5p-mfc: fix reported capabilities

MFC uses the multi-plane API, but it reported single-plane
when querying capabilities.

Signed-off-by: Kamil Debski <k.debski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: vb2: reset queued list on REQBUFS(0) call
Marek Szyprowski [Tue, 25 Oct 2011 06:07:59 +0000 (03:07 -0300)]
[media] media: vb2: reset queued list on REQBUFS(0) call

Queued list was not reset on REQBUFS(0) call. This caused to enqueue a
freed buffer to the driver.

Reported-by: Angela Wan <angela.j.wan@gmail.com>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: vb2: set buffer length correctly for all buffer types
Marek Szyprowski [Thu, 13 Oct 2011 10:07:24 +0000 (07:07 -0300)]
[media] media: vb2: set buffer length correctly for all buffer types

v4l2_planes[plane].length field was not initialized for userptr buffers.
This patch fixes this issue.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] media: vb2: add a check for uninitialized buffer
Marek Szyprowski [Wed, 12 Oct 2011 16:09:53 +0000 (13:09 -0300)]
[media] media: vb2: add a check for uninitialized buffer

__buffer_in_use() might be called for empty/uninitialized buffer in the
following scenario: REQBUF(n, USER_PTR), QUERYBUF(). This patch fixes
kernel ops in such case.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
CC: Pawel Osciak <pawel@osciak.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agodrm/i915: Fix object refcount leak on mmappable size limit error path.
Eric Anholt [Tue, 1 Nov 2011 06:16:21 +0000 (23:16 -0700)]
drm/i915: Fix object refcount leak on mmappable size limit error path.

I've been seeing memory leaks on my system in the form of large
(300-400MB) GEM objects created by now-dead processes laying around
clogging up memory.  I usually notice when it gets to about 1.2GB of
them.  Hopefully this clears up the issue, but I just found this bug
by inspection.

Signed-off-by: Eric Anholt <eric@anholt.net>
Cc: stable@kernel.org
Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoagp: iommu_gfx_mapped only available if CONFIG_INTEL_IOMMU is set
Keith Packard [Fri, 28 Oct 2011 17:28:00 +0000 (10:28 -0700)]
agp: iommu_gfx_mapped only available if CONFIG_INTEL_IOMMU is set

Kernels with no iommu support cannot ever need the Ironlake
work-around, so never enable it in that case.

Might be better to completely remove the work-around from the kernel
in this case?

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
12 years agodrm/i915: fix if statement (bogus semi-colon)
Dan Carpenter [Fri, 28 Oct 2011 11:42:41 +0000 (14:42 +0300)]
drm/i915: fix if statement (bogus semi-colon)

The semi-colon is a typo here and it makes the if statement
unconditional.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
12 years agoMerge branch 'for-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound...
Mark Brown [Tue, 8 Nov 2011 10:37:41 +0000 (10:37 +0000)]
Merge branch 'for-3.2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-3.2

12 years ago[media] tda18271: add tda18271_get_if_frequency
Michael Krufky [Thu, 3 Nov 2011 12:59:42 +0000 (09:59 -0300)]
[media] tda18271: add tda18271_get_if_frequency

Reported-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mxl5007t: add mxl5007t_get_if_frequency
Michael Krufky [Thu, 3 Nov 2011 12:12:04 +0000 (09:12 -0300)]
[media] mxl5007t: add mxl5007t_get_if_frequency

Reported-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years ago[media] mxl111sf: add mxl111sf_tuner_get_if_frequency
Michael Krufky [Thu, 3 Nov 2011 11:39:12 +0000 (08:39 -0300)]
[media] mxl111sf: add mxl111sf_tuner_get_if_frequency

Reported-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
12 years agohwspinlock/u8500: fix build error due to undefined label
Axel Lin [Sun, 6 Nov 2011 13:14:16 +0000 (21:14 +0800)]
hwspinlock/u8500: fix build error due to undefined label

Fix below build error:

  CC      drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c: In function 'u8500_hsem_probe':
drivers/hwspinlock/u8500_hsem.c:113: error: label 'free_state' used but not defined

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
12 years agohwspinlock: Don't return a value in __hwspin_unlock
Axel Lin [Thu, 3 Nov 2011 06:45:48 +0000 (14:45 +0800)]
hwspinlock: Don't return a value in __hwspin_unlock

Fix below build warning:

  CC      arch/arm/mach-omap2/hwspinlock.o
In file included from arch/arm/mach-omap2/hwspinlock.c:22:
include/linux/hwspinlock.h: In function '__hwspin_unlock':
include/linux/hwspinlock.h:121: warning: 'return' with a value, in function returning void

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Ohad Ben-Cohen <ohad@wizery.com>
12 years agoALSA: hda - Mute unused capture sources for Realtek codecs
Takashi Iwai [Tue, 8 Nov 2011 06:52:19 +0000 (07:52 +0100)]
ALSA: hda - Mute unused capture sources for Realtek codecs

When a Realtek codec has a matrix-style capture-source selection, we
need to scan all connections instead of only imux items.  Otherwise some
input might be kept unmuted.  Although the corresponding input must be
dead so there should be no input from it, it's still safer to mute the
route completely.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agoALSA: intel8x0: Improve comments for VM optimization
Denis V. Lunev [Mon, 7 Nov 2011 16:33:25 +0000 (20:33 +0400)]
ALSA: intel8x0: Improve comments for VM optimization

The recently merged 228cf79376f1 looks a bit hackish while it is not.
The change was quite simple. In a virtualized environment the
patch unhacks old kludge introduced for old broken AC97 hardware.

This patch adds proper comment to "unkludge" code.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Signed-off-by: Konstantin Ozerkov <kozerkov@parallels.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
12 years agomd/raid5: STRIPE_ACTIVE has lock semantics, add barriers
Dan Williams [Tue, 8 Nov 2011 05:22:06 +0000 (16:22 +1100)]
md/raid5: STRIPE_ACTIVE has lock semantics, add barriers

All updates that occur under STRIPE_ACTIVE should be globally visible
when STRIPE_ACTIVE clears.  test_and_set_bit() implies a barrier, but
clear_bit() does not.

This is suitable for 3.1-stable.

Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
12 years agomd/raid5: abort any pending parity operations when array fails.
NeilBrown [Tue, 8 Nov 2011 05:22:01 +0000 (16:22 +1100)]
md/raid5: abort any pending parity operations when array fails.

When the number of failed devices exceeds the allowed number
we must abort any active parity operations (checks or updates) as they
are no longer meaningful, and can lead to a BUG_ON in
handle_parity_checks6.

This bug was introduce by commit 6c0069c0ae9659e3a91b68eaed06a5c6c37f45c8
in 2.6.29.

Reported-by: Manish Katiyar <mkatiyar@gmail.com>
Tested-by: Manish Katiyar <mkatiyar@gmail.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.de>
Cc: stable@kernel.org
12 years agopowerpc/kvm: Fix build failure with HV KVM and CBE
Alexander Graf [Tue, 13 Sep 2011 04:15:31 +0000 (04:15 +0000)]
powerpc/kvm: Fix build failure with HV KVM and CBE

When running with HV KVM and CBE config options enabled, I get
build failures like the following:

  arch/powerpc/kernel/head_64.o: In function `cbe_system_error_hv':
  (.text+0x1228): undefined reference to `do_kvm_0x1202'
  arch/powerpc/kernel/head_64.o: In function `cbe_maintenance_hv':
  (.text+0x1628): undefined reference to `do_kvm_0x1602'
  arch/powerpc/kernel/head_64.o: In function `cbe_thermal_hv':
  (.text+0x1828): undefined reference to `do_kvm_0x1802'

This is because we jump to a KVM handler when HV is enabled, but we
only generate the handler with PR KVM mode.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agoMerge remote-tracking branch 'agust/next' into merge
Benjamin Herrenschmidt [Tue, 8 Nov 2011 03:53:55 +0000 (14:53 +1100)]
Merge remote-tracking branch 'agust/next' into merge

12 years agopowerpc/ps3: Fix lv1_gpu_attribute hcall
Geoff Levand [Wed, 12 Oct 2011 08:42:13 +0000 (08:42 +0000)]
powerpc/ps3: Fix lv1_gpu_attribute hcall

The lv1_gpu_attribute hcall takes three, not five input
arguments.  Adjust the lv1 hcall table and all calls.

Signed-off-by: Geoff Levand <geoff@infradead.org>
CC: Takashi Iwai <tiwai@suse.de>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc/ps3: Fix PS3 repository build warnings
Geoff Levand [Wed, 12 Oct 2011 08:39:15 +0000 (08:39 +0000)]
powerpc/ps3: Fix PS3 repository build warnings

Fix uninitialized variable warnings in build of repository.c

Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc/ps3: irq: Remove IRQF_DISABLED
Yong Zhang [Fri, 21 Oct 2011 23:56:53 +0000 (23:56 +0000)]
powerpc/ps3: irq: Remove IRQF_DISABLED

Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc/irq: Remove IRQF_DISABLED
Yong Zhang [Fri, 21 Oct 2011 23:56:27 +0000 (23:56 +0000)]
powerpc/irq: Remove IRQF_DISABLED

Since commit [e58aa3d2: genirq: Run irq handlers with interrupts disabled],
We run all interrupt handlers with interrupts disabled
and we even check and yell when an interrupt handler
returns with interrupts enabled (see commit [b738a50a:
genirq: Warn when handler enables interrupts]).

So now this flag is a NOOP and can be removed.

Signed-off-by: Yong Zhang <yong.zhang0@gmail.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geoff Levand <geoff@infradead.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc/numa: NUMA topology support for PowerNV
Dipankar Sarma [Fri, 28 Oct 2011 04:25:32 +0000 (04:25 +0000)]
powerpc/numa: NUMA topology support for PowerNV

This patch adds support for numa topology on powernv platforms running
OPAL formware. It checks for the type of platform at run time and
sets the affinity form correctly so that NUMA topology can be discovered
correctly.

Signed-off-by: Dipankar Sarma <dipankar@in.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Add System RAM to /proc/iomem
Anton Blanchard [Wed, 2 Nov 2011 14:56:12 +0000 (14:56 +0000)]
powerpc: Add System RAM to /proc/iomem

We've resisted adding System RAM to /proc/iomem because it is
the wrong place for it. Unfortunately we continue to find tools
that rely on this behaviour so give up and add it in.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc: Add KVM as module to defconfigs
Michael Neuling [Mon, 7 Nov 2011 14:49:13 +0000 (14:49 +0000)]
powerpc: Add KVM as module to defconfigs

Add HV mode KVM to Book3 server 64bit defconfigs as a module.

Doesn't add much to the size:
   text    data     bss      dec     hex filename
8244109 4686767  994000 13924876  d47a0c vmlinux.vanilla
8256092 4691607  994128 13941827         d4bc43 vmlinux.kvm

This should enable more testing of this configuration.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agopowerpc/kvm: Fix build with older toolchains
Nishanth Aravamudan [Mon, 7 Nov 2011 13:36:56 +0000 (13:36 +0000)]
powerpc/kvm: Fix build with older toolchains

Fix KVM build for older toolchains (found with .powerpc64-unknown-linux-gnu-gcc
(crosstool-NG-1.8.1) 4.3.2):

  AS      arch/powerpc/kvm/book3s_hv_rmhandlers.o
arch/powerpc/kvm/book3s_hv_rmhandlers.S: Assembler messages:
arch/powerpc/kvm/book3s_hv_rmhandlers.S:1388: Error: Unrecognized opcode: `popcntw'
make[1]: *** [arch/powerpc/kvm/book3s_hv_rmhandlers.o] Error 1
make: *** [_module_arch/powerpc/kvm] Error 2

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
12 years agomfd: fix build failures in recently added ab5500 code
Paul Gortmaker [Mon, 7 Nov 2011 16:17:04 +0000 (11:17 -0500)]
mfd: fix build failures in recently added ab5500 code

These files had implicit dependencies on modular support
which now show up as build failures with the module cleanup
work merged to mainline.

Reported-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agohwspinlock/u8500: include linux/module.h
Axel Lin [Sun, 6 Nov 2011 13:16:51 +0000 (21:16 +0800)]
hwspinlock/u8500: include linux/module.h

Include module.h to fix below build error:

  CC      drivers/hwspinlock/u8500_hsem.o
drivers/hwspinlock/u8500_hsem.c:177: error: 'THIS_MODULE' undeclared here (not in a function)
 [...]
drivers/hwspinlock/u8500_hsem.c:196: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/hwspinlock/u8500_hsem.c:196: warning: function declaration isn't a prototype
make[2]: *** [drivers/hwspinlock/u8500_hsem.o] Error 1
make[1]: *** [drivers/hwspinlock] Error 2
make: *** [drivers] Error 2

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agoMTD: MAPS: bcm963xx-flash.c: explicitly include module.h
Jonas Gorski [Sun, 6 Nov 2011 11:57:31 +0000 (12:57 +0100)]
MTD: MAPS: bcm963xx-flash.c: explicitly include module.h

module.h was previously implicitly included through mtd/mtd.h.

Fixes the following build failure after the module.h cleanup:

  CC      drivers/mtd/maps/bcm963xx-flash.o
drivers/mtd/maps/bcm963xx-flash.c: In function 'bcm963xx_probe':
drivers/mtd/maps/bcm963xx-flash.c:208:29: error: 'THIS_MODULE' undeclared (first use in this function)
 [...]
drivers/mtd/maps/bcm963xx-flash.c:276:1: warning: type defaults to 'int' in declaration of 'MODULE_AUTHOR'
drivers/mtd/maps/bcm963xx-flash.c:276:15: warning: function declaration isn't a prototype
make[7]: *** [drivers/mtd/maps/bcm963xx-flash.o] Error 1

Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
12 years agoLinux 3.2-rc1 v3.2-rc1
Linus Torvalds [Tue, 8 Nov 2011 00:16:02 +0000 (16:16 -0800)]
Linux 3.2-rc1

.. with new name.  Because nothing says "really solid kernel release"
like naming it after an extinct animal that just happened to be in the
news lately.

12 years agoMerge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux...
Linus Torvalds [Tue, 8 Nov 2011 00:14:26 +0000 (16:14 -0800)]
Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap: (31 commits)
  ARM: OMAP: Fix export.h or module.h includes
  ARM: OMAP: omap_device: Include linux/export.h
  ARM: OMAP2: Fix H4 matrix keyboard warning
  ARM: OMAP1: Remove unused omap-alsa.h
  ARM: OMAP1: Fix warnings about enabling 32 KiHz timer
  ARM: OMAP2+: timer: Remove omap_device_pm_latency
  ARM: OMAP2+: clock data: Remove redundant timer clkdev
  ARM: OMAP: Devkit8000: Remove double omap_mux_init_gpio
  ARM: OMAP: usb: musb: OMAP: Delete unused function
  MAINTAINERS: Update linux-omap git repository
  ARM: OMAP: change get_context_loss_count ret value to int
  ARM: OMAP4: hsmmc: configure SDMMC1_DR0 properly
  ARM: OMAP4: hsmmc: Fix Pbias configuration on regulator OFF
  ARM: OMAP3: hwmod: fix variant registration and remove SmartReflex from common list
  ARM: OMAP: I2C: Fix omap_register_i2c_bus() return value on success
  ARM: OMAP: dmtimer: Include linux/module.h
  ARM: OMAP2+: l3-noc: Include linux/module.h
  ARM: OMAP2+: devices: Fixes for McPDM
  ARM: OMAP: Fix errors and warnings when building for one board
  ARM: OMAP3: PM: restrict erratum i443 handling to OMAP3430 only
  ...

12 years agoVFS: we need to set LOOKUP_JUMPED on mountpoint crossing
Al Viro [Mon, 7 Nov 2011 21:21:26 +0000 (21:21 +0000)]
VFS: we need to set LOOKUP_JUMPED on mountpoint crossing

Mountpoint crossing is similar to following procfs symlinks - we do
not get ->d_revalidate() called for dentry we have arrived at, with
unpleasant consequences for NFS4.

Simple way to reproduce the problem in mainline:

    cat >/tmp/a.c <<'EOF'
    #include <unistd.h>
    #include <fcntl.h>
    #include <stdio.h>
    main()
    {
            struct flock fl = {.l_type = F_RDLCK, .l_whence = SEEK_SET, .l_len = 1};
            if (fcntl(0, F_SETLK, &fl))
                    perror("setlk");
    }
    EOF
    cc /tmp/a.c -o /tmp/test

then on nfs4:

    mount --bind file1 file2
    /tmp/test < file1 # ok
    /tmp/test < file2 # spews "setlk: No locks available"...

What happens is the missing call of ->d_revalidate() after mountpoint
crossing and that's where NFS4 would issue OPEN request to server.

The fix is simple - treat mountpoint crossing the same way we deal with
following procfs-style symlinks.  I.e.  set LOOKUP_JUMPED...

Cc: stable@kernel.org
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoPM / devfreq: fix private_data
Jonathan Corbet [Mon, 7 Nov 2011 22:54:53 +0000 (23:54 +0100)]
PM / devfreq: fix private_data

The "private_date" field in struct devfreq_dev_status almost certainly
wants to be "private_data"; since there are no in-tree users of this
functionality, now seems like an easy time to make the fix.

Signed-off-by: Jonathan Corbet <corbet@lwn.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agoDocumentation: Fix typo in freezer-subsystem.txt
Rafael J. Wysocki [Sun, 6 Nov 2011 21:00:20 +0000 (22:00 +0100)]
Documentation: Fix typo in freezer-subsystem.txt

Fix a typo in Documentation/cgroups/freezer-subsystem.txt.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
12 years agoPM / QoS: Set cpu_dma_pm_qos->name
Dominik Brodowski [Sun, 6 Nov 2011 20:54:12 +0000 (21:54 +0100)]
PM / QoS: Set cpu_dma_pm_qos->name

Since commit 4a31a334, the name of this misc device is not initialized,
which leads to a funny device named /dev/(null) being created and
/proc/misc containing an entry with just a number but no name. The latter
leads to complaints by cryptsetup, which caused me to investigate this
matter.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
12 years agobtrfs: fix double-free 'tree_root' in 'btrfs_mount()'
slyich@gmail.com [Mon, 7 Nov 2011 21:08:01 +0000 (16:08 -0500)]
btrfs: fix double-free 'tree_root' in 'btrfs_mount()'

On error path 'tree_root' is treed in 'free_fs_info()'.
No need to free it explicitely. Noticed by SLUB in debug mode:

Complete reproducer under usermode linux (discovered on real
machine):

    bdev=/dev/ubda
    btr_root=/btr
    /mkfs.btrfs $bdev
    mount $bdev $btr_root
    mkdir $btr_root/subvols/
    cd $btr_root/subvols/
    /btrfs su cr foo
    /btrfs su cr bar
    mount $bdev -osubvol=subvols/foo $btr_root/subvols/bar
    umount $btr_root/subvols/bar

which gives

device fsid 4d55aa28-45b1-474b-b4ec-da912322195e devid 1 transid 7 /dev/ubda
=============================================================================
BUG kmalloc-2048: Object already free
-----------------------------------------------------------------------------

INFO: Allocated in btrfs_mount+0x389/0x7f0 age=0 cpu=0 pid=277
INFO: Freed in btrfs_mount+0x51c/0x7f0 age=0 cpu=0 pid=277
INFO: Slab 0x0000000062886200 objects=15 used=9 fp=0x0000000070b4d2d0 flags=0x4081
INFO: Object 0x0000000070b4d2d0 @offset=21200 fp=0x0000000070b4a968
...
Call Trace:
70b31948:  [<6008c522>] print_trailer+0xe2/0x130
70b31978:  [<6008c5aa>] object_err+0x3a/0x50
70b319a8:  [<6008e242>] free_debug_processing+0x142/0x2a0
70b319e0:  [<600ebf6f>] btrfs_mount+0x55f/0x7f0
70b319f8:  [<6008e5c1>] __slab_free+0x221/0x2d0

Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Cc: Arne Jansen <sensille@gmx.net>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: David Sterba <dsterba@suse.cz>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
12 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Mon, 7 Nov 2011 20:38:11 +0000 (12:38 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf top: Fix live annotation in the --stdio interface
  perf top tui: Don't recalc column widths considering just the first page
  perf report: Add progress bar when processing time ordered events
  perf hists browser: Warn about lost events
  perf tools: Fix a typo of command name as trace-cmd
  perf hists: Fix recalculation of total_period when sorting entries
  perf header: Fix build on old systems
  perf ui browser: Handle K_RESIZE in dialog windows
  perf ui browser: No need to switch char sets that often
  perf hists browser: Use K_TIMER
  perf ui: Rename ui__warning_paranoid to ui__error_paranoid
  perf ui: Reimplement the popup windows using libslang
  perf ui: Reimplement ui__popup_menu using ui__browser
  perf ui: Reimplement ui_helpline using libslang
  perf ui: Improve handling sigwinch a bit
  perf ui progress: Reimplement using slang
  perf evlist: Fix grouping of multiple events

12 years agoMerge branch 'fixes-modulesplit' into fixes
Tony Lindgren [Mon, 7 Nov 2011 20:27:23 +0000 (12:27 -0800)]
Merge branch 'fixes-modulesplit' into fixes

12 years agoARM: OMAP: Fix export.h or module.h includes
Tony Lindgren [Mon, 7 Nov 2011 20:27:10 +0000 (12:27 -0800)]
ARM: OMAP: Fix export.h or module.h includes

Commit 32aaeffbd4a7457bf2f7448b33b5946ff2a960eb (Merge branch
'modsplit-Oct31_2011'...) caused some build errors. Fix these
and make sure we always have export.h or module.h included
for MODULE_ and EXPORT_SYMBOL users:

$ grep -rl ^MODULE_ arch/arm/*omap*/*.c | xargs \
  grep -L linux/module.h
  arch/arm/mach-omap2/dsp.c
  arch/arm/mach-omap2/mailbox.c
  arch/arm/mach-omap2/omap-iommu.c
  arch/arm/mach-omap2/smartreflex.c

Also check we either have export.h or module.h included
for the files exporting symbols:

$ grep -rl EXPORT_SYMBOL arch/arm/*omap*/*.c | xargs \
  grep -L linux/export.h | xargs grep -L linux/module.h

Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Tony Lindgren <tony@atomide.com>
12 years agoARM: OMAP: omap_device: Include linux/export.h
Axel Lin [Mon, 7 Nov 2011 20:27:10 +0000 (12:27 -0800)]
ARM: OMAP: omap_device: Include linux/export.h

Include linux/export.h to fix below build warning:

  CC      arch/arm/plat-omap/omap_device.o
arch/arm/plat-omap/omap_device.c:1055: warning: data definition has no type or storage class
arch/arm/plat-omap/omap_device.c:1055: warning: type defaults to 'int' in declaration of 'EXPORT_SYMBOL'
arch/arm/plat-omap/omap_device.c:1055: warning: parameter names (without types) in function declaration

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Mon, 7 Nov 2011 18:55:33 +0000 (10:55 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (47 commits)
  forcedeth: fix a few sparse warnings (variable shadowing)
  forcedeth: Improve stats counters
  forcedeth: remove unneeded stats updates
  forcedeth: Acknowledge only interrupts that are being processed
  forcedeth: fix race when unloading module
  MAINTAINERS/rds: update maintainer
  wanrouter: Remove kernel_lock annotations
  usbnet: fix oops in usbnet_start_xmit
  ixgbe: Fix compile for kernel without CONFIG_PCI_IOV defined
  etherh: Add MAINTAINERS entry for etherh
  bonding: comparing a u8 with -1 is always false
  sky2: fix regression on Yukon Optima
  netlink: clarify attribute length check documentation
  netlink: validate NLA_MSECS length
  i825xx:xscale:8390:freescale: Fix Kconfig dependancies
  macvlan: receive multicast with local address
  tg3: Update version to 3.121
  tg3: Eliminate timer race with reset_task
  tg3: Schedule at most one tg3_reset_task run
  tg3: Obtain PCI function number from device
  ...

12 years agovfs: d_invalidate() should leave mountpoints alone
Al Viro [Mon, 7 Nov 2011 16:39:57 +0000 (16:39 +0000)]
vfs: d_invalidate() should leave mountpoints alone

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoforcedeth: fix a few sparse warnings (variable shadowing)
david decotigny [Sat, 5 Nov 2011 14:38:24 +0000 (14:38 +0000)]
forcedeth: fix a few sparse warnings (variable shadowing)

This fixes the following sparse warnings:
drivers/net/ethernet/nvidia/forcedeth.c:2113:7: warning: symbol 'size' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2102:6: originally declared here
drivers/net/ethernet/nvidia/forcedeth.c:2155:7: warning: symbol 'size' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2102:6: originally declared here
drivers/net/ethernet/nvidia/forcedeth.c:2227:7: warning: symbol 'size' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2215:6: originally declared here
drivers/net/ethernet/nvidia/forcedeth.c:2271:7: warning: symbol 'size' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2215:6: originally declared here
drivers/net/ethernet/nvidia/forcedeth.c:2986:20: warning: symbol 'addr' shadows an earlier one
drivers/net/ethernet/nvidia/forcedeth.c:2963:6: originally declared here

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoforcedeth: Improve stats counters
Mandeep Baines [Sat, 5 Nov 2011 14:38:23 +0000 (14:38 +0000)]
forcedeth: Improve stats counters

Rx byte count was off; instead use the hardware's count.  Tx packet
count was counting pre-TSO packets; instead count on-the-wire packets.
Report hardware dropped frame count as rx_fifo_errors.

- The count of transmitted packets reported by the forcedeth driver
  reports pre-TSO (TCP Segmentation Offload) packet counts and not the
  count of the number of packets sent on the wire. This change fixes
  the forcedeth driver to report the correct count. Fixed the code by
  copying the count stored in the NIC H/W to the value reported by the
  driver.

- Count rx_drop_frame errors as rx_fifo_errors:
  We see a lot of rx_drop_frame errors if we disable the rx bottom-halves
  for too long.  Normally, rx_fifo_errors would be counted in this case.
  The rx_drop_frame error count is private to forcedeth and is not
  reported by ifconfig or sysfs.  The rx_fifo_errors count is currently
  unused in the forcedeth driver.  It is reported by ifconfig as overruns.
  This change reports rx_drop_frame errors as rx_fifo_errors.

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoforcedeth: remove unneeded stats updates
david decotigny [Sat, 5 Nov 2011 14:38:22 +0000 (14:38 +0000)]
forcedeth: remove unneeded stats updates

Function ndo_get_stats() updates most of the stats from hardware
registers, making the manual updates un-needed. This change removes
these manual updates. Main exception is rx_missed_errors which needs
manual update.

Another exception is rx_packets, still updated manually in this commit
to make sure this patch doesn't change behavior of driver. This will
be addressed by a future patch.

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoforcedeth: Acknowledge only interrupts that are being processed
Mike Ditto [Sat, 5 Nov 2011 14:38:21 +0000 (14:38 +0000)]
forcedeth: Acknowledge only interrupts that are being processed

This is to avoid a race, accidentally acknowledging an interrupt that
we didn't notice and won't immediately process.  This is based solely
on code inspection; it is not known if there was an actual bug here.

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoforcedeth: fix race when unloading module
david decotigny [Sat, 5 Nov 2011 14:38:20 +0000 (14:38 +0000)]
forcedeth: fix race when unloading module

When forcedeth module is unloaded, there exists a path that can lead
to mod_timer() after del_timer_sync(), causing an oops. This patch
short-circuits this unneeded path, which originates in
nv_get_ethtool_stats().

Tested:
  x86_64 16-way + 3 ethtool -S infinite loops + 100Mbps incoming traffic
  + rmmod/modprobe/ifconfig in a loop

Initial-Author: Salman Qazi <sqazi@google.com>
Discussion: http://patchwork.ozlabs.org/patch/123548/

Signed-off-by: David Decotigny <david.decotigny@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodevice-mapper: using EXPORT_SYBOL in dm-space-map-checker.c needs export.h
Stephen Rothwell [Tue, 1 Nov 2011 09:27:43 +0000 (20:27 +1100)]
device-mapper: using EXPORT_SYBOL in dm-space-map-checker.c needs export.h

Reported-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodevice-mapper: dm-bufio.c needs to include module.h
Stephen Rothwell [Tue, 1 Nov 2011 07:30:49 +0000 (18:30 +1100)]
device-mapper: dm-bufio.c needs to include module.h

since it uses the module facilities.

Reported-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agodrivers/md: change module.h -> export.h in persistent-data/dm-*
Paul Gortmaker [Wed, 28 Sep 2011 22:29:32 +0000 (18:29 -0400)]
drivers/md: change module.h -> export.h in persistent-data/dm-*

For the files which are not themselves modular, we can change
them to include only the smaller export.h since all they are
doing is looking for EXPORT_SYMBOL.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoarm: Add export.h to recently added files for EXPORT_SYMBOL
Paul Gortmaker [Sun, 9 Oct 2011 03:24:48 +0000 (23:24 -0400)]
arm: Add export.h to recently added files for EXPORT_SYMBOL

These files didn't exist at the time of the module.h split, and
so were not fixed by the commits on that baseline.  Since they use
the EXPORT_SYMBOL and/or THIS_MODULE macros, they will need the
new export.h file included that provides them.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
12 years agoMAINTAINERS/rds: update maintainer
Or Gerlitz [Mon, 7 Nov 2011 18:28:20 +0000 (13:28 -0500)]
MAINTAINERS/rds: update maintainer

update for the actual maintainer

Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agowanrouter: Remove kernel_lock annotations
Richard Weinberger [Mon, 7 Nov 2011 18:27:30 +0000 (13:27 -0500)]
wanrouter: Remove kernel_lock annotations

The BKL is gone, these annotations are useless.

Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: David S. Miller <davem@davemloft.net>