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>
bq27x00: Fix I2C dependency in KConfig

This patch fixes build failure(randconfig) of next-20130501. When config
I2C as m, BATTERY_BQ27x00 as y, here comes the failure. The driver depends
on I2C only if I2C is not disabled, as Lars commented. Last version of
this patch make the driver depend on I2C unconditionally.

Failure message:
drivers/built-in.o: In function `bq27x00_read_i2c':
bq27x00_battery.c:(.text+0x1082a7): undefined reference to `i2c_transfer'
drivers/built-in.o: In function `bq27x00_battery_init':
bq27x00_battery.c:(.init.text+0x6085): undefined reference to `i2c_register_driver'
bq27x00_battery.c:(.init.text+0x60c7): undefined reference to `i2c_del_driver'
drivers/built-in.o: In function `bq27x00_battery_exit':
bq27x00_battery.c:(.exit.text+0xbf0): undefined reference to `i2c_del_driver'
make: *** [vmlinux] Error 1

Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
wm831x_backup: Fix wrong kfree call for devdata->backup.name

devdata->backup.name points to devdata->name, the memory for devdata->name
is part of struct wm831x_backup. Thus remove kfree call for
devdata->backup.name.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
pm2301_charger: Fix module alias prefix

This driver is a i2c driver, use "i2c" rather than "platform" prefix for
module alias.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
ARM i.MX6q: Fix periph_clk2_sel and periph2_clk2_sel clocks

The periph_clk2_sel mux can be set to pll3, osc/pll1_ref_clk, or osc/
pll2_burn_in_clk. The periph2_clk2_sel mux can be set to pll3 or pll2.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
ARM i.MX6: correct MLB clock configuration

According to the i.MX6 Dual/Quad technical reference manual
(Figure 18-2. Clock Tree - Part 1) the MLB clock is directly
feed by the AXI_CLK_ROOT. This is called 'axi' in our code.

Note that the clock of the MLB IP block on the i.MX6 is completely
independent of the PLL8 (MLB PLL). The MLB PLL isn't responsible
for feeding the MLB IP block with a clock. Instead, it's used
internally by the MLB module to sync the bus clock in case the MLB
6-pin interface is enabled:

MediaLB Control 0 Register, MLB150_MLBC0[5], MLBPEN:
1 MediaLB 6-pin interface enabled. MLB PLL and MLB PHY is enabled in this case.

I.e. the PLL8 MLB PLL has to be handled by the MLB driver and isn't needed
for clocking the MLB module itself.

Signed-off-by: Dirk Behme <dirk.behme@de.bosch.com>
CC: Jiada Wang <Jiada_Wang@mentor.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
ARM: imx: replicate the diagnostic register of boot cpu into secondary cores

The diagnostic register holds the errata bits.  Mostly bootloader
does not bring up secondary cores, so that when errata bits are set
in bootloader, they are set only for boot cpu.  But on a SMP
configuration, it should be equally done on every single core.
Set up the diagnostic register for secondary cores by replicating
the register from boot cpu.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
ARM: imx: fix typo in gpu3d_shader_sels

There is no clock pll2_pfd9_720m.  Instead it should be pll3_pfd0_720m.
Fix the typo in gpu3d_shader_sels.

Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Dirk Behme <dirk.behme@de.bosch.com>
ARM: sunxi: Fix Mini X-plus device tree build

Commit b00adbe0 ("ARM: sunxi: Rename uart nodes to serial") changed the
node names in the DTSI, changes that were not accordingly made to the
Mini X-Plus device tree. This breakage slipped through because it was
not properly declared in the Makefile.

Fix both issues.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.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>
ARM: mvebu: do not duplicate the mpic alias

The mpic alias is already defined in the common armada-370-xp.dtsi, so
there's no need to repeat it at the armada-xp.dtsi and armada-370.dtsi
level.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
Kirkwood: Enable PCIe port 1 on QNAP TS-11x/TS-21x

Enable KW_PCIE1 on QNAP TS-11x/TS-21x devices as newer revisions
(rev 1.3) have a USB 3.0 chip from Etron on PCIe port 1.  Thanks
to Marek Vasut for identifying this issue!

Cc: <stable@vger.kernel.org> # v2.6.36.x
Signed-off-by: Martin Michlmayr <tbm@cyrius.com>
Tested-by: Marek Vasut <marex@denx.de>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
ARM: plat-orion: add missing ehci include to common.h

Removing orion ehci include from board files will raise a compiler
error because plat/common.h is using an enum provided by orion ehci
but not including the include itself. This just adds the missing include.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
ARM: mvebu: Add a ranges entry to translate devbus childs

With the latest device tree reorganization which introduced the
'internal-reg' node, now the only region translated is the internal register's.
This makes the description of the hardware incomplete, for it lacks the
Device Bus childs address space.

In order to fix this, it's required to add a 'ranges' entry with a suitable
address space to map Device Bus childs, on a per-board basis.

Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
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>
ARM: Orion: Remove redundant init_dma_coherent_pool_size()

The patch:

  387870f mm: dmapool: use provided gfp flags for all dma_alloc_coherent() calls

makes these calls on Kirkwood and Orion5x redundant. The drivers are
not making atomic requests for coherent memory and hence the default
pool size is now sufficient.

Jason Cooper added mach-mvebu/ hunk, and corrected minor typos in commit
message.

Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
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>