Input: egalax_ts - ABS_MT_POSITION_Y not reported well

The egalax_ts touchscreen modul not report ABS_MT_POSITION_Y proper.
As result it may be, that upper software levels only receive x coordinates well.

Signed-off-by: Heiko Abraham <abrahamh@web.de>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Input: wacom - add three new display tablets

Cintiq 13HD, DTK 2241, and Cintiq 22HDT are supported.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Input: wacom - add a few new styli for Cintiq series

Add new styli for Cintiq 13HD and 22HD. Update comments for
for tools. Check whole 10 nibbles of tool ID for tool
types. Remove unuecessary tool type for Intuos series PAD.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
netfilter: nf_{log,queue}: fix compilation without CONFIG_PROC_FS

This patch fixes the following compilation error:

net/netfilter/nf_log.c:373:38: error: 'struct netns_nf' has no member named 'proc_netfilter'

if procfs is not set.

The netns support for nf_log, nfnetlink_log and nfnetlink_queue_core
requires CONFIG_PROC_FS in the removal path of their respective
/proc interface since net->nf.proc_netfilter is undefined in that
case.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Acked-by: Gao feng <gaofeng@cn.fujitsu.com>
netfilter: update MAINTAINERS file

* Remove reference to ipchains (not any longer in the tree)
* Remove all P: (person) as this tag is obsolete according to the
  description. Therefore, update Jozsef Kadlecsik to M: so he can
  still show in the list of people.
* Add URI to Netfilter's patchwork at ozlabs.org
* Update URIs to Netfilter's git trees to point to kernel.org.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
s390: remove non existent reference to GENERIC_KERNEL_THREAD

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
s390/disassembler: prevent endless loop in print_fn_code()

If the size of the opcode to be printed is larger than "len" we'll
see an overflow of an unsigned long value, which means that the
while loop within print_fn_code() will loop quite a long time until
there is the next chance for an exit.
So add an early exit check.

Reported-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
s390: disable pfmf for clear page instruction

Wit the introduction of large pages Linux also used pfmf for page
clearing. The current implementation is not ideal, though:
- currently we set usage intent=0, but cleared pages are often used
directly after the clearing
- z/VM does not yet provide EDAT
- KVM does have to intercept PFMF even for resident pages

Lets just the mvcl loop in all cases until we have a well defined
pattern were pfmf is besser.

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
cifs: only set ops for inodes in I_NEW state

It's generally not safe to reset the inode ops once they've been set. In
the case where the inode was originally thought to be a directory and
then later found to be a DFS referral, this can lead to an oops when we
try to trigger an inode op on it after changing the ops to the blank
referral operations.

Cc: <stable@vger.kernel.org>
Reported-and-Tested-by: Sachin Prabhu <sprabhu@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
staging: vt6656: use free_netdev instead of kfree

use free_netdev() instead of kfree(pDevice->apdev)

Signed-off-by: Hema Prathaban <hemaklnce@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
gpio/omap: ensure gpio context is initialised

Commit a2797be (gpio/omap: force restore if context loss is not
detectable) broke gpio support for OMAP when booting with device-tree
because a restore of the gpio context being performed without ever
initialising the gpio context. In other words, the context restored was
bad.

This problem could also occur in the non device-tree case, however, it
is much less likely because when booting without device-tree we can
detect context loss via a platform specific API and so context restore
is performed less often.

Nevertheless we should ensure that the gpio context is initialised
on the first pm-runtime resume for gpio banks that could lose their
state regardless of whether we are booting with device-tree or not.

The context loss count was being initialised on the first pm-runtime
suspend following a resume, by populating the get_count_loss_count()
function pointer after the first pm-runtime resume. To make the code
more readable and logical, initialise the context loss count on the
first pm-runtime resume if the context is not yet valid.

Reported-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Jon Hunter <jon-hunter@ti.com>
Acked-by: Santosh Shilimkar<santosh.shilimkar@ti.com>
Reviewed-by: Kevin Hilman <khilman@linaro.org>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
avr32: move NODES_SHIFT into Kconfig and delete numnodes.h

This patch moves the NODES_SHIFT symbol into Kconfig to synchronize AVR32
architecture with the current kernel. The global header files do longer use the
value from numnodes.h.

See commit c80d79d746cc48bd94b0ce4f6d4f3c90cd403aaf for details.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
avr32: fix relocation check for signed 18-bit offset

Caught by static code analysis by David.

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Hans-Christian Egtvedt <egtvedt@samfundet.no>
Cc: stable@kernel.org
staging: comedi: ni_labpc: fix build when VIRT_TO_BUS is not defined

After merging the final tree, the next-20130424 build (powerpc
allyesconfig) failed like this:

drivers/staging/comedi/drivers/ni_labpc.c: In function 'labpc_ai_cmd':
drivers/staging/comedi/drivers/ni_labpc.c:980:9: error:
    implicit declaration of function 'virt_to_bus'
   [-Werror=implicit-function-declaration]

The virt_to_bus() is only needed for the ISA DMA support in this driver.

On powerpc, CONFIG_COMEDI_NI_LABPC_ISA cannot be enabled due to the
depends on VIRT_TO_BUS but the PCI driver, ni_labpc_pci, can be enabled.
That driver uses the ni_labpc driver for the common support code shared
by the ISA, PCI, and PCMCIA boards.

The ISA specific support, and the optional ISA DMA support, are currently
still in the common ni_labpc driver. The ISA specific code is protected
by #if IS_ENABLED(CONFIG_COMEDI_NI_LABPC_ISA) and the ISA DMA support
is protected by #ifdef CONFIG_ISA_DMA_API. This allows the ISA support
to be enabled on architectures that support VIRT_TO_BUS and optionally
enables ISA DMA support if ISA_DMA_API is enabled.

Unfortunately, the ISA DMA code uses virt_to_bus(). This results in
the build failure for architectures that enable ISA_DMA_API but do not
have VIRT_TO_BUS.

Add a new member to the private data, dma_addr, to hold the phys_addr_t
returned by virt_to_bus() and initialize it in the ISA specific
labpc_attach().

For architectures that enable ISA_DMA_API but not VIRT_TO_BUS, this
will fix the build error. This is also safe for architectures the
enable both options but don't enable COMEDI_NI_LABPC_ISA because the
dma channel (devpriv->dma_chan) is only initialized in the ISA
specific labpc_attach().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: allow buffer resize if previous resize failed

When a comedi device is successfully attached, those subdevices that
support asynchronous commands will have had buffers allocated
successfully.  It is possible to resize the buffers afterwards, but if
the resize fails the subdevice is left with no buffer
(`s->async->prealloc_buf == NULL`).  Currently, this also causes any
subsequent attempts to resize the buffer to fail with an error, which
seems like a bad idea.

Remove the check in `resize_async_buffer()` that causes the resize to
fail if the subdevice currently has no buffer (presumably due to the
failure of a previous resize attempt).  Callers of
`resize_async_buffer()` have already checked that the subdevice is
allowed to have a buffer.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: work without HAS_DMA

The core "comedi" module and the "mite" helper module for NI PCI devices
both have calls to `dma_alloc_coherent()` and `dma_free_coherent()`.
Those functions are only available if `CONFIG_HAS_DMA` is defined.

Apart from the "mite" module, the functions are only called for comedi
drivers that set `s->async_dma_dir` (where `s` is a pointer to a `struct
comedi_subdevice`) to anything other than `DMA_NONE`.

Change local helper functions `__comedi_buf_alloc()` and
`__comedi_buf_free()` to only call `dma_alloc_coherent()` and
`dma_free_coherent()` if `CONFIG_HAS_DMA` is defined.

Change the "Kconfig" to make the following configuration options depend
on `HAS_DMA`:

`COMEDI_MITE` - builds the "mite" module.
`COMEDI_NI_6527` - selects `COMEDI_MITE`.
`COMEDI_NI_65XX` - selects `COMEDI_MITE`.
`COMEDI_NI_670X` - selects `COMEDI_MITE`.
`COMEDI_NI_LABPC_PCI` - selects `COMEDI_MITE`.
`COMEDI_NI_PCIDIO` - selects `COMEDI_MITE`.
`COMEDI_NI_TIOCMD` - selects `COMEDI_MITE`.
`COMEDI_NI_660X` - selects `COMEDI_NI_TIOCMD`,
                   sets `s->async_dma_dir`.
`COMEDI_NI_PCIMIO` - selects `COMEDI_NI_TIOCMD`,
                     sets `s->async_dma_dir`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: ni_mio_common: only do counter commands for ni_pcimio

"ni_mio_common.c" holds common code included by "ni_pcimio.c",
"ni_atmio.c" and "ni_mio_cs.c", including a common initialization
function `ni_E_init()`.  Amongst other things, this initializes some
counter subdevices to support comedi instructions and asynchronous
commands.  However, even though it sets up the handlers to support
asynchronous commands on these subdevices, the handlers will return an
error unless the `PCIDMA` macro is defined (which is defined only in
"ni_pcimio.c").  If the `PCIDMA` macro is not defined, the comedi core
will needlessly allocate buffers to support the asynchronous commands.
Also, `s->async_dma_dir` is set to `DMA_BIDIRECTIONAL`, causing the
physical pages for the buffers to be allocated using
`dma_alloc_coherent()`.

If the comedi core cannot call `dma_alloc_coherent()` because
`CONFIG_HAS_DMA` is not defined, it will fail to allocate the buffers,
which ultimately causes `ni_E_init()` to fail.

Avoid the wastage and prevent the failure by only setting up
asynchronous command support for the counter subdevices if the `PCIDMA`
macro is defined.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: comedi: complain if dma buffer allocation not supported

When allocating a buffer to support asynchronous comedi commands, if a
DMA coherent buffer was requested but `CONFIG_HAS_DMA` is undefined,
bail out of local helper function `__comedi_buf_alloc()` with an error
message.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: nvec: remove inline marking of EXPORT_SYMBOL functions

EXPORT_SYMBOL and inline directives are contradictory to each other.
The patch fixes this inconsistency.

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

Signed-off-by: Denis Efremov <yefremov.denis@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
staging: nvec: add missing module aliases

Keyboard and mouse drivers were missing MODULE_ALIAS
definitions. This fixes auto module loading of these
drivers.

Signed-off-by: Marc Dietrich <marvin24@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>