platform/adaptation/renesas_rcar/renesas_kernel.git
10 years agoMerge tag 'msm-cleanup-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git...
Kevin Hilman [Thu, 17 Oct 2013 21:49:20 +0000 (14:49 -0700)]
Merge tag 'msm-cleanup-for-3.13' of git://git./linux/kernel/git/davidb/linux-msm into next/cleanup

From David Brown:
General cleanups for MSM for 3.13

Some small cleanups for MSM.  Removes extraneous irq definitions that
aren't used on DT targets, moves the single existing board file to
board-dt.c in antipication of additional targets, and renames the
existing DT files to have a common 'qcom' prefix.

* tag 'msm-cleanup-for-3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/davidb/linux-msm:
  ARM: msm: Rename msm devicetrees to have standard 'qcom' prefix
  ARM: msm: Create a common board-dt and config ARCH_MSM_DT
  ARM: msm: Remove irqs-*.h files for DT based targets

Signed-off-by: Kevin Hilman <khilman@linaro.org>
10 years agoARM: Remove temporary sched_clock.h header
Stephen Boyd [Thu, 3 Oct 2013 19:49:43 +0000 (12:49 -0700)]
ARM: Remove temporary sched_clock.h header

This header file is no longer needed now that the ARM sched_clock
framework is generic and all users have moved to linux/sched_clock.h
instead of asm/sched_clock.h. Remove it.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
10 years agoARM: clps711x: Use linux/sched_clock.h
Stephen Boyd [Thu, 3 Oct 2013 19:49:42 +0000 (12:49 -0700)]
ARM: clps711x: Use linux/sched_clock.h

The sched_clock.h include is under include/linux now.

Cc: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Kevin Hilman <khilman@linaro.org>
10 years agoMerge tag 'renesas-cleanup2-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel...
Kevin Hilman [Thu, 10 Oct 2013 22:42:03 +0000 (15:42 -0700)]
Merge tag 'renesas-cleanup2-for-v3.13' of git://git./linux/kernel/git/horms/renesas into next/cleanup

From Simon Horman:
Second round of Renesas ARM based SoC cleanups for v3.13

* Constify platform data and resources in lager board code
* Clean up registration of VIN and sh_eth in r8a7778 SoC and
   bockw board code
* Make r8a7778_register_hspi() static in r8a7778 SoC code

* tag 'renesas-cleanup2-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: lager: Constify platform data and resources
  ARM: shmobile: r8a7778: r8a7778_register_hspi() become static
  ARM: shmobile: r8a7778: cleanup registration of sh_eth
  ARM: shmobile: r8a7778: cleanup registration of vin

Signed-off-by: Kevin Hilman <khilman@linaro.org>
Conflicts:
arch/arm/mach-shmobile/board-lager.c

10 years agoclk: nomadik: fix missing __init on nomadik_src_init
Sebastian Hesselbarth [Mon, 7 Oct 2013 17:53:13 +0000 (19:53 +0200)]
clk: nomadik: fix missing __init on nomadik_src_init

nomadik_src_init references __initconst sections but lacks an __init
itself. Add __init to fix the section mismatch.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge tag 'renesas-cleanup-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Mon, 7 Oct 2013 17:55:23 +0000 (10:55 -0700)]
Merge tag 'renesas-cleanup-for-v3.13' of git://git./linux/kernel/git/horms/renesas into next/cleanup

From Simon Horman:
Renesas ARM based SoC cleanups for v3.13

* Constify platform data and resources of r8a7790 SoC
* Rename to r8a7790_init_delay() as r8a7790_init_early()
  - This is in preparation for doing more than just initialising the delay
* Rename r8a73a4_init_delay() as r8a73a4_init_early()
  - This is in preparation for doing more than just initialising the delay

* tag 'renesas-cleanup-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: r8a7790: Constify platform data and resources
  ARM: shmobile: Rename to r8a7790_init_early()
  ARM: shmobile: Rename to r8a73a4_init_early()

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge tag 'renesas-fixes5-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Mon, 7 Oct 2013 17:47:34 +0000 (10:47 -0700)]
Merge tag 'renesas-fixes5-for-v3.12' of git://git./linux/kernel/git/horms/renesas into next/cleanup

From Simon Horman:

* Correct incorrect placement of __initdata tag in ape6evm board code

* tag 'renesas-fixes5-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: ape6evm: fix incorrect placement of __initdata tag
  (+ other patches already present in v3.12-rc4)

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: drop explicit selection of HAVE_CLK and CLKDEV_LOOKUP
Uwe Kleine-König [Tue, 1 Oct 2013 09:08:56 +0000 (11:08 +0200)]
ARM: drop explicit selection of HAVE_CLK and CLKDEV_LOOKUP

CLKDEV_LOOKUP selects HAVE_CLK and COMMON_CLK selects CLKDEV_LOOKUP. So
all symbols that select at least two of these symbols can be simplified.

For imx, omap2 and ux500 some rearrangements were necessary before the
simplification.

Acked-by: Tony Lindgren <tony@atomide.com>
Acked-by: Stephen Boyd <sboyd@codeaurora.org>
Acked-by: Dinh Nguyen <dinguyen@altera.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Pawel Moll <pawel.moll@arm.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge branch 'clk-of-init-v2_for-3.13' of https://github.com/shesselba/linux-dove...
Olof Johansson [Mon, 7 Oct 2013 16:47:31 +0000 (09:47 -0700)]
Merge branch 'clk-of-init-v2_for-3.13' of https://github.com/shesselba/linux-dove into next/cleanup

From Sebastian Hasselbarth:

This is a patch set based on an RFC [1][2] sent earlier to provide
a common arch/arm init for DT clock providers. Currently, the call to
of_clk_init(NULL) to initialize DT clock providers is spread among several
mach-dirs. Since most machs require DT clocks initialized before timers,
no initcall can be used.

By adding of_clk_init(NULL) to arch/arm time_init(), we can remove all
mach-specific .init_time hooks that basically called of_clk_init and
clocksource_of_init.

In contrast to the RFC version, of_clk_init(NULL) is now only called if
no custom .init_time callback is set. This allows some machs to still
call clock init themselves, as not all can be converted now. Therefore,
this patch sets drops conversion of mach-mvebu and mach-zynq. New machs
that were introduced with v3.12-rc1 are also converted, except mach-u300
that requires clocks before irqs.

* 'clk-of-init-v2_for-3.13' of https://github.com/shesselba/linux-dove: (29 commits)
  ARM: vt8500: remove custom .init_time hook
  ARM: vexpress: remove custom .init_time hook
  ARM: tegra: remove custom .init_time hook
  ARM: sunxi: remove custom .init_time hook
  ARM: sti: remove custom .init_time hook
  ARM: socfpga: remove custom .init_time hook
  ARM: rockchip: remove custom .init_time hook
  ARM: prima2: remove custom .init_time hook
  ARM: nspire: remove custom .init_time hook
  ARM: nomadik: remove custom .init_time hook
  ARM: mxs: remove custom .init_time hook
  ARM: kirkwood: remove custom .init_time hook
  ARM: imx: remove custom .init_time hook
  ARM: highbank: remove custom .init_time hook
  ARM: exynos: remove custom .init_time hook
  ARM: dove: remove custom .init_time hook
  ARM: bcm2835: remove custom .init_time hook
  ARM: bcm: provide common arch init for DT clocks
  ARM: call of_clk_init from default time_init handler
  ARM: vt8500: prepare for arch-wide .init_time callback
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: shmobile: ape6evm: fix incorrect placement of __initdata tag
Bartlomiej Zolnierkiewicz [Mon, 30 Sep 2013 15:34:36 +0000 (17:34 +0200)]
ARM: shmobile: ape6evm: fix incorrect placement of __initdata tag

__initdata tag should be placed between the variable name and equal
sign for the variable to be placed in the intended .init.data section.

Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: lager: Constify platform data and resources
Laurent Pinchart [Wed, 7 Aug 2013 22:43:00 +0000 (00:43 +0200)]
ARM: shmobile: lager: Constify platform data and resources

Platform data and resources for Lager devices are kmemdup()ed when the
corresponding devices are registered and can thus be declared as const.
Do so.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: vt8500: remove custom .init_time hook
Sebastian Hesselbarth [Wed, 4 Sep 2013 12:12:46 +0000 (14:12 +0200)]
ARM: vt8500: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
10 years agoARM: vexpress: remove custom .init_time hook
Sebastian Hesselbarth [Tue, 27 Aug 2013 13:34:12 +0000 (15:34 +0200)]
ARM: vexpress: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks. The call to versatile_sched_clock_init
is moved to .init_early instead, were it is also for non-DT boards.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Jon Medhurst (Tixy) <tixy@linaro.org>
Acked-by: Pawel Moll <pawel.moll@arm.com>
10 years agoARM: tegra: remove custom .init_time hook
Sebastian Hesselbarth [Wed, 4 Sep 2013 11:42:55 +0000 (13:42 +0200)]
ARM: tegra: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Stephen Warren <swarren@nvidia.com>
10 years agoARM: sunxi: remove custom .init_time hook
Sebastian Hesselbarth [Fri, 6 Sep 2013 13:11:01 +0000 (15:11 +0200)]
ARM: sunxi: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
10 years agoARM: sti: remove custom .init_time hook
Sebastian Hesselbarth [Tue, 27 Aug 2013 13:23:07 +0000 (15:23 +0200)]
ARM: sti: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks. To get rid of it, move l2cc init to
.init_machine hook instead.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
10 years agoARM: socfpga: remove custom .init_time hook
Sebastian Hesselbarth [Wed, 4 Sep 2013 11:38:00 +0000 (13:38 +0200)]
ARM: socfpga: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Dinh Nguyen <dinguyen@altera.com>
10 years agoARM: rockchip: remove custom .init_time hook
Sebastian Hesselbarth [Tue, 27 Aug 2013 13:19:46 +0000 (15:19 +0200)]
ARM: rockchip: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
10 years agoARM: prima2: remove custom .init_time hook
Sebastian Hesselbarth [Wed, 4 Sep 2013 12:23:55 +0000 (14:23 +0200)]
ARM: prima2: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Barry Song <baohua.song@csr.com>
10 years agoARM: nspire: remove custom .init_time hook
Sebastian Hesselbarth [Tue, 27 Aug 2013 13:19:10 +0000 (15:19 +0200)]
ARM: nspire: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
10 years agoARM: nomadik: remove custom .init_time hook
Sebastian Hesselbarth [Wed, 4 Sep 2013 17:09:21 +0000 (19:09 +0200)]
ARM: nomadik: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: mxs: remove custom .init_time hook
Sebastian Hesselbarth [Wed, 4 Sep 2013 11:16:01 +0000 (13:16 +0200)]
ARM: mxs: remove custom .init_time hook

This patch converts clk-imx2[38] clocksource_of_init compatible init
associated with fsl,imx2[38]-clkctrl. With arch/arm calling
of_clk_init(NULL) from time_init(), we can now also remove custom
.init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
10 years agoARM: kirkwood: remove custom .init_time hook
Sebastian Hesselbarth [Tue, 27 Aug 2013 13:10:16 +0000 (15:10 +0200)]
ARM: kirkwood: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Jason Cooper <jason@lakedaemon.net>
10 years agoARM: imx: remove custom .init_time hook
Sebastian Hesselbarth [Tue, 27 Aug 2013 12:50:00 +0000 (14:50 +0200)]
ARM: imx: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
10 years agoARM: highbank: remove custom .init_time hook
Sebastian Hesselbarth [Tue, 27 Aug 2013 12:42:06 +0000 (14:42 +0200)]
ARM: highbank: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks. Highbank clock provider need a reference
to system registers, as a workaround current clk driver maps those
independent of arch code now.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Rob Herring <rob.herring@calxeda.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
10 years agoARM: exynos: remove custom .init_time hook
Sebastian Hesselbarth [Wed, 4 Sep 2013 10:45:59 +0000 (12:45 +0200)]
ARM: exynos: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks. While at it, also remove some now
redundant includes.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Reviewed-by: Tomasz Figa <t.figa@samsung.com>
10 years agoARM: dove: remove custom .init_time hook
Sebastian Hesselbarth [Fri, 6 Sep 2013 13:08:36 +0000 (15:08 +0200)]
ARM: dove: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks. While at it, also remove some obsolete
includes.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Tested-by: Andrew Lunn <andrew@lunn.ch>
Acked-by: Jason Cooper <jason@lakedaemon.net>
10 years agoARM: bcm2835: remove custom .init_time hook
Sebastian Hesselbarth [Mon, 16 Sep 2013 22:38:10 +0000 (00:38 +0200)]
ARM: bcm2835: remove custom .init_time hook

With arch/arm calling of_clk_init(NULL) from time_init(), we can now
remove custom .init_time hooks. Also remove call to of_clk_init from
clk-bcm2835 with core fixed_clock match, as this has already been
registered now.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
10 years agoARM: bcm: provide common arch init for DT clocks
Matt Porter [Fri, 20 Sep 2013 19:16:14 +0000 (15:16 -0400)]
ARM: bcm: provide common arch init for DT clocks

With arch/arm calling of_clk_init(NULL) and clocksource_of_init()
this is no longer needed. The former is useful because we can make
use of dummy fixed clocks for drivers until the bcm281xx common
clock driver is ready.

Signed-off-by: Matt Porter <matt.porter@linaro.org>
Reviewed-by: Markus Mayer <markus.mayer@linaro.org>
Acked-by: Christian Daudt <csd@broadcom.com>
10 years agoARM: call of_clk_init from default time_init handler
Sebastian Hesselbarth [Wed, 4 Sep 2013 10:24:03 +0000 (12:24 +0200)]
ARM: call of_clk_init from default time_init handler

Most DT ARM machs require common clock providers initialized before timers.
Currently, arch/arm machs use .init_time to call of_clk_init right before
clocksource_of_init. This prevents to remove that callback and use the default
one instead.

This patch adds a call to of_clk_init() to the default .init_time callback
for COMMON_CLK enabled machs to allow to remove custom callbacks where applicable.
While at it, also reorder includes alphabetically.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
10 years agoARM: vt8500: prepare for arch-wide .init_time callback
Sebastian Hesselbarth [Wed, 4 Sep 2013 12:09:39 +0000 (14:09 +0200)]
ARM: vt8500: prepare for arch-wide .init_time callback

Current vt8500 board init calls of_clk_init() from vtwm_clk_init. To allow
consolidation of DT driven .time_init, move of_clock_init() to a temporary
.time_init callback that will be removed when arch-wide callback is available.
With previous pmc_base parsing helper for vt8500 clock providers, we can also
safely remove the call to vtwm_clk_init() and get rid of some includes.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: vt8500: parse pmc_base from clock driver
Sebastian Hesselbarth [Wed, 4 Sep 2013 11:58:11 +0000 (13:58 +0200)]
clk: vt8500: parse pmc_base from clock driver

Currently, clock providers for vt8500 depend on machine_init providing
pmc_base address before calling of_clk_init. With upcoming arch-wide
.time_init calling of_clk_init, we should make clock providers independent
of mach code. This adds a pmc_base parsing helper to current clock provider
that gets called if there is no pmc_base set, yet.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Tony Prisk <linux@prisktech.co.nz>
Acked-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: sunxi: declare OF clock provider
Sebastian Hesselbarth [Fri, 6 Sep 2013 12:59:57 +0000 (14:59 +0200)]
clk: sunxi: declare OF clock provider

Common clock framework allows to register clock providers to get called
on of_clk_init() by using CLK_OF_DECLARE. This converts sunxi clock
providers to make use of it and get rid of the mach specific clk init
call. As sunxi has a bunch of independent clk provider nodes, we hook
current clock init to board compatible to make it called once.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
10 years agoARM: socfgpa: prepare for arch-wide .init_time callback
Sebastian Hesselbarth [Wed, 4 Sep 2013 11:35:50 +0000 (13:35 +0200)]
ARM: socfgpa: prepare for arch-wide .init_time callback

Current socfpga board init calls of_clk_init() from .machine_init. To
allow consolidation of DT driven .time_init, move of_clock_init() to
a temporary .time_init that will be removed when arch-wide callback is
available.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Dinh Nguyen <dinguyen@altera.com>
10 years agoclk: prima2: declare OF clock provider
Sebastian Hesselbarth [Wed, 4 Sep 2013 12:21:18 +0000 (14:21 +0200)]
clk: prima2: declare OF clock provider

Common clock framework allows to register clock providers to get called
on of_clk_init() by using CLK_OF_DECLARE. This converts prima2 clock
provider to make use of it and get rid of the mach specific clk init
call.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Barry Song <baohua.song@csr.com>
Acked-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: nomadik: declare OF clock provider
Sebastian Hesselbarth [Mon, 16 Sep 2013 22:32:34 +0000 (00:32 +0200)]
clk: nomadik: declare OF clock provider

Common clock framework allows to register clock providers to get called
on of_clk_init() by using CLK_OF_DECLARE. This converts nomadik clock
provider to make use of it and get rid of the mach specific clk init
call. As clocks require system reset controller base address to be
initialized each clock driver checks src_base and calls new
nomadik_src_init if required.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
10 years agoclk: nomadik: move src init out of nomadik_clk_init
Sebastian Hesselbarth [Sun, 22 Sep 2013 16:17:28 +0000 (18:17 +0200)]
clk: nomadik: move src init out of nomadik_clk_init

nomadik_clk_init currently also maps system reset controller base address
used by clocks and registers a reboot notifier. To allow further cleanup of
nomadik clk setup, this moves system reset controller setup from
nomadik_clk_init to its own function.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mike Turquette <mturquette@linaro.org>
10 years agoARM: nomadik: remove mtu initalization from .init_time
Sebastian Hesselbarth [Wed, 4 Sep 2013 16:31:14 +0000 (18:31 +0200)]
ARM: nomadik: remove mtu initalization from .init_time

Nomadik clock initialization is properly done in clk-nomadik since
patch "clk: nomadik: set all timers to use 2.4 MHz TIMCLK".
Therefore, this patch removes now redundant mtu initialization from
.init_time callback.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoMerge tag 'del-shark-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Thu, 26 Sep 2013 04:55:46 +0000 (21:55 -0700)]
Merge tag 'del-shark-for-v3.13' of git://git./linux/kernel/git/linusw/linux-stericsson into next/cleanup

From Linus Walleij:

This deletes the Shark SA110-based sub-architecture from
the kernel.

* tag 'del-shark-for-v3.13' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-stericsson:
  video: drop code for ARCH_SHARK in cyber2000fb
  input: i8042: drop dependency on ARCH_SHARK
  ide: drop dependency on ARCH_SHARK
  block: drop dependency on ARCH_SHARK
  MAINTAINERS: delete Shark machine entry
  ARM: delete mach-shark

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoMerge tag 'for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
Olof Johansson [Thu, 26 Sep 2013 04:21:38 +0000 (21:21 -0700)]
Merge tag 'for-arm-soc' of git://git./linux/kernel/git/linusw/linux-nomadik into next/cleanup

From Linus Walleij:

These three patches tear out the remaining AUXDATA in the
Nomadik platform and replace it with device tree.

Corresponding driver changes are coming from respective
subsystem tree and there are no build dependencies.

- Update device tree for VMMC regulator data
- Supply SD/MMC voltage from the VMMC regulator
- Delete auxdata for SD/MMC card and rely on DT only
- Update device tree for FSMC NAND merged for v3.12-rc1
- Delete auxdata for FSMC NAND

* tag 'for-arm-soc' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-nomadik:
  ARM: nomadik: delete FSMC platform data
  ARM: nomadik: delete MMCI platform data
  ARM: nomadik: register VMMC regulator

Signed-off-by: Olof Johansson <olof@lixom.net>
10 years agoARM: shmobile: r8a7778: r8a7778_register_hspi() become static
Kuninori Morimoto [Tue, 24 Sep 2013 06:04:37 +0000 (23:04 -0700)]
ARM: shmobile: r8a7778: r8a7778_register_hspi() become static

r8a7778_register_hspi() used only from setup-r8a7778.c
it can be static

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7778: cleanup registration of sh_eth
Kuninori Morimoto [Tue, 24 Sep 2013 06:04:21 +0000 (23:04 -0700)]
ARM: shmobile: r8a7778: cleanup registration of sh_eth

sh_eth driver which needs platform data at the time of
registration is used from BockW only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: r8a7778: cleanup registration of vin
Kuninori Morimoto [Tue, 24 Sep 2013 06:04:10 +0000 (23:04 -0700)]
ARM: shmobile: r8a7778: cleanup registration of vin

vin driver which needs platform data at the time of
registration is used from BockW only.
Now, ARM/shmobile aims to support DT,
and the C code base board support will be removed
if DT support is completed.
Current driver registration method which needs platform data
and which is not shared complicates codes.
This means legacy C code cleanup after DT supporting
will be more complicated
This patch registers it on board code as cleanup C code

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: msm: Rename msm devicetrees to have standard 'qcom' prefix
Kumar Gala [Tue, 17 Sep 2013 15:51:43 +0000 (10:51 -0500)]
ARM: msm: Rename msm devicetrees to have standard 'qcom' prefix

Use a standard 'qcom' prefix to denotate device trees meant for Qualcomm
based processors.

Signed-off-by: Kumar Gala <galak@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
10 years agoARM: msm: Create a common board-dt and config ARCH_MSM_DT
Rohit Vaswani [Mon, 9 Sep 2013 23:24:54 +0000 (16:24 -0700)]
ARM: msm: Create a common board-dt and config ARCH_MSM_DT

Create a config ARCH_MSM_DT and common board-dt.c
to encapsulate the MSM DT based targets.

Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
10 years agoARM: msm: Remove irqs-*.h files for DT based targets
Stephen Boyd [Mon, 9 Sep 2013 23:24:53 +0000 (16:24 -0700)]
ARM: msm: Remove irqs-*.h files for DT based targets

We don't want or need the irqs.h files from the DT based MSM
targets. Remove these header files and select sparse irq so that
we don't try to include the mach/irqs.h file.

Reviewed-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
10 years agovideo: drop code for ARCH_SHARK in cyber2000fb
Linus Walleij [Tue, 3 Sep 2013 10:02:16 +0000 (12:02 +0200)]
video: drop code for ARCH_SHARK in cyber2000fb

The Cyber2000 frame buffer driver contains a block of code solely
for the Shark machine. As the machine is deleted, delete this
code as well.

Also remove the pointless #ifdef CONFIG_PCI as the Kconfig
clearly states PCI as a dependency anyway.

Cc: Russell King <linux@arm.linux.org.uk>
Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com>
Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoinput: i8042: drop dependency on ARCH_SHARK
Linus Walleij [Tue, 3 Sep 2013 09:50:31 +0000 (11:50 +0200)]
input: i8042: drop dependency on ARCH_SHARK

Delete the configuration option for the Shark machine from
the i8042 Kconfig, as the machine is deleted from the kernel.

Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoide: drop dependency on ARCH_SHARK
Linus Walleij [Tue, 3 Sep 2013 09:45:43 +0000 (11:45 +0200)]
ide: drop dependency on ARCH_SHARK

This drops the selection of default IDE chipset for the Shark
machine as it has been deleted.

Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoblock: drop dependency on ARCH_SHARK
Linus Walleij [Tue, 3 Sep 2013 09:43:10 +0000 (11:43 +0200)]
block: drop dependency on ARCH_SHARK

With this machine deleted, there is no need to maintain the
MFM block driver for its hard disk either.

Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: nomadik: delete FSMC platform data
Linus Walleij [Fri, 13 Sep 2013 19:15:14 +0000 (21:15 +0200)]
ARM: nomadik: delete FSMC platform data

We now have device tree support for setting the NAND timings
for FSMC from the device tree, so delete the last piece of
platform data and auxdata.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: nomadik: delete MMCI platform data
Linus Walleij [Wed, 7 Aug 2013 08:41:16 +0000 (10:41 +0200)]
ARM: nomadik: delete MMCI platform data

Now that we have a proper regulator set up for the MMCI driver
and managed through the device tree, we no longer need the
platform data providing the OCR voltages for the MMCI block.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoARM: nomadik: register VMMC regulator
Linus Walleij [Tue, 28 May 2013 13:55:56 +0000 (15:55 +0200)]
ARM: nomadik: register VMMC regulator

This adds the STw481x VMMC regulator to the Nomadik
device tree.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoLinux 3.12-rc2
Linus Torvalds [Mon, 23 Sep 2013 22:41:09 +0000 (15:41 -0700)]
Linux 3.12-rc2

10 years agoMerge tag 'staging-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Mon, 23 Sep 2013 19:53:07 +0000 (12:53 -0700)]
Merge tag 'staging-3.12-rc2' of git://git./linux/kernel/git/gregkh/staging

Pull staging fixes from Greg KH:
 "Here are a number of small staging tree and iio driver fixes.  Nothing
  major, just lots of little things"

* tag 'staging-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (34 commits)
  iio:buffer_cb: Add missing iio_buffer_init()
  iio: Prevent race between IIO chardev opening and IIO device free
  iio: fix: Keep a reference to the IIO device for open file descriptors
  iio: Stop sampling when the device is removed
  iio: Fix crash when scan_bytes is computed with active_scan_mask == NULL
  iio: Fix mcp4725 dev-to-indio_dev conversion in suspend/resume
  iio: Fix bma180 dev-to-indio_dev conversion in suspend/resume
  iio: Fix tmp006 dev-to-indio_dev conversion in suspend/resume
  iio: iio_device_add_event_sysfs() bugfix
  staging: iio: ade7854-spi: Fix return value
  staging:iio:hmc5843: Fix measurement conversion
  iio: isl29018: Fix uninitialized value
  staging:iio:dummy fix kfifo_buf kconfig dependency issue if kfifo modular and buffer enabled for built in dummy driver.
  iio: at91: fix adc_clk overflow
  staging: line6: add bounds check in snd_toneport_source_put()
  Staging: comedi: Fix dependencies for drivers misclassified as PCI
  staging: r8188eu: Adjust RX gain
  staging: r8188eu: Fix smatch warning in core/rtw_ieee80211.
  staging: r8188eu: Fix smatch error in core/rtw_mlme_ext.c
  staging: r8188eu: Fix Smatch off-by-one warning in hal/rtl8188e_hal_init.c
  ...

10 years agoMerge tag 'usb-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Linus Torvalds [Mon, 23 Sep 2013 19:52:35 +0000 (12:52 -0700)]
Merge tag 'usb-3.12-rc2' of git://git./linux/kernel/git/gregkh/usb

Pull USB fixes from Greg KH:
 "Here are a number of small USB fixes for 3.12-rc2.

  One is a revert of a EHCI change that isn't quite ready for 3.12.
  Others are minor things, gadget fixes, Kconfig fixes, and some quirks
  and documentation updates.

  All have been in linux-next for a bit"

* tag 'usb-3.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
  USB: pl2303: distinguish between original and cloned HX chips
  USB: Faraday fotg210: fix email addresses
  USB: fix typo in usb serial simple driver Kconfig
  Revert "USB: EHCI: support running URB giveback in tasklet context"
  usb: s3c-hsotg: do not disconnect gadget when receiving ErlySusp intr
  usb: s3c-hsotg: fix unregistration function
  usb: gadget: f_mass_storage: reset endpoint driver data when disabled
  usb: host: fsl-mph-dr-of: Staticize local symbols
  usb: gadget: f_eem: Staticize eem_alloc
  usb: gadget: f_ecm: Staticize ecm_alloc
  usb: phy: omap-usb3: Fix return value
  usb: dwc3: gadget: avoid memory leak when failing to allocate all eps
  usb: dwc3: remove extcon dependency
  usb: gadget: add '__ref' for rndis_config_register() and cdc_config_register()
  usb: dwc3: pci: add support for BayTrail
  usb: gadget: cdc2: fix conversion to new interface of f_ecm
  usb: gadget: fix a bug and a WARN_ON in dummy-hcd
  usb: gadget: mv_u3d_core: fix violation of locking discipline in mv_u3d_ep_disable()

10 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Mon, 23 Sep 2013 02:51:49 +0000 (19:51 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 - some small fixes for msm and exynos
 - a regression revert affecting nouveau users with old userspace
 - intel pageflip deadlock and gpu hang fixes, hsw modesetting hangs

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (22 commits)
  Revert "drm: mark context support as a legacy subsystem"
  drm/i915: Don't enable the cursor on a disable pipe
  drm/i915: do not update cursor in crtc mode set
  drm/exynos: fix return value check in lowlevel_buffer_allocate()
  drm/exynos: Fix address space warnings in exynos_drm_fbdev.c
  drm/exynos: Fix address space warning in exynos_drm_buf.c
  drm/exynos: Remove redundant OF dependency
  drm/msm: drop unnecessary set_need_resched()
  drm/i915: kill set_need_resched
  drm/msm: fix potential NULL pointer dereference
  drm/i915/dvo: set crtc timings again for panel fixed modes
  drm/i915/sdvo: Robustify the dtd<->drm_mode conversions
  drm/msm: workaround for missing irq
  drm/msm: return -EBUSY if bo still active
  drm/msm: fix return value check in ERR_PTR()
  drm/msm: fix cmdstream size check
  drm/msm: hangcheck harder
  drm/msm: handle read vs write fences
  drm/i915/sdvo: Fully translate sync flags in the dtd->mode conversion
  drm/i915: Use proper print format for debug prints
  ...

10 years agoMerge branch 'for-3.12/core' of git://git.kernel.dk/linux-block
Linus Torvalds [Sun, 22 Sep 2013 22:00:11 +0000 (15:00 -0700)]
Merge branch 'for-3.12/core' of git://git.kernel.dk/linux-block

Pull block IO fixes from Jens Axboe:
 "After merge window, no new stuff this time only a collection of neatly
  confined and simple fixes"

* 'for-3.12/core' of git://git.kernel.dk/linux-block:
  cfq: explicitly use 64bit divide operation for 64bit arguments
  block: Add nr_bios to block_rq_remap tracepoint
  If the queue is dying then we only call the rq->end_io callout. This leaves bios setup on the request, because the caller assumes when the blk_execute_rq_nowait/blk_execute_rq call has completed that the rq->bios have been cleaned up.
  bio-integrity: Fix use of bs->bio_integrity_pool after free
  blkcg: relocate root_blkg setting and clearing
  block: Convert kmalloc_node(...GFP_ZERO...) to kzalloc_node(...)
  block: trace all devices plug operation

10 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
Linus Torvalds [Sun, 22 Sep 2013 21:58:49 +0000 (14:58 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/mason/linux-btrfs

Pull btrfs fixes from Chris Mason:
 "These are mostly bug fixes and a two small performance fixes.  The
  most important of the bunch are Josef's fix for a snapshotting
  regression and Mark's update to fix compile problems on arm"

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (25 commits)
  Btrfs: create the uuid tree on remount rw
  btrfs: change extent-same to copy entire argument struct
  Btrfs: dir_inode_operations should use btrfs_update_time also
  btrfs: Add btrfs: prefix to kernel log output
  btrfs: refuse to remount read-write after abort
  Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0
  Btrfs: don't leak transaction in btrfs_sync_file()
  Btrfs: add the missing mutex unlock in write_all_supers()
  Btrfs: iput inode on allocation failure
  Btrfs: remove space_info->reservation_progress
  Btrfs: kill delay_iput arg to the wait_ordered functions
  Btrfs: fix worst case calculator for space usage
  Revert "Btrfs: rework the overcommit logic to be based on the total size"
  Btrfs: improve replacing nocow extents
  Btrfs: drop dir i_size when adding new names on replay
  Btrfs: replay dir_index items before other items
  Btrfs: check roots last log commit when checking if an inode has been logged
  Btrfs: actually log directory we are fsync()'ing
  Btrfs: actually limit the size of delalloc range
  Btrfs: allocate the free space by the existed max extent size when ENOSPC
  ...

10 years agocfq: explicitly use 64bit divide operation for 64bit arguments
Anatol Pomozov [Sun, 22 Sep 2013 18:43:47 +0000 (12:43 -0600)]
cfq: explicitly use 64bit divide operation for 64bit arguments

'samples' is 64bit operant, but do_div() second parameter is 32.
do_div silently truncates high 32 bits and calculated result
is invalid.

In case if low 32bit of 'samples' are zeros then do_div() produces
kernel crash.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
10 years agoclk: nomadik: set all timers to use 2.4 MHz TIMCLK
Linus Walleij [Fri, 13 Sep 2013 19:45:51 +0000 (21:45 +0200)]
clk: nomadik: set all timers to use 2.4 MHz TIMCLK

This fixes a regression for the Nomadik on the main system
timers.

The Nomadik seemed a bit slow and its heartbeat wasn't looking
healthy. And it was not strange, because it has been connected
to the 32768 Hz clock at boot, while being told by the clock driver
that it was 2.4MHz. Actually connect the TIMCLK to 2.4MHz by
default as this is what we want for nice scheduling, clocksource
and clock event.

Cc: stable@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
10 years agoMerge tag 'tegra-for-3.13-deps-for-arm-init-time-cleanup' of git://git.kernel.org...
Sebastian Hesselbarth [Sun, 22 Sep 2013 17:48:48 +0000 (19:48 +0200)]
Merge tag 'tegra-for-3.13-deps-for-arm-init-time-cleanup' of git://git./linux/kernel/git/swarren/linux-tegra into clk-of-init-v2_for-3.13

ARM: tegra: dependencies for ARM .init_time cleanup

This patch is a dependency for Sebastian Hesselbarth's series that
cleans up the ARM machine descriptor's .init_time hook. It may also end
up being a dependency for cleanup/development in the Tegra tree, and
hence is contained in its own topic branch, to allow conflicts to be
easily resolved.

10 years agoARM: shmobile: Remove #gpio-ranges-cells DT property
Laurent Pinchart [Wed, 11 Sep 2013 13:51:02 +0000 (15:51 +0200)]
ARM: shmobile: Remove #gpio-ranges-cells DT property

This property is no longer required by the GPIO binding. Remove it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agogpio: rcar: Remove #gpio-range-cells DT property usage
Laurent Pinchart [Wed, 11 Sep 2013 13:51:01 +0000 (15:51 +0200)]
gpio: rcar: Remove #gpio-range-cells DT property usage

Commit a1bc260bb5f5d95da854be7898202d788e94448d ("gpio: clean up
gpio-ranges documentation") deprecated the #gpio-range-cells property.
Replace its usage with a hardcoded value in the gpio-rcar driver.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: armadillo: fixup ether pinctrl naming
Kuninori Morimoto [Mon, 2 Sep 2013 03:33:49 +0000 (20:33 -0700)]
ARM: shmobile: armadillo: fixup ether pinctrl naming

e5c9b4cd665106d9b5397114ea81a53059410b6a ("sh_eth: get R8A7740 support
out of #ifdef") exchanged sh-eth driver name to r8a7740-gether, but,
eva_pinctrl_map[] didn't follow it. Fixes it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoMerge tag 'iio-fixes-for-3.12a' of git://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Sat, 21 Sep 2013 23:45:36 +0000 (16:45 -0700)]
Merge tag 'iio-fixes-for-3.12a' of git://git./linux/kernel/git/jic23/iio into staging-linus

Jonathan writes:

First round of IIO fixes for 3.12

A series of wrong 'struct dev' assumptions in suspend/resume callbacks
following on from this issue being identified in a new driver review.
One to watch out for in future.

A number of driver specific fixes
1) at91 - fix a overflow in clock rate computation
2) dummy - Kconfig dependency issue
3) isl29018 - uninitialized value
4) hmc5843 - measurement conversion bug introduced by recent cleanup.
5) ade7854-spi - wrong return value.

Some IIO core fixes
1) Wrong value picked up for event code creation for a modified channel
2) A null dereference on failure to initialize a buffer after no buffer has
   been in use, when using the available_scan_masks approach.
3) Sampling not stopped when a device is removed. Effects forced removal
   such as hot unplugging.
4) Prevent device going away if a chrdev is still open in userspace.
5) Prevent race on chardev opening and device being freed.
6) Add a missing iio_buffer_init in the call back buffer.

These last few are the first part of a set from Lars-Peter Clausen who
has been taking a closer look at our removal paths and buffer handling
than anyone has for quite some time.

10 years agoMerge tag 'nfs-for-3.12-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Linus Torvalds [Sat, 21 Sep 2013 22:59:41 +0000 (15:59 -0700)]
Merge tag 'nfs-for-3.12-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfix from Trond Myklebust:
 "Fix a regression due to incorrect sharing of gss auth caches"

* tag 'nfs-for-3.12-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
  RPCSEC_GSS: fix crash on destroying gss auth

10 years agoblock: Add nr_bios to block_rq_remap tracepoint
Jun'ichi Nomura [Sat, 21 Sep 2013 19:57:47 +0000 (13:57 -0600)]
block: Add nr_bios to block_rq_remap tracepoint

Adding the number of bios in a remapped request to 'block_rq_remap'
tracepoint.

Request remapper clones bios in a request to track the completion
status of each bio. So the number of bios can be useful information
for investigation.

Related discussions:
  http://www.redhat.com/archives/dm-devel/2013-August/msg00084.html
  http://www.redhat.com/archives/dm-devel/2013-September/msg00024.html

Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com>
Acked-by: Mike Snitzer <snitzer@redhat.com>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
10 years agoARM: shmobile: Lager: add Micrel KSZ8041 PHY fixup
Sergei Shtylyov [Sat, 14 Sep 2013 00:29:22 +0000 (04:29 +0400)]
ARM: shmobile: Lager: add Micrel KSZ8041 PHY fixup

Currently on the Lager board NFS timeouts/delays are seen when booting.  That
turned out to happen because the SoC's ETH_LINK signal turns on and off after
each packet.  It is connected to Micrel KSZ8041 PHY's LED0 signal. Ether LEDs
on the Lager board are named LINK and ACTIVE which corresponds to non-default
01 setting of the PHY control register 1 bits 14-15. The 'sh_eth' driver resets
the PHY when opening the network device, so we have to set the mentioned bits
back to 01 from the default 00 value which causes bouncing of ETH_LINK.  That
can be achieved using the PHY platform fixup mechanism if we also modify the
driver to use it..

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoARM: shmobile: update SDHI DT compatibility string to the <unit>-<soc> format
Guennadi Liakhovetski [Thu, 29 Aug 2013 15:14:49 +0000 (17:14 +0200)]
ARM: shmobile: update SDHI DT compatibility string to the <unit>-<soc> format

Currently DT compatibility strings of both types can be found in the kernel
sources: <unit>-<soc> and <soc>-<unit>, whereas a unique format should be
followed and the former one is preferred. This patch converts the SDHI
MMC driver and its users to the common standard. This is safe for now, since
ATM no real products are using this driver with DT.

Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
Acked-by: Chris Ball <cjb@laptop.org>
[Removed r8a7740.dtsi portion as it is not applicable]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
10 years agoBtrfs: create the uuid tree on remount rw
Josef Bacik [Sat, 21 Sep 2013 02:33:20 +0000 (22:33 -0400)]
Btrfs: create the uuid tree on remount rw

Users have been complaining of the uuid tree stuff warning that there is no uuid
root when trying to do snapshot operations.  This is because if you mount -o ro
we will not create the uuid tree.  But then if you mount -o rw,remount we will
still not create it and then any subsequent snapshot/subvol operations you try
to do will fail gloriously.  Fix this by creating the uuid_root on remount rw if
it was not already there.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agobtrfs: change extent-same to copy entire argument struct
Mark Fasheh [Tue, 17 Sep 2013 22:43:54 +0000 (15:43 -0700)]
btrfs: change extent-same to copy entire argument struct

btrfs_ioctl_file_extent_same() uses __put_user_unaligned() to copy some data
back to it's argument struct. Unfortunately, not all architectures provide
__put_user_unaligned(), so compiles break on them if btrfs is selected.

Instead, just copy the whole struct in / out at the start and end of
operations, respectively.

Signed-off-by: Mark Fasheh <mfasheh@suse.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: dir_inode_operations should use btrfs_update_time also
Guangyu Sun [Mon, 16 Sep 2013 17:42:03 +0000 (10:42 -0700)]
Btrfs: dir_inode_operations should use btrfs_update_time also

Commit 2bc5565286121d2a77ccd728eb3484dff2035b58 (Btrfs: don't update atime on
RO subvolumes) ensures that the access time of an inode is not updated when
the inode lives in a read-only subvolume.
However, if a directory on a read-only subvolume is accessed, the atime is
updated. This results in a write operation to a read-only subvolume. I
believe that access times should never be updated on read-only subvolumes.

To reproduce:

 # mkfs.btrfs -f /dev/dm-3
 (...)
 # mount /dev/dm-3 /mnt
 # btrfs subvol create /mnt/sub
  Create subvolume '/mnt/sub'
 # mkdir /mnt/sub/dir
 # echo "abc" > /mnt/sub/dir/file
 # btrfs subvol snapshot -r /mnt/sub /mnt/rosnap
  Create a readonly snapshot of '/mnt/sub' in '/mnt/rosnap'
 # stat /mnt/rosnap/dir
  File: `/mnt/rosnap/dir'
  Size: 8         Blocks: 0          IO Block: 4096   directory
 Device: 16h/22d    Inode: 257         Links: 1
 Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
  Access: 2013-09-11 07:21:49.389157126 -0400
  Modify: 2013-09-11 07:22:02.330156079 -0400
  Change: 2013-09-11 07:22:02.330156079 -0400
 # ls /mnt/rosnap/dir
  file
 # stat /mnt/rosnap/dir
  File: `/mnt/rosnap/dir'
  Size: 8         Blocks: 0          IO Block: 4096   directory
 Device: 16h/22d    Inode: 257         Links: 1
 Access: (0755/drwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/    root)
  Access: 2013-09-11 07:22:56.797151670 -0400
  Modify: 2013-09-11 07:22:02.330156079 -0400
  Change: 2013-09-11 07:22:02.330156079 -0400

Reported-by: Koen De Wit <koen.de.wit@oracle.com>
Signed-off-by: Guangyu Sun <guangyu.sun@oracle.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agobtrfs: Add btrfs: prefix to kernel log output
Frank Holton [Fri, 13 Sep 2013 15:46:50 +0000 (11:46 -0400)]
btrfs: Add btrfs: prefix to kernel log output

The kernel log entries for device label %s and device fsid %pU
are missing the btrfs: prefix. Add those here.

Signed-off-by: Frank Holton <fholton@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agobtrfs: refuse to remount read-write after abort
David Sterba [Fri, 13 Sep 2013 15:41:20 +0000 (17:41 +0200)]
btrfs: refuse to remount read-write after abort

It's still possible to flip the filesystem into RW mode after it's
remounted RO due to an abort. There are lots of places that check for
the superblock error bit and will not write data, but we should not let
the filesystem appear read-write.

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0
chandan [Fri, 13 Sep 2013 14:04:10 +0000 (19:34 +0530)]
Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0

This patch makes it possible to set BTRFS_FS_TREE_OBJECTID as the default
subvolume by passing a subvolume id of 0.

Signed-off-by: chandan <chandan@linux.vnet.ibm.com>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: don't leak transaction in btrfs_sync_file()
Filipe David Borba Manana [Wed, 11 Sep 2013 19:36:44 +0000 (20:36 +0100)]
Btrfs: don't leak transaction in btrfs_sync_file()

In btrfs_sync_file(), if the call to btrfs_log_dentry_safe() returns
a negative error (for e.g. -ENOMEM via btrfs_log_inode()), we would
return without ending/freeing the transaction.

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: add the missing mutex unlock in write_all_supers()
Stefan Behrens [Wed, 11 Sep 2013 07:59:22 +0000 (09:59 +0200)]
Btrfs: add the missing mutex unlock in write_all_supers()

The BUG() was replaced by btrfs_error() and return -EIO with the
patch "get rid of one BUG() in write_all_supers()", but the missing
mutex_unlock() was overlooked.

The 0-DAY kernel build service from Intel reported the missing
unlock which was found by the coccinelle tool:

    fs/btrfs/disk-io.c:3422:2-8: preceding lock on line 3374

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: iput inode on allocation failure
Josef Bacik [Tue, 17 Sep 2013 15:25:44 +0000 (11:25 -0400)]
Btrfs: iput inode on allocation failure

We don't do the iput when we fail to allocate our delayed delalloc work in
__start_delalloc_inodes, fix this.

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: remove space_info->reservation_progress
Josef Bacik [Tue, 17 Sep 2013 15:02:25 +0000 (11:02 -0400)]
Btrfs: remove space_info->reservation_progress

This isn't used for anything anymore, just remove it.

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: kill delay_iput arg to the wait_ordered functions
Josef Bacik [Tue, 17 Sep 2013 14:55:51 +0000 (10:55 -0400)]
Btrfs: kill delay_iput arg to the wait_ordered functions

This is a left over of how we used to wait for ordered extents, which was to
grab the inode and then run filemap flush on it.  However if we have an ordered
extent then we already are holding a ref on the inode, and we just use
btrfs_start_ordered_extent anyway, so there is no reason to have an extra ref on
the inode to start work on the ordered extent.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: fix worst case calculator for space usage
Josef Bacik [Tue, 17 Sep 2013 14:50:06 +0000 (10:50 -0400)]
Btrfs: fix worst case calculator for space usage

Forever ago I made the worst case calculator say that we could potentially split
into 3 blocks for every level on the way down, which isn't right.  If we split
we're only going to get two new blocks, the one we originally cow'ed and the new
one we're going to split.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoRevert "Btrfs: rework the overcommit logic to be based on the total size"
Josef Bacik [Tue, 17 Sep 2013 14:48:00 +0000 (10:48 -0400)]
Revert "Btrfs: rework the overcommit logic to be based on the total size"

This reverts commit 70afa3998c9baed4186df38988246de1abdab56d.  It is causing
performance issues and wasn't actually correct.  There were problems with the
way we flushed delalloc and that was the real cause of the early enospc.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: improve replacing nocow extents
Josef Bacik [Thu, 12 Sep 2013 20:58:28 +0000 (16:58 -0400)]
Btrfs: improve replacing nocow extents

Various people have hit a deadlock when running btrfs/011.  This is because when
replacing nocow extents we will take the i_mutex to make sure nobody messes with
the file while we are replacing the extent.  The problem is we are already
holding a transaction open, which is a locking inversion, so instead we need to
save these inodes we find and then process them outside of the transaction.

Further we can't just lock the inode and assume we are good to go.  We need to
lock the extent range and then read back the extent cache for the inode to make
sure the extent really still points at the physical block we want.  If it
doesn't we don't have to copy it.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: drop dir i_size when adding new names on replay
Josef Bacik [Wed, 11 Sep 2013 18:17:00 +0000 (14:17 -0400)]
Btrfs: drop dir i_size when adding new names on replay

So if we have dir_index items in the log that means we also have the inode item
as well, which means that the inode's i_size is correct.  However when we
process dir_index'es we call btrfs_add_link() which will increase the
directory's i_size for the new entry.  To fix this we need to just set the dir
items i_size to 0, and then as we find dir_index items we adjust the i_size.
btrfs_add_link() will do it for new entries, and if the entry already exists we
can just add the name_len to the i_size ourselves.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: replay dir_index items before other items
Josef Bacik [Wed, 11 Sep 2013 15:57:23 +0000 (11:57 -0400)]
Btrfs: replay dir_index items before other items

A user reported a bug where his log would not replay because he was getting
-EEXIST back.  This was because he had a file moved into a directory that was
logged.  What happens is the file had a lower inode number, and so it is
processed first when replaying the log, and so we add the inode ref in for the
directory it was moved to.  But then we process the directories DIR_INDEX item
and try to add the inode ref for that inode and it fails because we already
added it when we replayed the inode.  To solve this problem we need to just
process any DIR_INDEX items we have in the log first so this all is taken care
of, and then we can replay the rest of the items.  With this patch my reproducer
can remount the file system properly instead of erroring out.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: check roots last log commit when checking if an inode has been logged
Josef Bacik [Wed, 11 Sep 2013 13:55:42 +0000 (09:55 -0400)]
Btrfs: check roots last log commit when checking if an inode has been logged

Liu introduced a local copy of the last log commit for an inode to make sure we
actually log an inode even if a log commit has already taken place.  In order to
make sure we didn't relog the same inode multiple times he set this local copy
to the current trans when we log the inode, because usually we log the inode and
then sync the log.  The exception to this is during rename, we will relog an
inode if the name changed and it is already in the log.  The problem with this
is then we go to sync the inode, and our check to see if the inode has already
been logged is tripped and we don't sync the log.  To fix this we need to _also_
check against the roots last log commit, because it could be less than what is
in our local copy of the log commit.  This fixes a bug where we rename a file
into a directory and then fsync the directory and then on remount the directory
is no longer there.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: actually log directory we are fsync()'ing
Josef Bacik [Wed, 11 Sep 2013 13:36:30 +0000 (09:36 -0400)]
Btrfs: actually log directory we are fsync()'ing

If you just create a directory and then fsync that directory and then pull the
power plug you will come back up and the directory will not be there.  That is
because we won't actually create directories if we've logged files inside of
them since they will be created on replay, but in this check we will set our
logged_trans of our current directory if it happens to be a directory, making us
think it doesn't need to be logged.  Fix the logic to only do this to parent
directories.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: actually limit the size of delalloc range
Josef Bacik [Fri, 30 Aug 2013 18:38:49 +0000 (14:38 -0400)]
Btrfs: actually limit the size of delalloc range

So forever we have had this thing to limit the amount of delalloc pages we'll
setup to be written out to 128mb.  This is because we have to lock all the pages
in this range, so anything above this gets a bit unweildly, and also without a
limit we'll happily allocate gigantic chunks of disk space.  Turns out our check
for this wasn't quite right, we wouldn't actually limit the chunk we wanted to
write out, we'd just stop looking for more space after we went over the limit.
So if you do a giant 20gb dd on my box with lots of ram I could get 2gig
extents.  This is fine normally, except when you go to relocate these extents
and we can't find enough space to relocate these moster extents, since we have
to be able to allocate exactly the same sized extent to move it around.  So fix
this by actually enforcing the limit.  With this patch I'm no longer seeing
giant 1.5gb extents.  Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: allocate the free space by the existed max extent size when ENOSPC
Miao Xie [Mon, 9 Sep 2013 05:19:42 +0000 (13:19 +0800)]
Btrfs: allocate the free space by the existed max extent size when ENOSPC

By the current code, if the requested size is very large, and all the extents
in the free space cache are small, we will waste lots of the cpu time to cut
the requested size in half and search the cache again and again until it gets
down to the size the allocator can return. In fact, we can know the max extent
size in the cache after the first search, so we needn't cut the size in half
repeatedly, and just use the max extent size directly. This way can save
lots of cpu time and make the performance grow up when there are only fragments
in the free space cache.

According to my test, if there are only 4KB free space extents in the fs,
and the total size of those extents are 256MB, we can reduce the execute
time of the following test from 5.4s to 1.4s.
  dd if=/dev/zero of=<testfile> bs=1MB count=1 oflag=sync

Changelog v2 -> v3:
- fix the problem that we skip the block group with the space which is
  less than we need.

Changelog v1 -> v2:
- address the problem that we return a wrong start position when searching
  the free space in a bitmap.

Signed-off-by: Miao Xie <miaox@cn.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agobtrfs: add lockdep and tracing annotations for uuid tree
David Sterba [Tue, 3 Sep 2013 16:28:57 +0000 (18:28 +0200)]
btrfs: add lockdep and tracing annotations for uuid tree

Signed-off-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agobtrfs: show compiled-in config features at module load time
Stefan Behrens [Tue, 3 Sep 2013 13:25:27 +0000 (15:25 +0200)]
btrfs: show compiled-in config features at module load time

We want to know if there are debugging features compiled in, this may
affect performance. The message is printed before the sanity checks.

(This commit message is a copy of David Sterba's commit message when
he introduced btrfs_print_info()).

Signed-off-by: Stefan Behrens <sbehrens@giantdisaster.de>
Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: more efficient inode tree replace operation
Filipe David Borba Manana [Mon, 2 Sep 2013 11:19:13 +0000 (12:19 +0100)]
Btrfs: more efficient inode tree replace operation

Instead of removing the current inode from the red black tree
and then add the new one, just use the red black tree replace
operation, which is more efficient.

Signed-off-by: Filipe David Borba Manana <fdmanana@gmail.com>
Reviewed-by: Zach Brown <zab@redhat.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: do not add replace target to the alloc_list
Ilya Dryomov [Sun, 1 Sep 2013 15:56:44 +0000 (18:56 +0300)]
Btrfs: do not add replace target to the alloc_list

If replace was suspended by the umount, replace target device is added
to the fs_devices->alloc_list during a later mount.  This is obviously
wrong.  ->is_tgtdev_for_dev_replace is supposed to guard against that,
but ->is_tgtdev_for_dev_replace is (and can only ever be) initialized
*after* everything is opened and fs_devices lists are populated.  Fix
this by checking the devid instead: for replace targets it's always
equal to BTRFS_DEV_REPLACE_DEVID.

Cc: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Stefan Behrens <sbehrens@giantdisaster.de>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoBtrfs: fixup error handling in btrfs_reloc_cow
Josef Bacik [Fri, 30 Aug 2013 19:09:51 +0000 (15:09 -0400)]
Btrfs: fixup error handling in btrfs_reloc_cow

If we failed to actually allocate the correct size of the extent to relocate we
will end up in an infinite loop because we won't return an error, we'll just
move on to the next extent.  So fix this up by returning an error, and then fix
all the callers to return an error up the stack rather than BUG_ON()'ing.
Thanks,

Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
10 years agoMerge tag 'v3.11' into for-linus
Chris Mason [Sat, 21 Sep 2013 14:44:55 +0000 (10:44 -0400)]
Merge tag 'v3.11' into for-linus

Linux 3.11

10 years agoiio:buffer_cb: Add missing iio_buffer_init()
Lars-Peter Clausen [Wed, 18 Sep 2013 20:02:00 +0000 (21:02 +0100)]
iio:buffer_cb: Add missing iio_buffer_init()

Make sure to properly initialize the IIO buffer data structure.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio: Prevent race between IIO chardev opening and IIO device free
Lars-Peter Clausen [Wed, 18 Sep 2013 20:02:00 +0000 (21:02 +0100)]
iio: Prevent race between IIO chardev opening and IIO device free

Set the IIO device as the parent for the character device

We need to make sure that the IIO device is not freed while the character device
exists, otherwise the freeing of the IIO device might race against the file open
callback. Do this by setting the character device's parent to the IIO device,
this will cause the character device to grab a reference to the IIO device and
only release it once the character device itself has been removed.

Also move the registration of the character device before the registration of
the IIO device to avoid the (rather theoretical case) that the IIO device is
already freed again before we can add the character device and grab a reference
to the IIO device.

We also need to move the call to cdev_del() from iio_dev_release() to
iio_device_unregister() (where it should have been in the first place anyway) to
avoid a reference cycle. As iio_dev_release() is only called once all reference
are dropped, but the character device holds a reference to the IIO device.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio: fix: Keep a reference to the IIO device for open file descriptors
Lars-Peter Clausen [Wed, 18 Sep 2013 20:02:00 +0000 (21:02 +0100)]
iio: fix: Keep a reference to the IIO device for open file descriptors

Make sure that the IIO device is not freed while we still have file descriptors
for it.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
10 years agoiio: Stop sampling when the device is removed
Lars-Peter Clausen [Wed, 18 Sep 2013 20:02:00 +0000 (21:02 +0100)]
iio: Stop sampling when the device is removed

Make sure to stop sampling when the device is removed, otherwise it will
continue to sample forever.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>