2015-07-10 23:33:52

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 00/45] Remove clk.h from clk-provider.h (clk drivers part)

This is the third set in a series of patches that removes
clk.h from clk-provider.h. This allows us to clearly see what
provider drivers are using the consumer API (clk.h) by
checking the includes. Currently clk.h is included by
clk-provider.h even though it doesn't need to, so quite a few
clk provider drivers are relying on the implicit include.

Stephen Boyd (45):
clk: axi-clkgen: Remove clk.h include
clk: cdce706: Include clk.h
clk: clps711x: Remove clk.h include
clk: efm32gg: Remove clk.h include
clk: mux: Remove clk.h include
clk: nomadik: Remove clk.h and clkdev.h includes
clk: palmas: Remove clkdev.h includes
clk: rk808: Remove clk.h include
clk: si5351: Include clk.h
clk: twl6040: Remove clk.h include
clk: u300: Remove clk.h include
clk: wm831x: Remove clk.h include
clk: hisilicon: Remove clk.h include
clk: keystone: Remove clk.h include
clk: mediatek: Properly include clk.h
clk: meson8b: Properly include clk.h
clk: mmp: Remove clk.h include
clk: mvebu: Remove clk.h include
clk: mxs: Include clk.h in C files that use it
clk: nxp: Remove clk.h include
clk: rockchip: Properly include clk.h
clk: samsung: Properly include clk.h and clkdev.h
clk: sirf: Properly include clk.h
clk: socfpga: Remove clk.h and clkdev.h includes
clk: socfpga: Remove clk.h include
clk: tegra: Properly include clk.h
clk: ux500: Remove clk.h and clkdev.h includes
clk: versatile: Remove clk.h and clkdev.h includes
clk: bcm: Include clk.h
clk: highbank: Include clk.h
clk: qcom: Include clk.h
clk: st: Include clk.h
clk: sunxi: Include clk.h
clk: ti: Include clk.h
clk: zynq: Include clk.h
clk: Include clk.h in clk.c
clk: cdce925: Include clk.h
clk: moxart: Include clk.h
clk: si570: Include clk.h
clk: ingenic: Include clk.h
clk: pistachio: Include clk.h
clk: samsung: s5pv210-audss: Include clk.h
clk: ti: Switch clk-provider.h include to clk.h
clk: at91: Include clk.h and slab.h
clk: Remove clk.h from clk-provider.h

drivers/clk/at91/clk-slow.c | 2 ++
drivers/clk/bcm/clk-kona.c | 1 +
drivers/clk/clk-axi-clkgen.c | 1 -
drivers/clk/clk-cdce706.c | 1 +
drivers/clk/clk-cdce925.c | 1 +
drivers/clk/clk-clps711x.c | 1 -
drivers/clk/clk-efm32gg.c | 1 -
drivers/clk/clk-highbank.c | 1 +
drivers/clk/clk-moxart.c | 1 +
drivers/clk/clk-mux.c | 1 -
drivers/clk/clk-nomadik.c | 3 +--
drivers/clk/clk-palmas.c | 1 -
drivers/clk/clk-rk808.c | 1 -
drivers/clk/clk-si5351.c | 2 +-
drivers/clk/clk-si570.c | 1 +
drivers/clk/clk-twl6040.c | 1 -
drivers/clk/clk-u300.c | 2 +-
drivers/clk/clk-wm831x.c | 1 -
drivers/clk/clk.c | 1 +
drivers/clk/hisilicon/clk-hi3620.c | 2 --
drivers/clk/hisilicon/clk-hip04.c | 2 --
drivers/clk/hisilicon/clk.c | 3 +--
drivers/clk/hisilicon/clkgate-separated.c | 2 --
drivers/clk/ingenic/cgu.c | 1 +
drivers/clk/keystone/gate.c | 1 -
drivers/clk/keystone/pll.c | 1 -
drivers/clk/mediatek/clk-gate.h | 3 ++-
drivers/clk/mediatek/clk-mt8135.c | 1 +
drivers/clk/mediatek/clk-mt8173.c | 1 +
drivers/clk/mediatek/clk-mtk.h | 3 ++-
drivers/clk/meson/clk-cpu.c | 1 +
drivers/clk/meson/clkc.c | 1 -
drivers/clk/mmp/clk-apbc.c | 1 -
drivers/clk/mmp/clk-apmu.c | 1 -
drivers/clk/mmp/clk.c | 3 +--
drivers/clk/mvebu/clk-cpu.c | 3 ++-
drivers/clk/mvebu/common.c | 2 +-
drivers/clk/mxs/clk-div.c | 1 -
drivers/clk/mxs/clk-frac.c | 1 -
drivers/clk/mxs/clk-imx23.c | 3 +--
drivers/clk/mxs/clk-imx28.c | 2 +-
drivers/clk/mxs/clk-pll.c | 1 -
drivers/clk/mxs/clk-ref.c | 1 -
drivers/clk/mxs/clk.h | 3 ++-
drivers/clk/nxp/clk-lpc18xx-cgu.c | 1 -
drivers/clk/pistachio/clk.c | 1 +
drivers/clk/qcom/mmcc-msm8960.c | 1 +
drivers/clk/rockchip/clk-cpu.c | 1 +
drivers/clk/rockchip/clk-mmc-phase.c | 1 +
drivers/clk/rockchip/clk-pll.c | 1 -
drivers/clk/rockchip/clk-rk3188.c | 1 +
drivers/clk/rockchip/clk.h | 4 ++--
drivers/clk/samsung/clk-cpu.c | 3 +++
drivers/clk/samsung/clk-exynos-audss.c | 3 ++-
drivers/clk/samsung/clk-exynos-clkout.c | 2 +-
drivers/clk/samsung/clk-exynos3250.c | 2 --
drivers/clk/samsung/clk-exynos4.c | 2 +-
drivers/clk/samsung/clk-exynos4415.c | 2 --
drivers/clk/samsung/clk-exynos5250.c | 2 --
drivers/clk/samsung/clk-exynos5260.c | 2 --
drivers/clk/samsung/clk-exynos5410.c | 2 --
drivers/clk/samsung/clk-exynos5420.c | 3 +--
drivers/clk/samsung/clk-exynos5433.c | 2 --
drivers/clk/samsung/clk-exynos5440.c | 2 --
drivers/clk/samsung/clk-exynos7.c | 2 --
drivers/clk/samsung/clk-pll.c | 2 ++
drivers/clk/samsung/clk-s3c2410.c | 2 --
drivers/clk/samsung/clk-s3c2412.c | 2 --
drivers/clk/samsung/clk-s3c2443.c | 2 --
drivers/clk/samsung/clk-s3c64xx.c | 2 --
drivers/clk/samsung/clk-s5pv210-audss.c | 2 +-
drivers/clk/samsung/clk-s5pv210.c | 2 --
drivers/clk/samsung/clk.c | 4 ++++
drivers/clk/samsung/clk.h | 3 ++-
drivers/clk/sirf/clk-atlas6.c | 1 -
drivers/clk/sirf/clk-common.c | 2 ++
drivers/clk/sirf/clk-prima2.c | 1 -
drivers/clk/socfpga/clk-gate-a10.c | 1 +
drivers/clk/socfpga/clk-gate.c | 3 +--
drivers/clk/socfpga/clk-periph-a10.c | 1 +
drivers/clk/socfpga/clk-periph.c | 3 +--
drivers/clk/socfpga/clk-pll-a10.c | 1 +
drivers/clk/socfpga/clk-pll.c | 3 +--
drivers/clk/socfpga/clk.h | 1 -
drivers/clk/spear/spear1310_clock.c | 1 -
drivers/clk/spear/spear1340_clock.c | 1 -
drivers/clk/spear/spear3xx_clock.c | 1 -
drivers/clk/spear/spear6xx_clock.c | 1 -
drivers/clk/st/clk-flexgen.c | 1 +
drivers/clk/st/clkgen-fsyn.c | 1 +
drivers/clk/st/clkgen-mux.c | 1 +
drivers/clk/st/clkgen-pll.c | 1 +
drivers/clk/sunxi/clk-mod0.c | 3 ++-
drivers/clk/sunxi/clk-sun8i-mbus.c | 2 +-
drivers/clk/sunxi/clk-sun9i-core.c | 2 +-
drivers/clk/sunxi/clk-sun9i-mmc.c | 3 ++-
drivers/clk/sunxi/clk-sunxi.c | 2 ++
drivers/clk/sunxi/clk-usb.c | 3 ++-
drivers/clk/tegra/clk-divider.c | 1 -
drivers/clk/tegra/clk-periph-gate.c | 1 -
drivers/clk/tegra/clk-periph.c | 1 -
drivers/clk/tegra/clk-pll-out.c | 1 -
drivers/clk/tegra/clk-pll.c | 2 +-
drivers/clk/tegra/clk-super.c | 1 -
drivers/clk/tegra/clk-tegra-audio.c | 1 -
drivers/clk/tegra/clk-tegra-fixed.c | 1 -
drivers/clk/tegra/clk-tegra-periph.c | 1 -
drivers/clk/tegra/clk-tegra-pmc.c | 1 -
drivers/clk/tegra/clk-tegra-super-gen4.c | 1 -
drivers/clk/tegra/clk-tegra114.c | 2 --
drivers/clk/tegra/clk-tegra124.c | 1 -
drivers/clk/tegra/clk-tegra20.c | 1 -
drivers/clk/tegra/clk-tegra30.c | 1 -
drivers/clk/tegra/clk.c | 1 +
drivers/clk/ti/apll.c | 1 +
drivers/clk/ti/clk-2xxx.c | 2 +-
drivers/clk/ti/clk-33xx.c | 1 +
drivers/clk/ti/clk-3xxx-legacy.c | 1 +
drivers/clk/ti/clk-3xxx.c | 1 +
drivers/clk/ti/clk-43xx.c | 1 +
drivers/clk/ti/clk-dra7-atl.c | 1 +
drivers/clk/ti/clk.c | 1 +
drivers/clk/ti/clockdomain.c | 1 +
drivers/clk/ti/dpll.c | 1 +
drivers/clk/ti/fapll.c | 1 +
drivers/clk/ux500/abx500-clk.c | 1 -
drivers/clk/ux500/clk.h | 3 ++-
drivers/clk/ux500/u8500_clk.c | 1 -
drivers/clk/ux500/u8500_of_clk.c | 2 --
drivers/clk/ux500/u8540_clk.c | 1 -
drivers/clk/ux500/u9540_clk.c | 2 --
drivers/clk/versatile/clk-icst.c | 5 +++--
drivers/clk/versatile/clk-impd1.c | 1 -
drivers/clk/versatile/clk-realview.c | 1 -
drivers/clk/versatile/clk-sp810.c | 3 ++-
drivers/clk/versatile/clk-versatile.c | 2 --
drivers/clk/zynq/clkc.c | 1 +
include/linux/clk-provider.h | 2 +-
include/linux/clk/tegra.h | 3 ++-
139 files changed, 99 insertions(+), 128 deletions(-)

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project


2015-07-10 23:34:20

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 01/45] clk: axi-clkgen: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Lars-Peter Clausen <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-axi-clkgen.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/clk/clk-axi-clkgen.c b/drivers/clk/clk-axi-clkgen.c
index e619285c6def..3bcd42fbb55e 100644
--- a/drivers/clk/clk-axi-clkgen.c
+++ b/drivers/clk/clk-axi-clkgen.c
@@ -10,7 +10,6 @@

#include <linux/platform_device.h>
#include <linux/clk-provider.h>
-#include <linux/clk.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/of.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:34:12

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 02/45] clk: cdce706: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Max Filippov <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-cdce706.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk-cdce706.c b/drivers/clk/clk-cdce706.c
index f01164fada5d..21830526fd8e 100644
--- a/drivers/clk/clk-cdce706.c
+++ b/drivers/clk/clk-cdce706.c
@@ -10,6 +10,7 @@
* published by the Free Software Foundation.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/i2c.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:34:24

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 03/45] clk: clps711x: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Alexander Shiyan <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-clps711x.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/clk/clk-clps711x.c b/drivers/clk/clk-clps711x.c
index 715eec1a9902..ff4ef4f1df62 100644
--- a/drivers/clk/clk-clps711x.c
+++ b/drivers/clk/clk-clps711x.c
@@ -9,7 +9,6 @@
* (at your option) any later version.
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/io.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:34:31

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 04/45] clk: efm32gg: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Uwe Kleine-König <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-efm32gg.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/clk/clk-efm32gg.c b/drivers/clk/clk-efm32gg.c
index 73a8d0ff530c..bac4553f04b8 100644
--- a/drivers/clk/clk-efm32gg.c
+++ b/drivers/clk/clk-efm32gg.c
@@ -6,7 +6,6 @@
* the terms of the GNU General Public License version 2 as published by the
* Free Software Foundation.
*/
-#include <linux/clk.h>
#include <linux/io.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:34:39

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 05/45] clk: mux: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-mux.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/clk/clk-mux.c b/drivers/clk/clk-mux.c
index 6066a01b20ea..c705cf573569 100644
--- a/drivers/clk/clk-mux.c
+++ b/drivers/clk/clk-mux.c
@@ -10,7 +10,6 @@
* Simple multiplexer clock implementation
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/module.h>
#include <linux/slab.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:37:22

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 06/45] clk: nomadik: Remove clk.h and clkdev.h includes

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. This driver also includes clkdev.h even though
it isn't used, so drop it too and add slab.h to make sure
everything still compiles.

Cc: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-nomadik.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/clk/clk-nomadik.c b/drivers/clk/clk-nomadik.c
index c9487179f25f..e4d8a991c58f 100644
--- a/drivers/clk/clk-nomadik.c
+++ b/drivers/clk/clk-nomadik.c
@@ -8,8 +8,7 @@
#define pr_fmt(fmt) "Nomadik SRC clocks: " fmt

#include <linux/bitops.h>
-#include <linux/clk.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/clk-provider.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:34:45

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 07/45] clk: palmas: Remove clkdev.h includes

This driver includes clkdev.h even though it isn't used, so drop
it.

Cc: Peter Ujfalusi <[email protected]>
Cc: Nishanth Menon <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-palmas.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/clk/clk-palmas.c b/drivers/clk/clk-palmas.c
index 45a535ab48aa..8e3039f0c3f9 100644
--- a/drivers/clk/clk-palmas.c
+++ b/drivers/clk/clk-palmas.c
@@ -18,7 +18,6 @@
*/

#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/mfd/palmas.h>
#include <linux/module.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:37:05

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 08/45] clk: rk808: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Chris Zhong <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-rk808.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/clk/clk-rk808.c b/drivers/clk/clk-rk808.c
index 83902b9cd49e..0fee2f4ca258 100644
--- a/drivers/clk/clk-rk808.c
+++ b/drivers/clk/clk-rk808.c
@@ -15,7 +15,6 @@
* more details.
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/module.h>
#include <linux/slab.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:35:14

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 09/45] clk: si5351: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Sebastian Hesselbarth <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-si5351.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-si5351.c b/drivers/clk/clk-si5351.c
index e39e1e680b3c..9e6de57eae3b 100644
--- a/drivers/clk/clk-si5351.c
+++ b/drivers/clk/clk-si5351.c
@@ -18,7 +18,7 @@

#include <linux/module.h>
#include <linux/kernel.h>
-#include <linux/clkdev.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/err.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:34:49

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 10/45] clk: twl6040: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Peter Ujfalusi <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-twl6040.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/clk/clk-twl6040.c b/drivers/clk/clk-twl6040.c
index 4a755135bcd3..3094b10c6149 100644
--- a/drivers/clk/clk-twl6040.c
+++ b/drivers/clk/clk-twl6040.c
@@ -20,7 +20,6 @@
*
*/

-#include <linux/clk.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/platform_device.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:35:09

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 11/45] clk: u300: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also add in slab.h because without clkdev.h
compilation of this file would fail.

Cc: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-u300.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/clk-u300.c b/drivers/clk/clk-u300.c
index 18bf5e576b93..95d1742dac30 100644
--- a/drivers/clk/clk-u300.c
+++ b/drivers/clk/clk-u300.c
@@ -5,8 +5,8 @@
* Author: Linus Walleij <[email protected]>
* Author: Jonas Aaberg <[email protected]>
*/
-#include <linux/clk.h>
#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/err.h>
#include <linux/io.h>
#include <linux/clk-provider.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:34:54

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 12/45] clk: wm831x: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Mark Brown <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-wm831x.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/clk/clk-wm831x.c b/drivers/clk/clk-wm831x.c
index ef67719f4e52..43f9d15255f4 100644
--- a/drivers/clk/clk-wm831x.c
+++ b/drivers/clk/clk-wm831x.c
@@ -12,7 +12,6 @@
*
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/module.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:34:59

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 13/45] clk: hisilicon: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also drop the clkdev.h include in files that
aren't using it.

Cc: Bintian Wang <[email protected]>
Cc: Zhangfei Gao <[email protected]>
Cc: Haojian Zhuang <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/hisilicon/clk-hi3620.c | 2 --
drivers/clk/hisilicon/clk-hip04.c | 2 --
drivers/clk/hisilicon/clk.c | 3 +--
drivers/clk/hisilicon/clkgate-separated.c | 2 --
4 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/drivers/clk/hisilicon/clk-hi3620.c b/drivers/clk/hisilicon/clk-hi3620.c
index 715d34a5ef9b..5502803a391e 100644
--- a/drivers/clk/hisilicon/clk-hi3620.c
+++ b/drivers/clk/hisilicon/clk-hi3620.c
@@ -25,13 +25,11 @@

#include <linux/kernel.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/slab.h>
-#include <linux/clk.h>

#include <dt-bindings/clock/hi3620-clock.h>

diff --git a/drivers/clk/hisilicon/clk-hip04.c b/drivers/clk/hisilicon/clk-hip04.c
index 132b57a0ce09..8ca967308343 100644
--- a/drivers/clk/hisilicon/clk-hip04.c
+++ b/drivers/clk/hisilicon/clk-hip04.c
@@ -24,13 +24,11 @@

#include <linux/kernel.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/slab.h>
-#include <linux/clk.h>

#include <dt-bindings/clock/hip04-clock.h>

diff --git a/drivers/clk/hisilicon/clk.c b/drivers/clk/hisilicon/clk.c
index c90a89739b03..155e2e6c8316 100644
--- a/drivers/clk/hisilicon/clk.c
+++ b/drivers/clk/hisilicon/clk.c
@@ -24,15 +24,14 @@
*/

#include <linux/kernel.h>
-#include <linux/clk-provider.h>
#include <linux/clkdev.h>
+#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/io.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/of_device.h>
#include <linux/slab.h>
-#include <linux/clk.h>

#include "clk.h"

diff --git a/drivers/clk/hisilicon/clkgate-separated.c b/drivers/clk/hisilicon/clkgate-separated.c
index b03d5a7246f9..a47812f56a17 100644
--- a/drivers/clk/hisilicon/clkgate-separated.c
+++ b/drivers/clk/hisilicon/clkgate-separated.c
@@ -25,10 +25,8 @@

#include <linux/kernel.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/io.h>
#include <linux/slab.h>
-#include <linux/clk.h>

#include "clk.h"

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:35:38

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 14/45] clk: keystone: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Ivan Khoronzhuk <[email protected]>
Cc: Murali Karicheri <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/keystone/gate.c | 1 -
drivers/clk/keystone/pll.c | 1 -
2 files changed, 2 deletions(-)

diff --git a/drivers/clk/keystone/gate.c b/drivers/clk/keystone/gate.c
index 86f1e362eafb..aed5af23895b 100644
--- a/drivers/clk/keystone/gate.c
+++ b/drivers/clk/keystone/gate.c
@@ -10,7 +10,6 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/keystone/pll.c b/drivers/clk/keystone/pll.c
index 4a375ead70e9..25443e4d139f 100644
--- a/drivers/clk/keystone/pll.c
+++ b/drivers/clk/keystone/pll.c
@@ -10,7 +10,6 @@
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/io.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:34:55

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 15/45] clk: mediatek: Properly include clk.h

We don't need to include clk.h in header files, just forward
declare struct clk here. This leads us to a few places where the
include of clk.h was missing in C files. Add them.

Cc: James Liao <[email protected]>
Cc: Henry Chen <[email protected]>
Cc: Sascha Hauer <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/mediatek/clk-gate.h | 3 ++-
drivers/clk/mediatek/clk-mt8135.c | 1 +
drivers/clk/mediatek/clk-mt8173.c | 1 +
drivers/clk/mediatek/clk-mtk.h | 3 ++-
4 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/mediatek/clk-gate.h b/drivers/clk/mediatek/clk-gate.h
index 6b6780b1e9c5..11e25c992948 100644
--- a/drivers/clk/mediatek/clk-gate.h
+++ b/drivers/clk/mediatek/clk-gate.h
@@ -16,9 +16,10 @@
#define __DRV_CLK_GATE_H

#include <linux/regmap.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>

+struct clk;
+
struct mtk_clk_gate {
struct clk_hw hw;
struct regmap *regmap;
diff --git a/drivers/clk/mediatek/clk-mt8135.c b/drivers/clk/mediatek/clk-mt8135.c
index 08b4b849b491..07c21e44b4b3 100644
--- a/drivers/clk/mediatek/clk-mt8135.c
+++ b/drivers/clk/mediatek/clk-mt8135.c
@@ -12,6 +12,7 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/slab.h>
diff --git a/drivers/clk/mediatek/clk-mt8173.c b/drivers/clk/mediatek/clk-mt8173.c
index 4b9e04cdf7e8..2e0f17be9ea0 100644
--- a/drivers/clk/mediatek/clk-mt8173.c
+++ b/drivers/clk/mediatek/clk-mt8173.c
@@ -12,6 +12,7 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/slab.h>
diff --git a/drivers/clk/mediatek/clk-mtk.h b/drivers/clk/mediatek/clk-mtk.h
index 9dda9d8ad10b..624716c4776b 100644
--- a/drivers/clk/mediatek/clk-mtk.h
+++ b/drivers/clk/mediatek/clk-mtk.h
@@ -17,9 +17,10 @@

#include <linux/regmap.h>
#include <linux/bitops.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>

+struct clk;
+
#define MAX_MUX_GATE_BIT 31
#define INVALID_MUX_GATE_BIT (MAX_MUX_GATE_BIT + 1)

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:35:26

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 16/45] clk: meson8b: Properly include clk.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include clk.h if it's actually used.

Cc: Carlo Caione <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/meson/clk-cpu.c | 1 +
drivers/clk/meson/clkc.c | 1 -
2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/meson/clk-cpu.c b/drivers/clk/meson/clk-cpu.c
index 71ad493b94df..f7c30ea54ca8 100644
--- a/drivers/clk/meson/clk-cpu.c
+++ b/drivers/clk/meson/clk-cpu.c
@@ -35,6 +35,7 @@
#include <linux/module.h>
#include <linux/of_address.h>
#include <linux/slab.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>

#define MESON_CPU_CLK_CNTL1 0x00
diff --git a/drivers/clk/meson/clkc.c b/drivers/clk/meson/clkc.c
index b8c511c5e7a7..c83ae1367abc 100644
--- a/drivers/clk/meson/clkc.c
+++ b/drivers/clk/meson/clkc.c
@@ -15,7 +15,6 @@
* this program. If not, see <http://www.gnu.org/licenses/>.
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/mfd/syscon.h>
#include <linux/slab.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:36:29

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 17/45] clk: mmp: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. The clkdev.h include isn't used either, so drop
it and add in slab.h to keep things compiling.

Cc: Chao Xie <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/mmp/clk-apbc.c | 1 -
drivers/clk/mmp/clk-apmu.c | 1 -
drivers/clk/mmp/clk.c | 3 +--
3 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/clk/mmp/clk-apbc.c b/drivers/clk/mmp/clk-apbc.c
index 09d41c717c52..4c717db05f2d 100644
--- a/drivers/clk/mmp/clk-apbc.c
+++ b/drivers/clk/mmp/clk-apbc.c
@@ -10,7 +10,6 @@
*/

#include <linux/kernel.h>
-#include <linux/clk.h>
#include <linux/io.h>
#include <linux/err.h>
#include <linux/delay.h>
diff --git a/drivers/clk/mmp/clk-apmu.c b/drivers/clk/mmp/clk-apmu.c
index cdcf2d7f321e..47b5542ce50f 100644
--- a/drivers/clk/mmp/clk-apmu.c
+++ b/drivers/clk/mmp/clk-apmu.c
@@ -10,7 +10,6 @@
*/

#include <linux/kernel.h>
-#include <linux/clk.h>
#include <linux/io.h>
#include <linux/err.h>
#include <linux/delay.h>
diff --git a/drivers/clk/mmp/clk.c b/drivers/clk/mmp/clk.c
index cf038ef54c59..61893fe73251 100644
--- a/drivers/clk/mmp/clk.c
+++ b/drivers/clk/mmp/clk.c
@@ -1,7 +1,6 @@
#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_address.h>

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:36:19

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 18/45] clk: mvebu: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include the header if necessary. The
clkdev.h include isn't used here either, so drop it and add in
slab.h to keep things compiling.

Cc: Boris Brezillon <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/mvebu/clk-cpu.c | 3 ++-
drivers/clk/mvebu/common.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c
index 3821a88077ea..86888a658d4c 100644
--- a/drivers/clk/mvebu/clk-cpu.c
+++ b/drivers/clk/mvebu/clk-cpu.c
@@ -10,7 +10,8 @@
* warranty of any kind, whether express or implied.
*/
#include <linux/kernel.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/of_address.h>
#include <linux/io.h>
diff --git a/drivers/clk/mvebu/common.c b/drivers/clk/mvebu/common.c
index 15b370ff3748..4a22429cd7a2 100644
--- a/drivers/clk/mvebu/common.c
+++ b/drivers/clk/mvebu/common.c
@@ -13,8 +13,8 @@
*/

#include <linux/kernel.h>
+#include <linux/slab.h>
#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/of.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:36:38

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 19/45] clk: mxs: Include clk.h in C files that use it

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. The clk.h include is being included in all
mxs files because it's part of mxs/clk.h even though nothing
actually requires it in that file. Move the clk.h include to the
C files that are actually using it and remove the clk.h include
from the header file. The clkdev.h include isn't used either, so
drop it too.

Cc: Shawn Guo <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/mxs/clk-div.c | 1 -
drivers/clk/mxs/clk-frac.c | 1 -
drivers/clk/mxs/clk-imx23.c | 3 +--
drivers/clk/mxs/clk-imx28.c | 2 +-
drivers/clk/mxs/clk-pll.c | 1 -
drivers/clk/mxs/clk-ref.c | 1 -
drivers/clk/mxs/clk.h | 3 ++-
7 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/mxs/clk-div.c b/drivers/clk/mxs/clk-div.c
index 90e1da93877e..049ee27d5a22 100644
--- a/drivers/clk/mxs/clk-div.c
+++ b/drivers/clk/mxs/clk-div.c
@@ -9,7 +9,6 @@
* http://www.gnu.org/copyleft/gpl.html
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/slab.h>
diff --git a/drivers/clk/mxs/clk-frac.c b/drivers/clk/mxs/clk-frac.c
index e6aa6b567d68..73f0240569ac 100644
--- a/drivers/clk/mxs/clk-frac.c
+++ b/drivers/clk/mxs/clk-frac.c
@@ -9,7 +9,6 @@
* http://www.gnu.org/copyleft/gpl.html
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/mxs/clk-imx23.c b/drivers/clk/mxs/clk-imx23.c
index 32216f9b7f03..f01876af6bb8 100644
--- a/drivers/clk/mxs/clk-imx23.c
+++ b/drivers/clk/mxs/clk-imx23.c
@@ -9,9 +9,8 @@
* http://www.gnu.org/copyleft/gpl.html
*/

-#include <linux/clk.h>
#include <linux/clk/mxs.h>
-#include <linux/clkdev.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/init.h>
diff --git a/drivers/clk/mxs/clk-imx28.c b/drivers/clk/mxs/clk-imx28.c
index a68670868baa..6b572b759f9a 100644
--- a/drivers/clk/mxs/clk-imx28.c
+++ b/drivers/clk/mxs/clk-imx28.c
@@ -9,9 +9,9 @@
* http://www.gnu.org/copyleft/gpl.html
*/

-#include <linux/clk.h>
#include <linux/clk/mxs.h>
#include <linux/clkdev.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/init.h>
diff --git a/drivers/clk/mxs/clk-pll.c b/drivers/clk/mxs/clk-pll.c
index fadae41833ec..d4ca79a868e0 100644
--- a/drivers/clk/mxs/clk-pll.c
+++ b/drivers/clk/mxs/clk-pll.c
@@ -9,7 +9,6 @@
* http://www.gnu.org/copyleft/gpl.html
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/err.h>
diff --git a/drivers/clk/mxs/clk-ref.c b/drivers/clk/mxs/clk-ref.c
index 4adeed6c2f94..495f99b7965e 100644
--- a/drivers/clk/mxs/clk-ref.c
+++ b/drivers/clk/mxs/clk-ref.c
@@ -9,7 +9,6 @@
* http://www.gnu.org/copyleft/gpl.html
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/mxs/clk.h b/drivers/clk/mxs/clk.h
index f07d821dd75d..a4590956d2a2 100644
--- a/drivers/clk/mxs/clk.h
+++ b/drivers/clk/mxs/clk.h
@@ -12,7 +12,8 @@
#ifndef __MXS_CLK_H
#define __MXS_CLK_H

-#include <linux/clk.h>
+struct clk;
+
#include <linux/clk-provider.h>
#include <linux/spinlock.h>

--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:35:58

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 20/45] clk: nxp: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Joachim Eastwood <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/nxp/clk-lpc18xx-cgu.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/drivers/clk/nxp/clk-lpc18xx-cgu.c b/drivers/clk/nxp/clk-lpc18xx-cgu.c
index 81e9e1c788f4..e0a3cb8970ab 100644
--- a/drivers/clk/nxp/clk-lpc18xx-cgu.c
+++ b/drivers/clk/nxp/clk-lpc18xx-cgu.c
@@ -8,7 +8,6 @@
* warranty of any kind, whether express or implied.
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/kernel.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:36:10

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 21/45] clk: rockchip: Properly include clk.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include clk.h if it's actually used.

Cc: Heiko Stuebner <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/rockchip/clk-cpu.c | 1 +
drivers/clk/rockchip/clk-mmc-phase.c | 1 +
drivers/clk/rockchip/clk-pll.c | 1 -
drivers/clk/rockchip/clk-rk3188.c | 1 +
drivers/clk/rockchip/clk.h | 4 ++--
5 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/clk/rockchip/clk-cpu.c b/drivers/clk/rockchip/clk-cpu.c
index fb7721bd37e6..330870a6d8bf 100644
--- a/drivers/clk/rockchip/clk-cpu.c
+++ b/drivers/clk/rockchip/clk-cpu.c
@@ -35,6 +35,7 @@
#include <linux/of.h>
#include <linux/slab.h>
#include <linux/io.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include "clk.h"

diff --git a/drivers/clk/rockchip/clk-mmc-phase.c b/drivers/clk/rockchip/clk-mmc-phase.c
index e9f8df324e7c..3244c6e391d7 100644
--- a/drivers/clk/rockchip/clk-mmc-phase.c
+++ b/drivers/clk/rockchip/clk-mmc-phase.c
@@ -14,6 +14,7 @@
*/

#include <linux/slab.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include "clk.h"

diff --git a/drivers/clk/rockchip/clk-pll.c b/drivers/clk/rockchip/clk-pll.c
index 76027261f7ed..1f88dd158b93 100644
--- a/drivers/clk/rockchip/clk-pll.c
+++ b/drivers/clk/rockchip/clk-pll.c
@@ -17,7 +17,6 @@
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/delay.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/regmap.h>
#include "clk.h"
diff --git a/drivers/clk/rockchip/clk-rk3188.c b/drivers/clk/rockchip/clk-rk3188.c
index e4f9d472f1ff..91ea848c9d18 100644
--- a/drivers/clk/rockchip/clk-rk3188.c
+++ b/drivers/clk/rockchip/clk-rk3188.c
@@ -13,6 +13,7 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/rockchip/clk.h b/drivers/clk/rockchip/clk.h
index 6b092673048a..1b16781b67c5 100644
--- a/drivers/clk/rockchip/clk.h
+++ b/drivers/clk/rockchip/clk.h
@@ -24,8 +24,8 @@
#define CLK_ROCKCHIP_CLK_H

#include <linux/io.h>
-#include <linux/clk.h>
-#include <linux/clk-provider.h>
+
+struct clk;

#define HIWORD_UPDATE(val, mask, shift) \
((val) << (shift) | (mask) << ((shift) + 16))
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:37:09

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 22/45] clk: samsung: Properly include clk.h and clkdev.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include clk.h in files that are
using it. The clkdev.h header isn't always used either, so remove
it and add in slab.h where files were relying on it to include
slab for them.

Cc: Chanwoo Choi <[email protected]>
Cc: Sylwester Nawrocki <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/samsung/clk-cpu.c | 3 +++
drivers/clk/samsung/clk-exynos-audss.c | 3 ++-
drivers/clk/samsung/clk-exynos-clkout.c | 2 +-
drivers/clk/samsung/clk-exynos3250.c | 2 --
drivers/clk/samsung/clk-exynos4.c | 2 +-
drivers/clk/samsung/clk-exynos4415.c | 2 --
drivers/clk/samsung/clk-exynos5250.c | 2 --
drivers/clk/samsung/clk-exynos5260.c | 2 --
drivers/clk/samsung/clk-exynos5410.c | 2 --
drivers/clk/samsung/clk-exynos5420.c | 3 +--
drivers/clk/samsung/clk-exynos5433.c | 2 --
drivers/clk/samsung/clk-exynos5440.c | 2 --
drivers/clk/samsung/clk-exynos7.c | 2 --
drivers/clk/samsung/clk-pll.c | 2 ++
drivers/clk/samsung/clk-s3c2410.c | 2 --
drivers/clk/samsung/clk-s3c2412.c | 2 --
drivers/clk/samsung/clk-s3c2443.c | 2 --
drivers/clk/samsung/clk-s3c64xx.c | 2 --
drivers/clk/samsung/clk-s5pv210.c | 2 --
drivers/clk/samsung/clk.c | 4 ++++
drivers/clk/samsung/clk.h | 3 ++-
21 files changed, 16 insertions(+), 32 deletions(-)

diff --git a/drivers/clk/samsung/clk-cpu.c b/drivers/clk/samsung/clk-cpu.c
index 3a1fe07cfe9e..8e7f36f105c1 100644
--- a/drivers/clk/samsung/clk-cpu.c
+++ b/drivers/clk/samsung/clk-cpu.c
@@ -33,6 +33,9 @@
*/

#include <linux/errno.h>
+#include <linux/slab.h>
+#include <linux/clk.h>
+#include <linux/clk-provider.h>
#include "clk-cpu.h"

#define E4210_SRC_CPU 0x0
diff --git a/drivers/clk/samsung/clk-exynos-audss.c b/drivers/clk/samsung/clk-exynos-audss.c
index 454b02ae486a..4e9584d79089 100644
--- a/drivers/clk/samsung/clk-exynos-audss.c
+++ b/drivers/clk/samsung/clk-exynos-audss.c
@@ -9,8 +9,9 @@
* Common Clock Framework support for Audio Subsystem Clock Controller.
*/

-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/io.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/of_address.h>
#include <linux/syscore_ops.h>
diff --git a/drivers/clk/samsung/clk-exynos-clkout.c b/drivers/clk/samsung/clk-exynos-clkout.c
index 03a52228b6d1..7cd02ff37a1f 100644
--- a/drivers/clk/samsung/clk-exynos-clkout.c
+++ b/drivers/clk/samsung/clk-exynos-clkout.c
@@ -9,8 +9,8 @@
* Clock driver for Exynos clock output
*/

+#include <linux/slab.h>
#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-exynos3250.c b/drivers/clk/samsung/clk-exynos3250.c
index 538de66a759e..c940fddb0847 100644
--- a/drivers/clk/samsung/clk-exynos3250.c
+++ b/drivers/clk/samsung/clk-exynos3250.c
@@ -8,8 +8,6 @@
* Common Clock Framework support for Exynos3250 SoC.
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-exynos4.c b/drivers/clk/samsung/clk-exynos4.c
index cae2c048488d..65e20eb6356e 100644
--- a/drivers/clk/samsung/clk-exynos4.c
+++ b/drivers/clk/samsung/clk-exynos4.c
@@ -11,8 +11,8 @@
*/

#include <dt-bindings/clock/exynos4.h>
+#include <linux/slab.h>
#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-exynos4415.c b/drivers/clk/samsung/clk-exynos4415.c
index 6c78b09c829f..92c39f6efec8 100644
--- a/drivers/clk/samsung/clk-exynos4415.c
+++ b/drivers/clk/samsung/clk-exynos4415.c
@@ -9,8 +9,6 @@
* Common Clock Framework support for Exynos4415 SoC.
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c
index 70ec3d2608a1..aa356db587df 100644
--- a/drivers/clk/samsung/clk-exynos5250.c
+++ b/drivers/clk/samsung/clk-exynos5250.c
@@ -11,8 +11,6 @@
*/

#include <dt-bindings/clock/exynos5250.h>
-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-exynos5260.c b/drivers/clk/samsung/clk-exynos5260.c
index 06f96eb7cf93..d1a29f6c1084 100644
--- a/drivers/clk/samsung/clk-exynos5260.c
+++ b/drivers/clk/samsung/clk-exynos5260.c
@@ -9,8 +9,6 @@
* Common Clock Framework support for Exynos5260 SoC.
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/of_address.h>

diff --git a/drivers/clk/samsung/clk-exynos5410.c b/drivers/clk/samsung/clk-exynos5410.c
index 231475bc2b99..d5d5dcabc4a9 100644
--- a/drivers/clk/samsung/clk-exynos5410.c
+++ b/drivers/clk/samsung/clk-exynos5410.c
@@ -11,8 +11,6 @@

#include <dt-bindings/clock/exynos5410.h>

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-exynos5420.c b/drivers/clk/samsung/clk-exynos5420.c
index a1d731ca8f48..389af3c15ec4 100644
--- a/drivers/clk/samsung/clk-exynos5420.c
+++ b/drivers/clk/samsung/clk-exynos5420.c
@@ -11,8 +11,7 @@
*/

#include <dt-bindings/clock/exynos5420.h>
-#include <linux/clk.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-exynos5433.c b/drivers/clk/samsung/clk-exynos5433.c
index 39c95649d3d0..cee062c588de 100644
--- a/drivers/clk/samsung/clk-exynos5433.c
+++ b/drivers/clk/samsung/clk-exynos5433.c
@@ -9,8 +9,6 @@
* Common Clock Framework support for Exynos5443 SoC.
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>

diff --git a/drivers/clk/samsung/clk-exynos5440.c b/drivers/clk/samsung/clk-exynos5440.c
index 979e81389cdd..590813871ffe 100644
--- a/drivers/clk/samsung/clk-exynos5440.c
+++ b/drivers/clk/samsung/clk-exynos5440.c
@@ -10,8 +10,6 @@
*/

#include <dt-bindings/clock/exynos5440.h>
-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-exynos7.c b/drivers/clk/samsung/clk-exynos7.c
index 03d36e847b78..8524e667097e 100644
--- a/drivers/clk/samsung/clk-exynos7.c
+++ b/drivers/clk/samsung/clk-exynos7.c
@@ -8,8 +8,6 @@
*
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>

diff --git a/drivers/clk/samsung/clk-pll.c b/drivers/clk/samsung/clk-pll.c
index bebc61b5fce1..e9394261f80f 100644
--- a/drivers/clk/samsung/clk-pll.c
+++ b/drivers/clk/samsung/clk-pll.c
@@ -12,6 +12,8 @@
#include <linux/errno.h>
#include <linux/hrtimer.h>
#include <linux/delay.h>
+#include <linux/slab.h>
+#include <linux/clkdev.h>
#include "clk.h"
#include "clk-pll.h"

diff --git a/drivers/clk/samsung/clk-s3c2410.c b/drivers/clk/samsung/clk-s3c2410.c
index 5d2f03461bc5..0945a8852299 100644
--- a/drivers/clk/samsung/clk-s3c2410.c
+++ b/drivers/clk/samsung/clk-s3c2410.c
@@ -8,8 +8,6 @@
* Common Clock Framework support for S3C2410 and following SoCs.
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-s3c2412.c b/drivers/clk/samsung/clk-s3c2412.c
index 2ceedaf8ce18..44d6a9f4f5b2 100644
--- a/drivers/clk/samsung/clk-s3c2412.c
+++ b/drivers/clk/samsung/clk-s3c2412.c
@@ -8,8 +8,6 @@
* Common Clock Framework support for S3C2412 and S3C2413.
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-s3c2443.c b/drivers/clk/samsung/clk-s3c2443.c
index 0c3c182b902a..2c0a1ea3c80c 100644
--- a/drivers/clk/samsung/clk-s3c2443.c
+++ b/drivers/clk/samsung/clk-s3c2443.c
@@ -8,8 +8,6 @@
* Common Clock Framework support for S3C2443 and following SoCs.
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-s3c64xx.c b/drivers/clk/samsung/clk-s3c64xx.c
index 0f590e5550cb..d4bd6997dea2 100644
--- a/drivers/clk/samsung/clk-s3c64xx.c
+++ b/drivers/clk/samsung/clk-s3c64xx.c
@@ -8,8 +8,6 @@
* Common Clock Framework support for all S3C64xx SoCs.
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk-s5pv210.c b/drivers/clk/samsung/clk-s5pv210.c
index cf7e8fa7b624..67bf813809c6 100644
--- a/drivers/clk/samsung/clk-s5pv210.c
+++ b/drivers/clk/samsung/clk-s5pv210.c
@@ -11,8 +11,6 @@
* Common Clock Framework support for all S5PC110/S5PV210 SoCs.
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
index 0117238391d6..f38a6c49f744 100644
--- a/drivers/clk/samsung/clk.c
+++ b/drivers/clk/samsung/clk.c
@@ -11,6 +11,10 @@
* clock framework for Samsung platforms.
*/

+#include <linux/slab.h>
+#include <linux/clkdev.h>
+#include <linux/clk.h>
+#include <linux/clk-provider.h>
#include <linux/of_address.h>
#include <linux/syscore_ops.h>

diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
index b775fc29caa5..aa872d2c5105 100644
--- a/drivers/clk/samsung/clk.h
+++ b/drivers/clk/samsung/clk.h
@@ -13,10 +13,11 @@
#ifndef __SAMSUNG_CLK_H
#define __SAMSUNG_CLK_H

-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include "clk-pll.h"

+struct clk;
+
/**
* struct samsung_clk_provider: information about clock provider
* @reg_base: virtual address for the register base.
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:35:47

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 23/45] clk: sirf: Properly include clk.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Move the include of clk.h into
clk-common.c because that's the only file that's really using
clk.h, even if it's included into the atlas6 and prima2 files.

Cc: Barry Song <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/sirf/clk-atlas6.c | 1 -
drivers/clk/sirf/clk-common.c | 2 ++
drivers/clk/sirf/clk-prima2.c | 1 -
3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/clk/sirf/clk-atlas6.c b/drivers/clk/sirf/clk-atlas6.c
index d63b76ca60c3..c5eaa9d16247 100644
--- a/drivers/clk/sirf/clk-atlas6.c
+++ b/drivers/clk/sirf/clk-atlas6.c
@@ -10,7 +10,6 @@
#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/sirf/clk-common.c b/drivers/clk/sirf/clk-common.c
index 9fc285d784d3..2f64d4beeb52 100644
--- a/drivers/clk/sirf/clk-common.c
+++ b/drivers/clk/sirf/clk-common.c
@@ -7,6 +7,8 @@
* Licensed under GPLv2 or later.
*/

+#include <linux/clk.h>
+
#define KHZ 1000
#define MHZ (KHZ * KHZ)

diff --git a/drivers/clk/sirf/clk-prima2.c b/drivers/clk/sirf/clk-prima2.c
index 6968e2ebcd8a..f92c40264342 100644
--- a/drivers/clk/sirf/clk-prima2.c
+++ b/drivers/clk/sirf/clk-prima2.c
@@ -10,7 +10,6 @@
#include <linux/module.h>
#include <linux/bitops.h>
#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/of_address.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:36:52

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 24/45] clk: socfpga: Remove clk.h and clkdev.h includes

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. The clkdev.h include isn't used either, remove
it and add in slab.h to make sure things keep compiling.

Cc: Dinh Nguyen <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/socfpga/clk-gate-a10.c | 1 +
drivers/clk/socfpga/clk-gate.c | 3 +--
drivers/clk/socfpga/clk-periph-a10.c | 1 +
drivers/clk/socfpga/clk-periph.c | 3 +--
drivers/clk/socfpga/clk-pll-a10.c | 1 +
drivers/clk/socfpga/clk-pll.c | 3 +--
drivers/clk/socfpga/clk.h | 1 -
7 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/socfpga/clk-gate-a10.c b/drivers/clk/socfpga/clk-gate-a10.c
index 83c6780ff4b2..538ca504dea1 100644
--- a/drivers/clk/socfpga/clk-gate-a10.c
+++ b/drivers/clk/socfpga/clk-gate-a10.c
@@ -13,6 +13,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <linux/slab.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
diff --git a/drivers/clk/socfpga/clk-gate.c b/drivers/clk/socfpga/clk-gate.c
index 82449cd76fd7..37e0bb60ac68 100644
--- a/drivers/clk/socfpga/clk-gate.c
+++ b/drivers/clk/socfpga/clk-gate.c
@@ -15,8 +15,7 @@
* Based from clk-highbank.c
*
*/
-#include <linux/clk.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/mfd/syscon.h>
diff --git a/drivers/clk/socfpga/clk-periph-a10.c b/drivers/clk/socfpga/clk-periph-a10.c
index 9d0181b5a6a4..64f93acbbd25 100644
--- a/drivers/clk/socfpga/clk-periph-a10.c
+++ b/drivers/clk/socfpga/clk-periph-a10.c
@@ -13,6 +13,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <linux/slab.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/of.h>
diff --git a/drivers/clk/socfpga/clk-periph.c b/drivers/clk/socfpga/clk-periph.c
index 83aeaa219d14..ab9c8164a98f 100644
--- a/drivers/clk/socfpga/clk-periph.c
+++ b/drivers/clk/socfpga/clk-periph.c
@@ -15,8 +15,7 @@
* Based from clk-highbank.c
*
*/
-#include <linux/clk.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/of.h>
diff --git a/drivers/clk/socfpga/clk-pll-a10.c b/drivers/clk/socfpga/clk-pll-a10.c
index 1178b11babca..402d630bd531 100644
--- a/drivers/clk/socfpga/clk-pll-a10.c
+++ b/drivers/clk/socfpga/clk-pll-a10.c
@@ -13,6 +13,7 @@
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <linux/slab.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/of.h>
diff --git a/drivers/clk/socfpga/clk-pll.c b/drivers/clk/socfpga/clk-pll.c
index 8f26b5234947..c7f463172e4b 100644
--- a/drivers/clk/socfpga/clk-pll.c
+++ b/drivers/clk/socfpga/clk-pll.c
@@ -15,8 +15,7 @@
* Based from clk-highbank.c
*
*/
-#include <linux/clk.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/of.h>
diff --git a/drivers/clk/socfpga/clk.h b/drivers/clk/socfpga/clk.h
index 603973ab7e29..f4219202844a 100644
--- a/drivers/clk/socfpga/clk.h
+++ b/drivers/clk/socfpga/clk.h
@@ -18,7 +18,6 @@
#define __SOCFPGA_CLK_H

#include <linux/clk-provider.h>
-#include <linux/clkdev.h>

/* Clock Manager offsets */
#define CLKMGR_CTRL 0x0
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:38:35

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 25/45] clk: socfpga: Remove clk.h include

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver.

Cc: Viresh Kumar <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/spear/spear1310_clock.c | 1 -
drivers/clk/spear/spear1340_clock.c | 1 -
drivers/clk/spear/spear3xx_clock.c | 1 -
drivers/clk/spear/spear6xx_clock.c | 1 -
4 files changed, 4 deletions(-)

diff --git a/drivers/clk/spear/spear1310_clock.c b/drivers/clk/spear/spear1310_clock.c
index 4daa5977793a..7cd010f6e12d 100644
--- a/drivers/clk/spear/spear1310_clock.c
+++ b/drivers/clk/spear/spear1310_clock.c
@@ -11,7 +11,6 @@
* warranty of any kind, whether express or implied.
*/

-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/spear/spear1340_clock.c b/drivers/clk/spear/spear1340_clock.c
index 5a5c6648308d..eef57a2e39ee 100644
--- a/drivers/clk/spear/spear1340_clock.c
+++ b/drivers/clk/spear/spear1340_clock.c
@@ -11,7 +11,6 @@
* warranty of any kind, whether express or implied.
*/

-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/spear/spear3xx_clock.c b/drivers/clk/spear/spear3xx_clock.c
index bb5f387774e2..ce2a94c64049 100644
--- a/drivers/clk/spear/spear3xx_clock.c
+++ b/drivers/clk/spear/spear3xx_clock.c
@@ -9,7 +9,6 @@
* warranty of any kind, whether express or implied.
*/

-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/spear/spear6xx_clock.c b/drivers/clk/spear/spear6xx_clock.c
index 4f649c9cb094..46a4dafe46a7 100644
--- a/drivers/clk/spear/spear6xx_clock.c
+++ b/drivers/clk/spear/spear6xx_clock.c
@@ -9,7 +9,6 @@
* warranty of any kind, whether express or implied.
*/

-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/io.h>
#include <linux/spinlock_types.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:38:29

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 26/45] clk: tegra: Properly include clk.h

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Only include clk.h in files that are using
it. Also add in a clkdev.h include that was missing in a file
using clkdev APIs.

Cc: Peter De Schrijver <[email protected]>
Cc: Thierry Reding <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/tegra/clk-divider.c | 1 -
drivers/clk/tegra/clk-periph-gate.c | 1 -
drivers/clk/tegra/clk-periph.c | 1 -
drivers/clk/tegra/clk-pll-out.c | 1 -
drivers/clk/tegra/clk-pll.c | 2 +-
drivers/clk/tegra/clk-super.c | 1 -
drivers/clk/tegra/clk-tegra-audio.c | 1 -
drivers/clk/tegra/clk-tegra-fixed.c | 1 -
drivers/clk/tegra/clk-tegra-periph.c | 1 -
drivers/clk/tegra/clk-tegra-pmc.c | 1 -
drivers/clk/tegra/clk-tegra-super-gen4.c | 1 -
drivers/clk/tegra/clk-tegra114.c | 2 --
drivers/clk/tegra/clk-tegra124.c | 1 -
drivers/clk/tegra/clk-tegra20.c | 1 -
drivers/clk/tegra/clk-tegra30.c | 1 -
drivers/clk/tegra/clk.c | 1 +
include/linux/clk/tegra.h | 3 ++-
17 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/drivers/clk/tegra/clk-divider.c b/drivers/clk/tegra/clk-divider.c
index 59a5714dfe18..48c83efda4cf 100644
--- a/drivers/clk/tegra/clk-divider.c
+++ b/drivers/clk/tegra/clk-divider.c
@@ -19,7 +19,6 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/clk-provider.h>
-#include <linux/clk.h>

#include "clk.h"

diff --git a/drivers/clk/tegra/clk-periph-gate.c b/drivers/clk/tegra/clk-periph-gate.c
index 0aa8830ae7cc..d28d6e95020f 100644
--- a/drivers/clk/tegra/clk-periph-gate.c
+++ b/drivers/clk/tegra/clk-periph-gate.c
@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/slab.h>
#include <linux/io.h>
diff --git a/drivers/clk/tegra/clk-periph.c b/drivers/clk/tegra/clk-periph.c
index d84ae49d0e05..ec5b6113b012 100644
--- a/drivers/clk/tegra/clk-periph.c
+++ b/drivers/clk/tegra/clk-periph.c
@@ -14,7 +14,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/export.h>
#include <linux/slab.h>
diff --git a/drivers/clk/tegra/clk-pll-out.c b/drivers/clk/tegra/clk-pll-out.c
index 3598987a451d..257cae0c1488 100644
--- a/drivers/clk/tegra/clk-pll-out.c
+++ b/drivers/clk/tegra/clk-pll-out.c
@@ -20,7 +20,6 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/clk-provider.h>
-#include <linux/clk.h>

#include "clk.h"

diff --git a/drivers/clk/tegra/clk-pll.c b/drivers/clk/tegra/clk-pll.c
index 05c6d08a6695..63499c461482 100644
--- a/drivers/clk/tegra/clk-pll.c
+++ b/drivers/clk/tegra/clk-pll.c
@@ -18,8 +18,8 @@
#include <linux/io.h>
#include <linux/delay.h>
#include <linux/err.h>
-#include <linux/clk-provider.h>
#include <linux/clk.h>
+#include <linux/clk-provider.h>

#include "clk.h"

diff --git a/drivers/clk/tegra/clk-super.c b/drivers/clk/tegra/clk-super.c
index 2fd924d38606..131d1b5085e2 100644
--- a/drivers/clk/tegra/clk-super.c
+++ b/drivers/clk/tegra/clk-super.c
@@ -20,7 +20,6 @@
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/clk-provider.h>
-#include <linux/clk.h>

#include "clk.h"

diff --git a/drivers/clk/tegra/clk-tegra-audio.c b/drivers/clk/tegra/clk-tegra-audio.c
index 5c38aab2c5b8..11e3ad7ad7a3 100644
--- a/drivers/clk/tegra/clk-tegra-audio.c
+++ b/drivers/clk/tegra/clk-tegra-audio.c
@@ -15,7 +15,6 @@
*/

#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/tegra/clk-tegra-fixed.c b/drivers/clk/tegra/clk-tegra-fixed.c
index 605676d368eb..da0b5941c89f 100644
--- a/drivers/clk/tegra/clk-tegra-fixed.c
+++ b/drivers/clk/tegra/clk-tegra-fixed.c
@@ -15,7 +15,6 @@
*/

#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/tegra/clk-tegra-periph.c b/drivers/clk/tegra/clk-tegra-periph.c
index 46af9244ba74..cb6ab830941d 100644
--- a/drivers/clk/tegra/clk-tegra-periph.c
+++ b/drivers/clk/tegra/clk-tegra-periph.c
@@ -15,7 +15,6 @@
*/

#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/of.h>
diff --git a/drivers/clk/tegra/clk-tegra-pmc.c b/drivers/clk/tegra/clk-tegra-pmc.c
index 08b21c1ee867..91377abfefa1 100644
--- a/drivers/clk/tegra/clk-tegra-pmc.c
+++ b/drivers/clk/tegra/clk-tegra-pmc.c
@@ -15,7 +15,6 @@
*/

#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/of.h>
diff --git a/drivers/clk/tegra/clk-tegra-super-gen4.c b/drivers/clk/tegra/clk-tegra-super-gen4.c
index feb3201c85ce..ecd7ff736b74 100644
--- a/drivers/clk/tegra/clk-tegra-super-gen4.c
+++ b/drivers/clk/tegra/clk-tegra-super-gen4.c
@@ -15,7 +15,6 @@
*/

#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
diff --git a/drivers/clk/tegra/clk-tegra114.c b/drivers/clk/tegra/clk-tegra114.c
index 8237d16b4075..db5871519bf5 100644
--- a/drivers/clk/tegra/clk-tegra114.c
+++ b/drivers/clk/tegra/clk-tegra114.c
@@ -15,9 +15,7 @@
*/

#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/delay.h>
diff --git a/drivers/clk/tegra/clk-tegra124.c b/drivers/clk/tegra/clk-tegra124.c
index e8cca3eac007..0c44cc7f8558 100644
--- a/drivers/clk/tegra/clk-tegra124.c
+++ b/drivers/clk/tegra/clk-tegra124.c
@@ -15,7 +15,6 @@
*/

#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/of.h>
diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c
index 41272dcc9e22..bf004f0e4f65 100644
--- a/drivers/clk/tegra/clk-tegra20.c
+++ b/drivers/clk/tegra/clk-tegra20.c
@@ -15,7 +15,6 @@
*/

#include <linux/io.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/of.h>
diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c
index 0af3e834dd24..fad561a5896b 100644
--- a/drivers/clk/tegra/clk-tegra30.c
+++ b/drivers/clk/tegra/clk-tegra30.c
@@ -16,7 +16,6 @@

#include <linux/io.h>
#include <linux/delay.h>
-#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/of.h>
diff --git a/drivers/clk/tegra/clk.c b/drivers/clk/tegra/clk.c
index 41cd87c67be6..22aa8b18c840 100644
--- a/drivers/clk/tegra/clk.c
+++ b/drivers/clk/tegra/clk.c
@@ -14,6 +14,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

+#include <linux/clkdev.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
diff --git a/include/linux/clk/tegra.h b/include/linux/clk/tegra.h
index 19c4208f4752..57bf7aab4516 100644
--- a/include/linux/clk/tegra.h
+++ b/include/linux/clk/tegra.h
@@ -17,7 +17,8 @@
#ifndef __LINUX_CLK_TEGRA_H_
#define __LINUX_CLK_TEGRA_H_

-#include <linux/clk.h>
+#include <linux/types.h>
+#include <linux/bug.h>

/*
* Tegra CPU clock and reset control ops
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:37:14

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 27/45] clk: ux500: Remove clk.h and clkdev.h includes

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also remove clkdev.h in files that aren't using
it.

Cc: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/ux500/abx500-clk.c | 1 -
drivers/clk/ux500/clk.h | 3 ++-
drivers/clk/ux500/u8500_clk.c | 1 -
drivers/clk/ux500/u8500_of_clk.c | 2 --
drivers/clk/ux500/u8540_clk.c | 1 -
drivers/clk/ux500/u9540_clk.c | 2 --
6 files changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/clk/ux500/abx500-clk.c b/drivers/clk/ux500/abx500-clk.c
index 3e5e05101302..222425d08ab6 100644
--- a/drivers/clk/ux500/abx500-clk.c
+++ b/drivers/clk/ux500/abx500-clk.c
@@ -13,7 +13,6 @@
#include <linux/platform_device.h>
#include <linux/mfd/abx500/ab8500.h>
#include <linux/mfd/abx500/ab8500-sysctrl.h>
-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/mfd/dbx500-prcmu.h>
diff --git a/drivers/clk/ux500/clk.h b/drivers/clk/ux500/clk.h
index a2bb92d85ee0..b42485da704e 100644
--- a/drivers/clk/ux500/clk.h
+++ b/drivers/clk/ux500/clk.h
@@ -10,10 +10,11 @@
#ifndef __UX500_CLK_H
#define __UX500_CLK_H

-#include <linux/clk.h>
#include <linux/device.h>
#include <linux/types.h>

+struct clk;
+
struct clk *clk_reg_prcc_pclk(const char *name,
const char *parent_name,
resource_size_t phy_base,
diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c
index 4626b97b7d83..1c7b639d9222 100644
--- a/drivers/clk/ux500/u8500_clk.c
+++ b/drivers/clk/ux500/u8500_clk.c
@@ -7,7 +7,6 @@
* License terms: GNU General Public License (GPL) version 2
*/

-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/mfd/dbx500-prcmu.h>
diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c
index e319ef912dc6..c3e3b20e4b43 100644
--- a/drivers/clk/ux500/u8500_of_clk.c
+++ b/drivers/clk/ux500/u8500_of_clk.c
@@ -8,8 +8,6 @@
*/

#include <linux/of.h>
-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/mfd/dbx500-prcmu.h>
#include <linux/platform_data/clk-ux500.h>
diff --git a/drivers/clk/ux500/u8540_clk.c b/drivers/clk/ux500/u8540_clk.c
index 20c8add90d11..d0de335ea1e9 100644
--- a/drivers/clk/ux500/u8540_clk.c
+++ b/drivers/clk/ux500/u8540_clk.c
@@ -7,7 +7,6 @@
* License terms: GNU General Public License (GPL) version 2
*/

-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/mfd/dbx500-prcmu.h>
diff --git a/drivers/clk/ux500/u9540_clk.c b/drivers/clk/ux500/u9540_clk.c
index 44794782e7e0..179bd3871b34 100644
--- a/drivers/clk/ux500/u9540_clk.c
+++ b/drivers/clk/ux500/u9540_clk.c
@@ -7,8 +7,6 @@
* License terms: GNU General Public License (GPL) version 2
*/

-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/clk-provider.h>
#include <linux/mfd/dbx500-prcmu.h>
#include <linux/platform_data/clk-ux500.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:38:19

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 28/45] clk: versatile: Remove clk.h and clkdev.h includes

Clock provider drivers generally shouldn't include clk.h because
it's the consumer API. Remove the include here because this is a
provider driver. Also remove clkdev.h in files that aren't using
it and replace them with slab.h in files that were relying on the
implicit include of slab.h in clkdev.h.

Cc: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/versatile/clk-icst.c | 5 +++--
drivers/clk/versatile/clk-impd1.c | 1 -
drivers/clk/versatile/clk-realview.c | 1 -
drivers/clk/versatile/clk-sp810.c | 3 ++-
drivers/clk/versatile/clk-versatile.c | 2 --
5 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/clk/versatile/clk-icst.c b/drivers/clk/versatile/clk-icst.c
index bc96f103bd7c..a3893ea2199d 100644
--- a/drivers/clk/versatile/clk-icst.c
+++ b/drivers/clk/versatile/clk-icst.c
@@ -13,8 +13,9 @@
* ICST clock code from the ARM tree should probably be merged into this
* file.
*/
-#include <linux/clk.h>
-#include <linux/clkdev.h>
+#include <linux/kernel.h>
+#include <linux/slab.h>
+#include <linux/export.h>
#include <linux/err.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
diff --git a/drivers/clk/versatile/clk-impd1.c b/drivers/clk/versatile/clk-impd1.c
index 1cc1330dc570..65c842a21c62 100644
--- a/drivers/clk/versatile/clk-impd1.c
+++ b/drivers/clk/versatile/clk-impd1.c
@@ -7,7 +7,6 @@
* published by the Free Software Foundation.
*/
#include <linux/clk-provider.h>
-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/versatile/clk-realview.c b/drivers/clk/versatile/clk-realview.c
index c8b523117fb7..940cc6f14578 100644
--- a/drivers/clk/versatile/clk-realview.c
+++ b/drivers/clk/versatile/clk-realview.c
@@ -6,7 +6,6 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-#include <linux/clk.h>
#include <linux/clkdev.h>
#include <linux/err.h>
#include <linux/io.h>
diff --git a/drivers/clk/versatile/clk-sp810.c b/drivers/clk/versatile/clk-sp810.c
index a96dd8e53fdb..64b0129a0216 100644
--- a/drivers/clk/versatile/clk-sp810.c
+++ b/drivers/clk/versatile/clk-sp810.c
@@ -12,7 +12,8 @@
*/

#include <linux/amba/sp810.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/err.h>
#include <linux/of.h>
diff --git a/drivers/clk/versatile/clk-versatile.c b/drivers/clk/versatile/clk-versatile.c
index 7a4f8635bd1e..71fa5da89afd 100644
--- a/drivers/clk/versatile/clk-versatile.c
+++ b/drivers/clk/versatile/clk-versatile.c
@@ -8,8 +8,6 @@
* published by the Free Software Foundation.
*/
#include <linux/clk-provider.h>
-#include <linux/clk.h>
-#include <linux/clkdev.h>
#include <linux/err.h>
#include <linux/of.h>
#include <linux/of_address.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:37:49

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 29/45] clk: bcm: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Alex Elder <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/bcm/clk-kona.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/bcm/clk-kona.c b/drivers/clk/bcm/clk-kona.c
index 79a98506c433..5638de8c6489 100644
--- a/drivers/clk/bcm/clk-kona.c
+++ b/drivers/clk/bcm/clk-kona.c
@@ -16,6 +16,7 @@

#include <linux/delay.h>
#include <linux/kernel.h>
+#include <linux/clk.h>

/*
* "Policies" affect the frequencies of bus clocks provided by a
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:38:12

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 30/45] clk: highbank: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Rob Herring <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-highbank.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk-highbank.c b/drivers/clk/clk-highbank.c
index 2e7e9d9798cb..be3a21abb185 100644
--- a/drivers/clk/clk-highbank.c
+++ b/drivers/clk/clk-highbank.c
@@ -17,6 +17,7 @@
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/err.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/of.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:38:09

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 31/45] clk: qcom: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/qcom/mmcc-msm8960.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/qcom/mmcc-msm8960.c b/drivers/clk/qcom/mmcc-msm8960.c
index 9711bca9cc06..2de05e321ad0 100644
--- a/drivers/clk/qcom/mmcc-msm8960.c
+++ b/drivers/clk/qcom/mmcc-msm8960.c
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/regmap.h>
#include <linux/reset-controller.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:37:58

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 32/45] clk: st: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Gabriel Fernandez <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/st/clk-flexgen.c | 1 +
drivers/clk/st/clkgen-fsyn.c | 1 +
drivers/clk/st/clkgen-mux.c | 1 +
drivers/clk/st/clkgen-pll.c | 1 +
4 files changed, 4 insertions(+)

diff --git a/drivers/clk/st/clk-flexgen.c b/drivers/clk/st/clk-flexgen.c
index 657ca14ba709..8e0dbb1f81f8 100644
--- a/drivers/clk/st/clk-flexgen.c
+++ b/drivers/clk/st/clk-flexgen.c
@@ -5,6 +5,7 @@
* Author: Maxime Coquelin <[email protected]> for ST-Microelectronics.
* License terms: GNU General Public License (GPL), version 2 */

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/module.h>
#include <linux/slab.h>
diff --git a/drivers/clk/st/clkgen-fsyn.c b/drivers/clk/st/clkgen-fsyn.c
index e94197f04b0b..90c20717a6bb 100644
--- a/drivers/clk/st/clkgen-fsyn.c
+++ b/drivers/clk/st/clkgen-fsyn.c
@@ -15,6 +15,7 @@

#include <linux/slab.h>
#include <linux/of_address.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>

#include "clkgen.h"
diff --git a/drivers/clk/st/clkgen-mux.c b/drivers/clk/st/clkgen-mux.c
index 4fbe6e099587..4fc95d5332e2 100644
--- a/drivers/clk/st/clkgen-mux.c
+++ b/drivers/clk/st/clkgen-mux.c
@@ -15,6 +15,7 @@

#include <linux/slab.h>
#include <linux/of_address.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>

static DEFINE_SPINLOCK(clkgena_divmux_lock);
diff --git a/drivers/clk/st/clkgen-pll.c b/drivers/clk/st/clkgen-pll.c
index 106532207213..cdb14b9bb942 100644
--- a/drivers/clk/st/clkgen-pll.c
+++ b/drivers/clk/st/clkgen-pll.c
@@ -16,6 +16,7 @@

#include <linux/slab.h>
#include <linux/of_address.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>

#include "clkgen.h"
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:37:40

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 33/45] clk: sunxi: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Chen-Yu Tsai <[email protected]>
Cc: Maxime Ripard <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/sunxi/clk-mod0.c | 3 ++-
drivers/clk/sunxi/clk-sun8i-mbus.c | 2 +-
drivers/clk/sunxi/clk-sun9i-core.c | 2 +-
drivers/clk/sunxi/clk-sun9i-mmc.c | 3 ++-
drivers/clk/sunxi/clk-sunxi.c | 2 ++
drivers/clk/sunxi/clk-usb.c | 3 ++-
6 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
index 9d028aec58e5..39ba5c3d5d3a 100644
--- a/drivers/clk/sunxi/clk-mod0.c
+++ b/drivers/clk/sunxi/clk-mod0.c
@@ -14,8 +14,9 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>

diff --git a/drivers/clk/sunxi/clk-sun8i-mbus.c b/drivers/clk/sunxi/clk-sun8i-mbus.c
index 14cd026064bf..bf117a636d23 100644
--- a/drivers/clk/sunxi/clk-sun8i-mbus.c
+++ b/drivers/clk/sunxi/clk-sun8i-mbus.c
@@ -14,8 +14,8 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/of_address.h>

#include "clk-factors.h"
diff --git a/drivers/clk/sunxi/clk-sun9i-core.c b/drivers/clk/sunxi/clk-sun9i-core.c
index 887f4ea161bb..6c4c98324d3c 100644
--- a/drivers/clk/sunxi/clk-sun9i-core.c
+++ b/drivers/clk/sunxi/clk-sun9i-core.c
@@ -14,8 +14,8 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/log2.h>
diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c
index 710c273648d7..abc9a216b36c 100644
--- a/drivers/clk/sunxi/clk-sun9i-mmc.c
+++ b/drivers/clk/sunxi/clk-sun9i-mmc.c
@@ -14,8 +14,9 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 9a82f17d2d73..3be234138d1d 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -14,6 +14,8 @@
* GNU General Public License for more details.
*/

+#include <linux/slab.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/of.h>
diff --git a/drivers/clk/sunxi/clk-usb.c b/drivers/clk/sunxi/clk-usb.c
index 3a25f9588e67..ecaf9dadcf6b 100644
--- a/drivers/clk/sunxi/clk-usb.c
+++ b/drivers/clk/sunxi/clk-usb.c
@@ -14,8 +14,9 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/reset-controller.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:37:31

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 34/45] clk: ti: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Tero Kristo <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/ti/apll.c | 1 +
drivers/clk/ti/clk-33xx.c | 1 +
drivers/clk/ti/clk-3xxx-legacy.c | 1 +
drivers/clk/ti/clk-3xxx.c | 1 +
drivers/clk/ti/clk-43xx.c | 1 +
drivers/clk/ti/clk-dra7-atl.c | 1 +
drivers/clk/ti/clk.c | 1 +
drivers/clk/ti/clockdomain.c | 1 +
drivers/clk/ti/dpll.c | 1 +
drivers/clk/ti/fapll.c | 1 +
10 files changed, 10 insertions(+)

diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c
index 49baf3831546..671f4d89db93 100644
--- a/drivers/clk/ti/apll.c
+++ b/drivers/clk/ti/apll.c
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/module.h>
#include <linux/slab.h>
diff --git a/drivers/clk/ti/clk-33xx.c b/drivers/clk/ti/clk-33xx.c
index 028b33783d38..9616bcdba220 100644
--- a/drivers/clk/ti/clk-33xx.c
+++ b/drivers/clk/ti/clk-33xx.c
@@ -16,6 +16,7 @@

#include <linux/kernel.h>
#include <linux/list.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clk/ti.h>

diff --git a/drivers/clk/ti/clk-3xxx-legacy.c b/drivers/clk/ti/clk-3xxx-legacy.c
index 0b61548d569b..0fbf8a917955 100644
--- a/drivers/clk/ti/clk-3xxx-legacy.c
+++ b/drivers/clk/ti/clk-3xxx-legacy.c
@@ -15,6 +15,7 @@
*/

#include <linux/kernel.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clk/ti.h>

diff --git a/drivers/clk/ti/clk-3xxx.c b/drivers/clk/ti/clk-3xxx.c
index 757636d166cf..5df21b258658 100644
--- a/drivers/clk/ti/clk-3xxx.c
+++ b/drivers/clk/ti/clk-3xxx.c
@@ -16,6 +16,7 @@

#include <linux/kernel.h>
#include <linux/list.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clk/ti.h>

diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
index 3795fce8a830..39a594c0d100 100644
--- a/drivers/clk/ti/clk-43xx.c
+++ b/drivers/clk/ti/clk-43xx.c
@@ -16,6 +16,7 @@

#include <linux/kernel.h>
#include <linux/list.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clk/ti.h>

diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
index 19e543a32e2b..2e14dfb588f4 100644
--- a/drivers/clk/ti/clk-dra7-atl.c
+++ b/drivers/clk/ti/clk-dra7-atl.c
@@ -16,6 +16,7 @@
*/

#include <linux/module.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/slab.h>
#include <linux/io.h>
diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c
index 64bb5e8a3b8c..7132cec33f00 100644
--- a/drivers/clk/ti/clk.c
+++ b/drivers/clk/ti/clk.c
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/clk/ti.h>
diff --git a/drivers/clk/ti/clockdomain.c b/drivers/clk/ti/clockdomain.c
index b82ef07f3403..41eb5d105846 100644
--- a/drivers/clk/ti/clockdomain.c
+++ b/drivers/clk/ti/clockdomain.c
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/slab.h>
#include <linux/of.h>
diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c
index 2aacf7a3bcae..74e94b9bae55 100644
--- a/drivers/clk/ti/dpll.c
+++ b/drivers/clk/ti/dpll.c
@@ -15,6 +15,7 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/slab.h>
#include <linux/err.h>
diff --git a/drivers/clk/ti/fapll.c b/drivers/clk/ti/fapll.c
index 730aa62454a2..f158c2ab019d 100644
--- a/drivers/clk/ti/fapll.c
+++ b/drivers/clk/ti/fapll.c
@@ -9,6 +9,7 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/err.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:39:58

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 35/45] clk: zynq: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Sören Brinkmann <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/zynq/clkc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/zynq/clkc.c b/drivers/clk/zynq/clkc.c
index de614384bb44..38a65c3e62fc 100644
--- a/drivers/clk/zynq/clkc.c
+++ b/drivers/clk/zynq/clkc.c
@@ -19,6 +19,7 @@
*/

#include <linux/clk/zynq.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/of.h>
#include <linux/of_address.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:40:20

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 36/45] clk: Include clk.h in clk.c

This file implements the clk API and so it should include clk.h
directly instead of indirectly including it through
clk-provider.h.

Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index ddb4b541016f..89e531a3f384 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -9,6 +9,7 @@
* Standard functionality for the common clock API. See Documentation/clk.txt
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clk/clk-conf.h>
#include <linux/module.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:39:50

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 37/45] clk: cdce925: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Mike Looijmans <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-cdce925.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk-cdce925.c b/drivers/clk/clk-cdce925.c
index 85fafb41e6ca..089bf88ffa8d 100644
--- a/drivers/clk/clk-cdce925.c
+++ b/drivers/clk/clk-cdce925.c
@@ -10,6 +10,7 @@
* Copyright (C) 2014, Topic Embedded Products
* Licenced under GPL
*/
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/module.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:40:10

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 38/45] clk: moxart: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Jonas Jensen <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-moxart.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk-moxart.c b/drivers/clk/clk-moxart.c
index 5181b89c3cb2..f37f719643ec 100644
--- a/drivers/clk/clk-moxart.c
+++ b/drivers/clk/clk-moxart.c
@@ -10,6 +10,7 @@
* warranty of any kind, whether express or implied.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/io.h>
#include <linux/of_address.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:39:41

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 39/45] clk: si570: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Guenter Roeck <[email protected]>
Cc: Soren Brinkmann <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/clk-si570.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/clk-si570.c b/drivers/clk/clk-si570.c
index 20a5aec98b1a..cf478aa9fa5d 100644
--- a/drivers/clk/clk-si570.c
+++ b/drivers/clk/clk-si570.c
@@ -19,6 +19,7 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/delay.h>
#include <linux/module.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:39:30

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 40/45] clk: ingenic: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Paul Burton <[email protected]>
Cc: Paul Cercueil <[email protected]>
Cc: Ralf Baechle <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/ingenic/cgu.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/ingenic/cgu.c b/drivers/clk/ingenic/cgu.c
index b936cdd1a13c..7cfb7b2a2ed6 100644
--- a/drivers/clk/ingenic/cgu.c
+++ b/drivers/clk/ingenic/cgu.c
@@ -16,6 +16,7 @@
*/

#include <linux/bitops.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/delay.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:39:18

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 41/45] clk: pistachio: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Andrew Bresticker <[email protected]>
Cc: Ralf Baechle <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/pistachio/clk.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/clk/pistachio/clk.c b/drivers/clk/pistachio/clk.c
index 85faa83e1bd7..698cad4f509e 100644
--- a/drivers/clk/pistachio/clk.c
+++ b/drivers/clk/pistachio/clk.c
@@ -6,6 +6,7 @@
* version 2, as published by the Free Software Foundation.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/kernel.h>
#include <linux/of.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:39:10

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 42/45] clk: samsung: s5pv210-audss: Include clk.h

This clock provider uses the consumer API, so include clk.h
explicitly.

Cc: Kukjin Kim <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/samsung/clk-s5pv210-audss.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/samsung/clk-s5pv210-audss.c b/drivers/clk/samsung/clk-s5pv210-audss.c
index de4455b75e8a..eefb84b22566 100644
--- a/drivers/clk/samsung/clk-s5pv210-audss.c
+++ b/drivers/clk/samsung/clk-s5pv210-audss.c
@@ -13,8 +13,8 @@
* Driver for Audio Subsystem Clock Controller of S5PV210-compatible SoCs.
*/

-#include <linux/clkdev.h>
#include <linux/io.h>
+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/of_address.h>
#include <linux/syscore_ops.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:39:00

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 43/45] clk: ti: Switch clk-provider.h include to clk.h

This file isn't a clock provider but uses the consumer API, so
include clk.h instead of clk-provider.h.

Cc: Tero Kristo <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/ti/clk-2xxx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/clk/ti/clk-2xxx.c b/drivers/clk/ti/clk-2xxx.c
index c808ab3d2bb2..20cf5eed8c3d 100644
--- a/drivers/clk/ti/clk-2xxx.c
+++ b/drivers/clk/ti/clk-2xxx.c
@@ -16,7 +16,7 @@

#include <linux/kernel.h>
#include <linux/list.h>
-#include <linux/clk-provider.h>
+#include <linux/clk.h>
#include <linux/clk/ti.h>

static struct ti_dt_clk omap2xxx_clks[] = {
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:38:52

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 44/45] clk: at91: Include clk.h and slab.h

This clock provider uses the consumer API, so include clk.h
explicitly. Also include slab.h instead of relying on clkdev.h
for it.

Cc: Boris BREZILLON <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/at91/clk-slow.c | 2 ++
1 file changed, 2 insertions(+)

diff --git a/drivers/clk/at91/clk-slow.c b/drivers/clk/at91/clk-slow.c
index 98a84a865fe1..0a7aef39ab5b 100644
--- a/drivers/clk/at91/clk-slow.c
+++ b/drivers/clk/at91/clk-slow.c
@@ -10,8 +10,10 @@
*
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
+#include <linux/slab.h>
#include <linux/clk/at91_pmc.h>
#include <linux/delay.h>
#include <linux/of.h>
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-10 23:38:44

by Stephen Boyd

[permalink] [raw]
Subject: [PATCH 45/45] clk: Remove clk.h from clk-provider.h

Remove clk.h from clk-provider.h so that we can clearly split clk
providers from clk consumers. This will allow us to quickly
detect when clock providers are using the consumer APIs by
looking at the includes.

Signed-off-by: Stephen Boyd <[email protected]>
---
include/linux/clk-provider.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
index 78842f46f152..36fa555ff431 100644
--- a/include/linux/clk-provider.h
+++ b/include/linux/clk-provider.h
@@ -11,7 +11,6 @@
#ifndef __LINUX_CLK_PROVIDER_H
#define __LINUX_CLK_PROVIDER_H

-#include <linux/clk.h>
#include <linux/io.h>
#include <linux/of.h>

@@ -33,6 +32,7 @@
#define CLK_GET_ACCURACY_NOCACHE BIT(8) /* do not use the cached clk accuracy */
#define CLK_RECALC_NEW_RATES BIT(9) /* recalc rates after notifications */

+struct clk;
struct clk_hw;
struct clk_core;
struct dentry;
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-11 07:07:24

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 22/45] clk: samsung: Properly include clk.h and clkdev.h

W dniu 11.07.2015 o 08:33, Stephen Boyd pisze:
> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Only include clk.h in files that are
> using it. The clkdev.h header isn't always used either, so remove
> it and add in slab.h where files were relying on it to include
> slab for them.
>
> Cc: Chanwoo Choi <[email protected]>
> Cc: Sylwester Nawrocki <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> drivers/clk/samsung/clk-cpu.c | 3 +++
> drivers/clk/samsung/clk-exynos-audss.c | 3 ++-
> drivers/clk/samsung/clk-exynos-clkout.c | 2 +-
> drivers/clk/samsung/clk-exynos3250.c | 2 --
> drivers/clk/samsung/clk-exynos4.c | 2 +-
> drivers/clk/samsung/clk-exynos4415.c | 2 --
> drivers/clk/samsung/clk-exynos5250.c | 2 --
> drivers/clk/samsung/clk-exynos5260.c | 2 --
> drivers/clk/samsung/clk-exynos5410.c | 2 --
> drivers/clk/samsung/clk-exynos5420.c | 3 +--
> drivers/clk/samsung/clk-exynos5433.c | 2 --
> drivers/clk/samsung/clk-exynos5440.c | 2 --
> drivers/clk/samsung/clk-exynos7.c | 2 --
> drivers/clk/samsung/clk-pll.c | 2 ++
> drivers/clk/samsung/clk-s3c2410.c | 2 --
> drivers/clk/samsung/clk-s3c2412.c | 2 --
> drivers/clk/samsung/clk-s3c2443.c | 2 --
> drivers/clk/samsung/clk-s3c64xx.c | 2 --
> drivers/clk/samsung/clk-s5pv210.c | 2 --
> drivers/clk/samsung/clk.c | 4 ++++
> drivers/clk/samsung/clk.h | 3 ++-
> 21 files changed, 16 insertions(+), 32 deletions(-)

One comment at the end.

(...)

> diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
> index 0117238391d6..f38a6c49f744 100644
> --- a/drivers/clk/samsung/clk.c
> +++ b/drivers/clk/samsung/clk.c
> @@ -11,6 +11,10 @@
> * clock framework for Samsung platforms.
> */
>
> +#include <linux/slab.h>
> +#include <linux/clkdev.h>
> +#include <linux/clk.h>
> +#include <linux/clk-provider.h>
> #include <linux/of_address.h>
> #include <linux/syscore_ops.h>
>
> diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
> index b775fc29caa5..aa872d2c5105 100644
> --- a/drivers/clk/samsung/clk.h
> +++ b/drivers/clk/samsung/clk.h
> @@ -13,10 +13,11 @@
> #ifndef __SAMSUNG_CLK_H
> #define __SAMSUNG_CLK_H
>
> -#include <linux/clkdev.h>
> #include <linux/clk-provider.h>
> #include "clk-pll.h"
>
> +struct clk;
> +

Hmmm... why? Including clk-provider (which declares struct clk in your
last patch) is not sufficient?

Best regards,
Krzysztof

> /**
> * struct samsung_clk_provider: information about clock provider
> * @reg_base: virtual address for the register base.
>

2015-07-11 07:24:05

by Joachim Eastwood

[permalink] [raw]
Subject: Re: [PATCH 20/45] clk: nxp: Remove clk.h include

On 11 July 2015 at 01:33, Stephen Boyd <[email protected]> wrote:
> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Remove the include here because this is a
> provider driver.
>
> Cc: Joachim Eastwood <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Joachim Eastwood <[email protected]>

2015-07-11 17:24:59

by Uwe Kleine-König

[permalink] [raw]
Subject: Re: [PATCH 04/45] clk: efm32gg: Remove clk.h include

On Fri, Jul 10, 2015 at 04:33:02PM -0700, Stephen Boyd wrote:
> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Remove the include here because this is a
> provider driver.
>
> Cc: Uwe Kleine-K?nig <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
Still compiles with your change, so fine.

Acked-by: Uwe Kleine-K?nig <[email protected]>

Best regards
Uwe

--
Pengutronix e.K. | Uwe Kleine-K?nig |
Industrial Linux Solutions | http://www.pengutronix.de/ |

2015-07-12 02:47:05

by Shawn Guo

[permalink] [raw]
Subject: Re: [PATCH 19/45] clk: mxs: Include clk.h in C files that use it

On Sat, Jul 11, 2015 at 7:33 AM, Stephen Boyd <[email protected]> wrote:
> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. The clk.h include is being included in all
> mxs files because it's part of mxs/clk.h even though nothing
> actually requires it in that file. Move the clk.h include to the
> C files that are actually using it and remove the clk.h include
> from the header file. The clkdev.h include isn't used either, so
> drop it too.
>
> Cc: Shawn Guo <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Shawn Guo <[email protected]>

2015-07-13 02:33:50

by Viresh Kumar

[permalink] [raw]
Subject: Re: [PATCH 25/45] clk: socfpga: Remove clk.h include

On 10-07-15, 16:33, Stephen Boyd wrote:
> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Remove the include here because this is a
> provider driver.
>
> Cc: Viresh Kumar <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> drivers/clk/spear/spear1310_clock.c | 1 -
> drivers/clk/spear/spear1340_clock.c | 1 -
> drivers/clk/spear/spear3xx_clock.c | 1 -
> drivers/clk/spear/spear6xx_clock.c | 1 -
> 4 files changed, 4 deletions(-)

I hope you have compiled it :)

Acked-by: Viresh Kumar <[email protected]>

--
viresh

2015-07-13 09:37:57

by Tero Kristo

[permalink] [raw]
Subject: Re: [PATCH 34/45] clk: ti: Include clk.h

On 07/11/2015 02:33 AM, Stephen Boyd wrote:
> This clock provider uses the consumer API, so include clk.h
> explicitly.
>
> Cc: Tero Kristo <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Tero Kristo <[email protected]>

> ---
> drivers/clk/ti/apll.c | 1 +
> drivers/clk/ti/clk-33xx.c | 1 +
> drivers/clk/ti/clk-3xxx-legacy.c | 1 +
> drivers/clk/ti/clk-3xxx.c | 1 +
> drivers/clk/ti/clk-43xx.c | 1 +
> drivers/clk/ti/clk-dra7-atl.c | 1 +
> drivers/clk/ti/clk.c | 1 +
> drivers/clk/ti/clockdomain.c | 1 +
> drivers/clk/ti/dpll.c | 1 +
> drivers/clk/ti/fapll.c | 1 +
> 10 files changed, 10 insertions(+)
>
> diff --git a/drivers/clk/ti/apll.c b/drivers/clk/ti/apll.c
> index 49baf3831546..671f4d89db93 100644
> --- a/drivers/clk/ti/apll.c
> +++ b/drivers/clk/ti/apll.c
> @@ -15,6 +15,7 @@
> * GNU General Public License for more details.
> */
>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/module.h>
> #include <linux/slab.h>
> diff --git a/drivers/clk/ti/clk-33xx.c b/drivers/clk/ti/clk-33xx.c
> index 028b33783d38..9616bcdba220 100644
> --- a/drivers/clk/ti/clk-33xx.c
> +++ b/drivers/clk/ti/clk-33xx.c
> @@ -16,6 +16,7 @@
>
> #include <linux/kernel.h>
> #include <linux/list.h>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/clk/ti.h>
>
> diff --git a/drivers/clk/ti/clk-3xxx-legacy.c b/drivers/clk/ti/clk-3xxx-legacy.c
> index 0b61548d569b..0fbf8a917955 100644
> --- a/drivers/clk/ti/clk-3xxx-legacy.c
> +++ b/drivers/clk/ti/clk-3xxx-legacy.c
> @@ -15,6 +15,7 @@
> */
>
> #include <linux/kernel.h>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/clk/ti.h>
>
> diff --git a/drivers/clk/ti/clk-3xxx.c b/drivers/clk/ti/clk-3xxx.c
> index 757636d166cf..5df21b258658 100644
> --- a/drivers/clk/ti/clk-3xxx.c
> +++ b/drivers/clk/ti/clk-3xxx.c
> @@ -16,6 +16,7 @@
>
> #include <linux/kernel.h>
> #include <linux/list.h>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/clk/ti.h>
>
> diff --git a/drivers/clk/ti/clk-43xx.c b/drivers/clk/ti/clk-43xx.c
> index 3795fce8a830..39a594c0d100 100644
> --- a/drivers/clk/ti/clk-43xx.c
> +++ b/drivers/clk/ti/clk-43xx.c
> @@ -16,6 +16,7 @@
>
> #include <linux/kernel.h>
> #include <linux/list.h>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/clk/ti.h>
>
> diff --git a/drivers/clk/ti/clk-dra7-atl.c b/drivers/clk/ti/clk-dra7-atl.c
> index 19e543a32e2b..2e14dfb588f4 100644
> --- a/drivers/clk/ti/clk-dra7-atl.c
> +++ b/drivers/clk/ti/clk-dra7-atl.c
> @@ -16,6 +16,7 @@
> */
>
> #include <linux/module.h>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/slab.h>
> #include <linux/io.h>
> diff --git a/drivers/clk/ti/clk.c b/drivers/clk/ti/clk.c
> index 64bb5e8a3b8c..7132cec33f00 100644
> --- a/drivers/clk/ti/clk.c
> +++ b/drivers/clk/ti/clk.c
> @@ -15,6 +15,7 @@
> * GNU General Public License for more details.
> */
>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/clkdev.h>
> #include <linux/clk/ti.h>
> diff --git a/drivers/clk/ti/clockdomain.c b/drivers/clk/ti/clockdomain.c
> index b82ef07f3403..41eb5d105846 100644
> --- a/drivers/clk/ti/clockdomain.c
> +++ b/drivers/clk/ti/clockdomain.c
> @@ -15,6 +15,7 @@
> * GNU General Public License for more details.
> */
>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/slab.h>
> #include <linux/of.h>
> diff --git a/drivers/clk/ti/dpll.c b/drivers/clk/ti/dpll.c
> index 2aacf7a3bcae..74e94b9bae55 100644
> --- a/drivers/clk/ti/dpll.c
> +++ b/drivers/clk/ti/dpll.c
> @@ -15,6 +15,7 @@
> * GNU General Public License for more details.
> */
>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/slab.h>
> #include <linux/err.h>
> diff --git a/drivers/clk/ti/fapll.c b/drivers/clk/ti/fapll.c
> index 730aa62454a2..f158c2ab019d 100644
> --- a/drivers/clk/ti/fapll.c
> +++ b/drivers/clk/ti/fapll.c
> @@ -9,6 +9,7 @@
> * GNU General Public License for more details.
> */
>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/delay.h>
> #include <linux/err.h>
>

2015-07-13 09:38:26

by Tero Kristo

[permalink] [raw]
Subject: Re: [PATCH 43/45] clk: ti: Switch clk-provider.h include to clk.h

On 07/11/2015 02:33 AM, Stephen Boyd wrote:
> This file isn't a clock provider but uses the consumer API, so
> include clk.h instead of clk-provider.h.
>
> Cc: Tero Kristo <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Tero Kristo <[email protected]>

> ---
> drivers/clk/ti/clk-2xxx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/clk/ti/clk-2xxx.c b/drivers/clk/ti/clk-2xxx.c
> index c808ab3d2bb2..20cf5eed8c3d 100644
> --- a/drivers/clk/ti/clk-2xxx.c
> +++ b/drivers/clk/ti/clk-2xxx.c
> @@ -16,7 +16,7 @@
>
> #include <linux/kernel.h>
> #include <linux/list.h>
> -#include <linux/clk-provider.h>
> +#include <linux/clk.h>
> #include <linux/clk/ti.h>
>
> static struct ti_dt_clk omap2xxx_clks[] = {
>

2015-07-13 12:44:49

by Alex Elder

[permalink] [raw]
Subject: Re: [PATCH 29/45] clk: bcm: Include clk.h

On 07/10/2015 06:33 PM, Stephen Boyd wrote:
> This clock provider uses the consumer API, so include clk.h
> explicitly.
>
> Cc: Alex Elder <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Alex Elder <[email protected]>

> ---
> drivers/clk/bcm/clk-kona.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/clk/bcm/clk-kona.c b/drivers/clk/bcm/clk-kona.c
> index 79a98506c433..5638de8c6489 100644
> --- a/drivers/clk/bcm/clk-kona.c
> +++ b/drivers/clk/bcm/clk-kona.c
> @@ -16,6 +16,7 @@
>
> #include <linux/delay.h>
> #include <linux/kernel.h>
> +#include <linux/clk.h>
>
> /*
> * "Policies" affect the frequencies of bus clocks provided by a
>

2015-07-13 16:07:44

by Dinh Nguyen

[permalink] [raw]
Subject: Re: [PATCH 24/45] clk: socfpga: Remove clk.h and clkdev.h includes

On 07/10/2015 06:33 PM, Stephen Boyd wrote:
> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Remove the include here because this is a
> provider driver. The clkdev.h include isn't used either, remove
> it and add in slab.h to make sure things keep compiling.
>
> Cc: Dinh Nguyen <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> drivers/clk/socfpga/clk-gate-a10.c | 1 +
> drivers/clk/socfpga/clk-gate.c | 3 +--
> drivers/clk/socfpga/clk-periph-a10.c | 1 +
> drivers/clk/socfpga/clk-periph.c | 3 +--
> drivers/clk/socfpga/clk-pll-a10.c | 1 +
> drivers/clk/socfpga/clk-pll.c | 3 +--
> drivers/clk/socfpga/clk.h | 1 -
> 7 files changed, 6 insertions(+), 7 deletions(-)
>

Acked-by: Dinh Nguyen <[email protected]>

Thanks,
Dinh

2015-07-13 17:09:28

by Soren Brinkmann

[permalink] [raw]
Subject: Re: [PATCH 35/45] clk: zynq: Include clk.h

On Fri, 2015-07-10 at 04:33PM -0700, Stephen Boyd wrote:
> This clock provider uses the consumer API, so include clk.h
> explicitly.
>
> Cc: Sören Brinkmann <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
Acked-by: Sören Brinkmann <[email protected]>

Thanks,
Sören

2015-07-13 16:55:30

by Soren Brinkmann

[permalink] [raw]
Subject: Re: [PATCH 39/45] clk: si570: Include clk.h

On Fri, 2015-07-10 at 04:33PM -0700, Stephen Boyd wrote:
> This clock provider uses the consumer API, so include clk.h
> explicitly.
>
> Cc: Guenter Roeck <[email protected]>
> Cc: Soren Brinkmann <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
Acked-by: Sören Brinkmann <[email protected]>

Thanks,
Sören

2015-07-13 20:42:09

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 22/45] clk: samsung: Properly include clk.h and clkdev.h

On 07/11/2015 12:07 AM, Krzysztof Kozlowski wrote:
> W dniu 11.07.2015 o 08:33, Stephen Boyd pisze:
>
>> diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
>> index 0117238391d6..f38a6c49f744 100644
>> --- a/drivers/clk/samsung/clk.c
>> +++ b/drivers/clk/samsung/clk.c
>> @@ -11,6 +11,10 @@
>> * clock framework for Samsung platforms.
>> */
>>
>> +#include <linux/slab.h>
>> +#include <linux/clkdev.h>
>> +#include <linux/clk.h>
>> +#include <linux/clk-provider.h>
>> #include <linux/of_address.h>
>> #include <linux/syscore_ops.h>
>>
>> diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
>> index b775fc29caa5..aa872d2c5105 100644
>> --- a/drivers/clk/samsung/clk.h
>> +++ b/drivers/clk/samsung/clk.h
>> @@ -13,10 +13,11 @@
>> #ifndef __SAMSUNG_CLK_H
>> #define __SAMSUNG_CLK_H
>>
>> -#include <linux/clkdev.h>
>> #include <linux/clk-provider.h>
>> #include "clk-pll.h"
>>
>> +struct clk;
>> +
> Hmmm... why? Including clk-provider (which declares struct clk in your
> last patch) is not sufficient?
>

I hope to eventually remove the forward declaration of struct clk in
clk-provider.h too. That will take some more time though. I can leave
this part out of the patch if you like and add it back when that work is
done, it doesn't matter to me.

--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-13 23:46:34

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH 22/45] clk: samsung: Properly include clk.h and clkdev.h

On 14.07.2015 05:42, Stephen Boyd wrote:
> On 07/11/2015 12:07 AM, Krzysztof Kozlowski wrote:
>> W dniu 11.07.2015 o 08:33, Stephen Boyd pisze:
>>
>>> diff --git a/drivers/clk/samsung/clk.c b/drivers/clk/samsung/clk.c
>>> index 0117238391d6..f38a6c49f744 100644
>>> --- a/drivers/clk/samsung/clk.c
>>> +++ b/drivers/clk/samsung/clk.c
>>> @@ -11,6 +11,10 @@
>>> * clock framework for Samsung platforms.
>>> */
>>> +#include <linux/slab.h>
>>> +#include <linux/clkdev.h>
>>> +#include <linux/clk.h>
>>> +#include <linux/clk-provider.h>
>>> #include <linux/of_address.h>
>>> #include <linux/syscore_ops.h>
>>> diff --git a/drivers/clk/samsung/clk.h b/drivers/clk/samsung/clk.h
>>> index b775fc29caa5..aa872d2c5105 100644
>>> --- a/drivers/clk/samsung/clk.h
>>> +++ b/drivers/clk/samsung/clk.h
>>> @@ -13,10 +13,11 @@
>>> #ifndef __SAMSUNG_CLK_H
>>> #define __SAMSUNG_CLK_H
>>> -#include <linux/clkdev.h>
>>> #include <linux/clk-provider.h>
>>> #include "clk-pll.h"
>>> +struct clk;
>>> +
>> Hmmm... why? Including clk-provider (which declares struct clk in your
>> last patch) is not sufficient?
>>
>
> I hope to eventually remove the forward declaration of struct clk in
> clk-provider.h too. That will take some more time though. I can leave
> this part out of the patch if you like and add it back when that work is
> done, it doesn't matter to me.

Thanks for explanation, it's fine as it is.

Best regards,
Krzysztof

2015-07-16 13:27:42

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 06/45] clk: nomadik: Remove clk.h and clkdev.h includes

On Sat, Jul 11, 2015 at 1:33 AM, Stephen Boyd <[email protected]> wrote:

> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Remove the include here because this is a
> provider driver. This driver also includes clkdev.h even though
> it isn't used, so drop it too and add slab.h to make sure
> everything still compiles.
>
> Cc: Linus Walleij <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Reviewed-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

2015-07-16 13:28:18

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 11/45] clk: u300: Remove clk.h include

On Sat, Jul 11, 2015 at 1:33 AM, Stephen Boyd <[email protected]> wrote:

> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Remove the include here because this is a
> provider driver. Also add in slab.h because without clkdev.h
> compilation of this file would fail.
>
> Cc: Linus Walleij <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Reviewed-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

2015-07-16 13:28:52

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 28/45] clk: versatile: Remove clk.h and clkdev.h includes

On Sat, Jul 11, 2015 at 1:33 AM, Stephen Boyd <[email protected]> wrote:

> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Remove the include here because this is a
> provider driver. Also remove clkdev.h in files that aren't using
> it and replace them with slab.h in files that were relying on the
> implicit include of slab.h in clkdev.h.
>
> Cc: Linus Walleij <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Reviewed-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

2015-07-16 13:29:41

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 27/45] clk: ux500: Remove clk.h and clkdev.h includes

On Sat, Jul 11, 2015 at 1:33 AM, Stephen Boyd <[email protected]> wrote:

> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Remove the include here because this is a
> provider driver. Also remove clkdev.h in files that aren't using
> it.
>
> Cc: Linus Walleij <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Linus Walleij <[email protected]>

Ulf Hansson should also look at this preferably.

Yours,
Linus Walleij

2015-07-18 18:07:13

by Paul Gortmaker

[permalink] [raw]
Subject: Re: [PATCH 22/45] clk: samsung: Properly include clk.h and clkdev.h

On Mon, Jul 13, 2015 at 4:42 PM, Stephen Boyd <[email protected]> wrote:
>

[...]

> I hope to eventually remove the forward declaration of struct clk in
> clk-provider.h too. That will take some more time though. I can leave this
> part out of the patch if you like and add it back when that work is done, it
> doesn't matter to me.

The current version of this patch seems to break at least one of the
linux-next builds:

Bisecting: 0 revisions left to test after this (roughly 0 steps)
[41608067f4b3912d03eeb2ad4f9db8cbe4d969ca] clk: samsung: Properly
include clk.h and clkdev.h
running ./x
#
# configuration written to .config
#
drivers/clk/samsung/clk-s3c2410-dclk.c: In function 's3c24xx_register_clkout':
drivers/clk/samsung/clk-s3c2410-dclk.c:99:2: error: implicit
declaration of function 'kzalloc'
[-Werror=implicit-function-declaration]
drivers/clk/samsung/clk-s3c2410-dclk.c:99:9: warning: assignment makes
pointer from integer without a cast [enabled by default]
drivers/clk/samsung/clk-s3c2410-dclk.c: In function 's3c24xx_dclk_probe':
drivers/clk/samsung/clk-s3c2410-dclk.c:312:2: error: implicit
declaration of function 'clk_register_clkdev'
[-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [drivers/clk/samsung/clk-s3c2410-dclk.o] Error 1
make[1]: *** [drivers/clk/samsung] Error 2
make: *** [drivers/clk/] Error 2
41608067f4b3912d03eeb2ad4f9db8cbe4d969ca is the first bad commit
commit 41608067f4b3912d03eeb2ad4f9db8cbe4d969ca
Author: Stephen Boyd <[email protected]>
Date: Fri Jun 19 15:00:46 2015 -0700

clk: samsung: Properly include clk.h and clkdev.h

http://kisskb.ellerman.id.au/kisskb/buildresult/12465308/

Paul.
--

>
> --
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2015-07-18 18:18:09

by Paul Gortmaker

[permalink] [raw]
Subject: Re: [PATCH 45/45] clk: Remove clk.h from clk-provider.h

On Fri, Jul 10, 2015 at 7:33 PM, Stephen Boyd <[email protected]> wrote:
> Remove clk.h from clk-provider.h so that we can clearly split clk
> providers from clk consumers. This will allow us to quickly
> detect when clock providers are using the consumer APIs by
> looking at the includes.

At least one build does not like this change:

running ./x
#
# configuration written to .config
#
drivers/clk/spear/spear3xx_clock.c: In function 'spear320_clk_init':
drivers/clk/spear/spear3xx_clock.c:346:2: error: implicit declaration
of function 'clk_set_parent' [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[2]: *** [drivers/clk/spear/spear3xx_clock.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [drivers/clk/spear] Error 2
make[1]: *** Waiting for unfinished jobs....
make: *** [drivers/clk/] Error 2
3a2c322b68f8137be2f1f5788b13bfb9e0b937c3 is the first bad commit
commit 3a2c322b68f8137be2f1f5788b13bfb9e0b937c3
Author: Stephen Boyd <[email protected]>
Date: Mon Jun 22 17:13:49 2015 -0700

clk: Remove clk.h from clk-provider.h

http://kisskb.ellerman.id.au/kisskb/buildresult/12465390/

Paul.
--


>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> include/linux/clk-provider.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/linux/clk-provider.h b/include/linux/clk-provider.h
> index 78842f46f152..36fa555ff431 100644
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -11,7 +11,6 @@
> #ifndef __LINUX_CLK_PROVIDER_H
> #define __LINUX_CLK_PROVIDER_H
>
> -#include <linux/clk.h>
> #include <linux/io.h>
> #include <linux/of.h>
>
> @@ -33,6 +32,7 @@
> #define CLK_GET_ACCURACY_NOCACHE BIT(8) /* do not use the cached clk accuracy */
> #define CLK_RECALC_NEW_RATES BIT(9) /* recalc rates after notifications */
>
> +struct clk;
> struct clk_hw;
> struct clk_core;
> struct dentry;
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2015-07-20 08:05:12

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH 33/45] clk: sunxi: Include clk.h

Hi Stephen,

On Fri, Jul 10, 2015 at 04:33:31PM -0700, Stephen Boyd wrote:
> This clock provider uses the consumer API, so include clk.h
> explicitly.
>
> Cc: Chen-Yu Tsai <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> drivers/clk/sunxi/clk-mod0.c | 3 ++-
> drivers/clk/sunxi/clk-sun8i-mbus.c | 2 +-
> drivers/clk/sunxi/clk-sun9i-core.c | 2 +-
> drivers/clk/sunxi/clk-sun9i-mmc.c | 3 ++-
> drivers/clk/sunxi/clk-sunxi.c | 2 ++
> drivers/clk/sunxi/clk-usb.c | 3 ++-
> 6 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
> index 9d028aec58e5..39ba5c3d5d3a 100644
> --- a/drivers/clk/sunxi/clk-mod0.c
> +++ b/drivers/clk/sunxi/clk-mod0.c
> @@ -14,8 +14,9 @@
> * GNU General Public License for more details.
> */
>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> -#include <linux/clkdev.h>
> +#include <linux/slab.h>

I guess you're adding a bit more that clk.h ;)

Could you sort the headers alphabetically please?

Thanks,
Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


Attachments:
(No filename) (1.22 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments

2015-07-20 08:36:42

by Boris Brezillon

[permalink] [raw]
Subject: Re: [PATCH 44/45] clk: at91: Include clk.h and slab.h

On Fri, 10 Jul 2015 16:33:42 -0700
Stephen Boyd <[email protected]> wrote:

> This clock provider uses the consumer API, so include clk.h
> explicitly. Also include slab.h instead of relying on clkdev.h
> for it.
>
> Cc: Boris BREZILLON <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Boris Brezillon <[email protected]>

> ---
> drivers/clk/at91/clk-slow.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/clk/at91/clk-slow.c b/drivers/clk/at91/clk-slow.c
> index 98a84a865fe1..0a7aef39ab5b 100644
> --- a/drivers/clk/at91/clk-slow.c
> +++ b/drivers/clk/at91/clk-slow.c
> @@ -10,8 +10,10 @@
> *
> */
>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/clkdev.h>
> +#include <linux/slab.h>
> #include <linux/clk/at91_pmc.h>
> #include <linux/delay.h>
> #include <linux/of.h>



--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

2015-07-20 08:39:29

by Boris Brezillon

[permalink] [raw]
Subject: Re: [PATCH 18/45] clk: mvebu: Remove clk.h include

Adding the mvebu maintainers in Cc.

On Fri, 10 Jul 2015 16:33:16 -0700
Stephen Boyd <[email protected]> wrote:

> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Only include the header if necessary. The
> clkdev.h include isn't used here either, so drop it and add in
> slab.h to keep things compiling.
>
> Cc: Boris Brezillon <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>
> ---
> drivers/clk/mvebu/clk-cpu.c | 3 ++-
> drivers/clk/mvebu/common.c | 2 +-
> 2 files changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/mvebu/clk-cpu.c b/drivers/clk/mvebu/clk-cpu.c
> index 3821a88077ea..86888a658d4c 100644
> --- a/drivers/clk/mvebu/clk-cpu.c
> +++ b/drivers/clk/mvebu/clk-cpu.c
> @@ -10,7 +10,8 @@
> * warranty of any kind, whether express or implied.
> */
> #include <linux/kernel.h>
> -#include <linux/clkdev.h>
> +#include <linux/slab.h>
> +#include <linux/clk.h>
> #include <linux/clk-provider.h>
> #include <linux/of_address.h>
> #include <linux/io.h>
> diff --git a/drivers/clk/mvebu/common.c b/drivers/clk/mvebu/common.c
> index 15b370ff3748..4a22429cd7a2 100644
> --- a/drivers/clk/mvebu/common.c
> +++ b/drivers/clk/mvebu/common.c
> @@ -13,8 +13,8 @@
> */
>
> #include <linux/kernel.h>
> +#include <linux/slab.h>
> #include <linux/clk.h>
> -#include <linux/clkdev.h>
> #include <linux/clk-provider.h>
> #include <linux/io.h>
> #include <linux/of.h>



--
Boris Brezillon, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

2015-07-20 11:21:14

by Ulf Hansson

[permalink] [raw]
Subject: Re: [PATCH 27/45] clk: ux500: Remove clk.h and clkdev.h includes

On 11 July 2015 at 01:33, Stephen Boyd <[email protected]> wrote:
> Clock provider drivers generally shouldn't include clk.h because
> it's the consumer API. Remove the include here because this is a
> provider driver. Also remove clkdev.h in files that aren't using
> it.
>
> Cc: Linus Walleij <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Acked-by: Ulf Hansson <[email protected]>

Kind regards
Uffe

> ---
> drivers/clk/ux500/abx500-clk.c | 1 -
> drivers/clk/ux500/clk.h | 3 ++-
> drivers/clk/ux500/u8500_clk.c | 1 -
> drivers/clk/ux500/u8500_of_clk.c | 2 --
> drivers/clk/ux500/u8540_clk.c | 1 -
> drivers/clk/ux500/u9540_clk.c | 2 --
> 6 files changed, 2 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/clk/ux500/abx500-clk.c b/drivers/clk/ux500/abx500-clk.c
> index 3e5e05101302..222425d08ab6 100644
> --- a/drivers/clk/ux500/abx500-clk.c
> +++ b/drivers/clk/ux500/abx500-clk.c
> @@ -13,7 +13,6 @@
> #include <linux/platform_device.h>
> #include <linux/mfd/abx500/ab8500.h>
> #include <linux/mfd/abx500/ab8500-sysctrl.h>
> -#include <linux/clk.h>
> #include <linux/clkdev.h>
> #include <linux/clk-provider.h>
> #include <linux/mfd/dbx500-prcmu.h>
> diff --git a/drivers/clk/ux500/clk.h b/drivers/clk/ux500/clk.h
> index a2bb92d85ee0..b42485da704e 100644
> --- a/drivers/clk/ux500/clk.h
> +++ b/drivers/clk/ux500/clk.h
> @@ -10,10 +10,11 @@
> #ifndef __UX500_CLK_H
> #define __UX500_CLK_H
>
> -#include <linux/clk.h>
> #include <linux/device.h>
> #include <linux/types.h>
>
> +struct clk;
> +
> struct clk *clk_reg_prcc_pclk(const char *name,
> const char *parent_name,
> resource_size_t phy_base,
> diff --git a/drivers/clk/ux500/u8500_clk.c b/drivers/clk/ux500/u8500_clk.c
> index 4626b97b7d83..1c7b639d9222 100644
> --- a/drivers/clk/ux500/u8500_clk.c
> +++ b/drivers/clk/ux500/u8500_clk.c
> @@ -7,7 +7,6 @@
> * License terms: GNU General Public License (GPL) version 2
> */
>
> -#include <linux/clk.h>
> #include <linux/clkdev.h>
> #include <linux/clk-provider.h>
> #include <linux/mfd/dbx500-prcmu.h>
> diff --git a/drivers/clk/ux500/u8500_of_clk.c b/drivers/clk/ux500/u8500_of_clk.c
> index e319ef912dc6..c3e3b20e4b43 100644
> --- a/drivers/clk/ux500/u8500_of_clk.c
> +++ b/drivers/clk/ux500/u8500_of_clk.c
> @@ -8,8 +8,6 @@
> */
>
> #include <linux/of.h>
> -#include <linux/clk.h>
> -#include <linux/clkdev.h>
> #include <linux/clk-provider.h>
> #include <linux/mfd/dbx500-prcmu.h>
> #include <linux/platform_data/clk-ux500.h>
> diff --git a/drivers/clk/ux500/u8540_clk.c b/drivers/clk/ux500/u8540_clk.c
> index 20c8add90d11..d0de335ea1e9 100644
> --- a/drivers/clk/ux500/u8540_clk.c
> +++ b/drivers/clk/ux500/u8540_clk.c
> @@ -7,7 +7,6 @@
> * License terms: GNU General Public License (GPL) version 2
> */
>
> -#include <linux/clk.h>
> #include <linux/clkdev.h>
> #include <linux/clk-provider.h>
> #include <linux/mfd/dbx500-prcmu.h>
> diff --git a/drivers/clk/ux500/u9540_clk.c b/drivers/clk/ux500/u9540_clk.c
> index 44794782e7e0..179bd3871b34 100644
> --- a/drivers/clk/ux500/u9540_clk.c
> +++ b/drivers/clk/ux500/u9540_clk.c
> @@ -7,8 +7,6 @@
> * License terms: GNU General Public License (GPL) version 2
> */
>
> -#include <linux/clk.h>
> -#include <linux/clkdev.h>
> #include <linux/clk-provider.h>
> #include <linux/mfd/dbx500-prcmu.h>
> #include <linux/platform_data/clk-ux500.h>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/

2015-07-20 18:01:43

by Stephen Boyd

[permalink] [raw]
Subject: Re: [PATCH 33/45] clk: sunxi: Include clk.h

On 07/20/2015 01:01 AM, Maxime Ripard wrote:
> Hi Stephen,
>
> On Fri, Jul 10, 2015 at 04:33:31PM -0700, Stephen Boyd wrote:
>> This clock provider uses the consumer API, so include clk.h
>> explicitly.
>>
>> Cc: Chen-Yu Tsai <[email protected]>
>> Cc: Maxime Ripard <[email protected]>
>> Signed-off-by: Stephen Boyd <[email protected]>
>> ---
>> drivers/clk/sunxi/clk-mod0.c | 3 ++-
>> drivers/clk/sunxi/clk-sun8i-mbus.c | 2 +-
>> drivers/clk/sunxi/clk-sun9i-core.c | 2 +-
>> drivers/clk/sunxi/clk-sun9i-mmc.c | 3 ++-
>> drivers/clk/sunxi/clk-sunxi.c | 2 ++
>> drivers/clk/sunxi/clk-usb.c | 3 ++-
>> 6 files changed, 10 insertions(+), 5 deletions(-)
>>
>> diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
>> index 9d028aec58e5..39ba5c3d5d3a 100644
>> --- a/drivers/clk/sunxi/clk-mod0.c
>> +++ b/drivers/clk/sunxi/clk-mod0.c
>> @@ -14,8 +14,9 @@
>> * GNU General Public License for more details.
>> */
>>
>> +#include <linux/clk.h>
>> #include <linux/clk-provider.h>
>> -#include <linux/clkdev.h>
>> +#include <linux/slab.h>
> I guess you're adding a bit more that clk.h ;)
>
> Could you sort the headers alphabetically please?
>

Sure.

---8<----

From: Stephen Boyd <[email protected]>
Subject: [PATCH] clk: sunxi: Include clk.h and remove unused clkdev.h includes

This clock provider uses the consumer API, so include clk.h
explicitly. Also remove clkdev.h in files that aren't using it
and include slab.h when clkdev.h was being used to implicitly
include it.

Cc: Chen-Yu Tsai <[email protected]>
Cc: Maxime Ripard <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
---
drivers/clk/sunxi/clk-mod0.c | 3 ++-
drivers/clk/sunxi/clk-sun8i-mbus.c | 2 +-
drivers/clk/sunxi/clk-sun9i-core.c | 2 +-
drivers/clk/sunxi/clk-sun9i-mmc.c | 3 ++-
drivers/clk/sunxi/clk-sunxi.c | 2 ++
drivers/clk/sunxi/clk-usb.c | 3 ++-
6 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
index 9d028aec58e5..d167e1efb927 100644
--- a/drivers/clk/sunxi/clk-mod0.c
+++ b/drivers/clk/sunxi/clk-mod0.c
@@ -14,10 +14,11 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
+#include <linux/slab.h>

#include "clk-factors.h"

diff --git a/drivers/clk/sunxi/clk-sun8i-mbus.c b/drivers/clk/sunxi/clk-sun8i-mbus.c
index 14cd026064bf..bf117a636d23 100644
--- a/drivers/clk/sunxi/clk-sun8i-mbus.c
+++ b/drivers/clk/sunxi/clk-sun8i-mbus.c
@@ -14,8 +14,8 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/of_address.h>

#include "clk-factors.h"
diff --git a/drivers/clk/sunxi/clk-sun9i-core.c b/drivers/clk/sunxi/clk-sun9i-core.c
index 887f4ea161bb..6c4c98324d3c 100644
--- a/drivers/clk/sunxi/clk-sun9i-core.c
+++ b/drivers/clk/sunxi/clk-sun9i-core.c
@@ -14,8 +14,8 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/log2.h>
diff --git a/drivers/clk/sunxi/clk-sun9i-mmc.c b/drivers/clk/sunxi/clk-sun9i-mmc.c
index 710c273648d7..3436a948b796 100644
--- a/drivers/clk/sunxi/clk-sun9i-mmc.c
+++ b/drivers/clk/sunxi/clk-sun9i-mmc.c
@@ -14,14 +14,15 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/reset.h>
#include <linux/platform_device.h>
#include <linux/reset-controller.h>
+#include <linux/slab.h>
#include <linux/spinlock.h>

#define SUN9I_MMC_WIDTH 4
diff --git a/drivers/clk/sunxi/clk-sunxi.c b/drivers/clk/sunxi/clk-sunxi.c
index 9a82f17d2d73..4ac26122a7c6 100644
--- a/drivers/clk/sunxi/clk-sunxi.c
+++ b/drivers/clk/sunxi/clk-sunxi.c
@@ -14,11 +14,13 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/reset-controller.h>
+#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/log2.h>

diff --git a/drivers/clk/sunxi/clk-usb.c b/drivers/clk/sunxi/clk-usb.c
index 3a25f9588e67..1a72cd672839 100644
--- a/drivers/clk/sunxi/clk-usb.c
+++ b/drivers/clk/sunxi/clk-usb.c
@@ -14,11 +14,12 @@
* GNU General Public License for more details.
*/

+#include <linux/clk.h>
#include <linux/clk-provider.h>
-#include <linux/clkdev.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/reset-controller.h>
+#include <linux/slab.h>
#include <linux/spinlock.h>




--
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

2015-07-27 07:35:06

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH 33/45] clk: sunxi: Include clk.h

On Mon, Jul 20, 2015 at 11:01:37AM -0700, Stephen Boyd wrote:
> On 07/20/2015 01:01 AM, Maxime Ripard wrote:
> >Hi Stephen,
> >
> >On Fri, Jul 10, 2015 at 04:33:31PM -0700, Stephen Boyd wrote:
> >>This clock provider uses the consumer API, so include clk.h
> >>explicitly.
> >>
> >>Cc: Chen-Yu Tsai <[email protected]>
> >>Cc: Maxime Ripard <[email protected]>
> >>Signed-off-by: Stephen Boyd <[email protected]>
> >>---
> >> drivers/clk/sunxi/clk-mod0.c | 3 ++-
> >> drivers/clk/sunxi/clk-sun8i-mbus.c | 2 +-
> >> drivers/clk/sunxi/clk-sun9i-core.c | 2 +-
> >> drivers/clk/sunxi/clk-sun9i-mmc.c | 3 ++-
> >> drivers/clk/sunxi/clk-sunxi.c | 2 ++
> >> drivers/clk/sunxi/clk-usb.c | 3 ++-
> >> 6 files changed, 10 insertions(+), 5 deletions(-)
> >>
> >>diff --git a/drivers/clk/sunxi/clk-mod0.c b/drivers/clk/sunxi/clk-mod0.c
> >>index 9d028aec58e5..39ba5c3d5d3a 100644
> >>--- a/drivers/clk/sunxi/clk-mod0.c
> >>+++ b/drivers/clk/sunxi/clk-mod0.c
> >>@@ -14,8 +14,9 @@
> >> * GNU General Public License for more details.
> >> */
> >>+#include <linux/clk.h>
> >> #include <linux/clk-provider.h>
> >>-#include <linux/clkdev.h>
> >>+#include <linux/slab.h>
> >I guess you're adding a bit more that clk.h ;)
> >
> >Could you sort the headers alphabetically please?
> >
>
> Sure.
>
> ---8<----
>
> From: Stephen Boyd <[email protected]>
> Subject: [PATCH] clk: sunxi: Include clk.h and remove unused clkdev.h includes
>
> This clock provider uses the consumer API, so include clk.h
> explicitly. Also remove clkdev.h in files that aren't using it
> and include slab.h when clkdev.h was being used to implicitly
> include it.
>
> Cc: Chen-Yu Tsai <[email protected]>
> Cc: Maxime Ripard <[email protected]>
> Signed-off-by: Stephen Boyd <[email protected]>

Perfect, thanks!

Acked-by: Maxime Ripard <[email protected]>

Maxime

--
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com


Attachments:
(No filename) (1.96 kB)
signature.asc (819.00 B)
Digital signature
Download all attachments