hwrng: Explicitly include correct DT includes
authorRob Herring <robh@kernel.org>
Fri, 28 Jul 2023 13:48:27 +0000 (07:48 -0600)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 4 Aug 2023 09:09:26 +0000 (17:09 +0800)
The DT of_device.h and of_platform.h date back to the separate
of_platform_bus_type before it was merged into the regular platform bus.
As part of that merge prepping Arm DT support 13 years ago, they
"temporarily" include each other. They also include platform_device.h
and of.h. As a result, there's a pretty much random mix of those include
files used throughout the tree. In order to detangle these headers and
replace the implicit includes with struct declarations, users need to
explicitly include the correct includes.

Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
12 files changed:
drivers/char/hw_random/atmel-rng.c
drivers/char/hw_random/bcm2835-rng.c
drivers/char/hw_random/ingenic-trng.c
drivers/char/hw_random/iproc-rng200.c
drivers/char/hw_random/npcm-rng.c
drivers/char/hw_random/omap-rng.c
drivers/char/hw_random/omap3-rom-rng.c
drivers/char/hw_random/pasemi-rng.c
drivers/char/hw_random/pic32-rng.c
drivers/char/hw_random/stm32-rng.c
drivers/char/hw_random/xgene-rng.c
drivers/char/hw_random/xiphera-trng.c

index b8effe77d80ffcac06e005180f8ec4b023b7dac6..a37367ebcbacf8c34801399159a4fbadbe8d717e 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/io.h>
 #include <linux/iopoll.h>
 #include <linux/hw_random.h>
-#include <linux/of_device.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 
index e98fcac578d6645791a9760851eb3ed2180ae435..e19b0f9f48b97f3f9a8964dfc015ad1a6adaffe8 100644 (file)
@@ -8,8 +8,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_platform.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/printk.h>
 #include <linux/clk.h>
index 3967a8dbe9670a02e32e9268d4691ec414c16c15..1672320e7d3d227a6dfb0bd4bf7cde6a2938fa74 100644 (file)
@@ -11,8 +11,8 @@
 #include <linux/hw_random.h>
 #include <linux/io.h>
 #include <linux/iopoll.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
index 06bc060534d8153be310d54d07d2c5ec52c902a4..34df3f0d3e458ad6a0419bb4fe5602becbaf094b 100644 (file)
@@ -12,8 +12,7 @@
 #include <linux/io.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
-#include <linux/of_address.h>
-#include <linux/of_platform.h>
+#include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>
 
index 9903d0357e06ea425e915b0b66a7e2820dd3a1f2..8a304b754217e026dcd1c95d54bbaf9d241c3732 100644 (file)
@@ -8,12 +8,11 @@
 #include <linux/init.h>
 #include <linux/random.h>
 #include <linux/err.h>
+#include <linux/of.h>
 #include <linux/platform_device.h>
 #include <linux/hw_random.h>
 #include <linux/delay.h>
-#include <linux/of_irq.h>
 #include <linux/pm_runtime.h>
-#include <linux/of_device.h>
 
 #define NPCM_RNGCS_REG         0x00    /* Control and status register */
 #define NPCM_RNGD_REG          0x04    /* Data register */
index 00ff96703dd259bd5707a87150d6b129e0457fd3..be03f76a2a8089f10264739c5cc87c9b6733754b 100644 (file)
@@ -26,8 +26,6 @@
 #include <linux/slab.h>
 #include <linux/pm_runtime.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
-#include <linux/of_address.h>
 #include <linux/interrupt.h>
 #include <linux/clk.h>
 #include <linux/io.h>
index f06e4f95114f91b8c6dcbf7664e3ad5b1e327356..18dc46b1b58e02dad3279296081a61020ede3c47 100644 (file)
@@ -20,7 +20,6 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 
index 2498d4ef9fe22246694cf1197d4036407c072b24..6959d6edd44cc9d883e182797e11e064e70babf1 100644 (file)
@@ -9,11 +9,10 @@
 
 #include <linux/module.h>
 #include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/platform_device.h>
 #include <linux/hw_random.h>
 #include <linux/delay.h>
-#include <linux/of_address.h>
-#include <linux/of_platform.h>
 #include <linux/io.h>
 
 #define SDCRNG_CTL_REG                 0x00
index 1902f4389a3f5d041ee0ff4c221c5bc7e150b5d5..888e6f5cec1ff7a815061fa4d46b195b499940c0 100644 (file)
@@ -12,9 +12,8 @@
 #include <linux/hw_random.h>
 #include <linux/io.h>
 #include <linux/kernel.h>
+#include <linux/mod_devicetable.h>
 #include <linux/module.h>
-#include <linux/of.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/slab.h>
 
@@ -110,7 +109,7 @@ static struct platform_driver pic32_rng_driver = {
        .probe          = pic32_rng_probe,
        .driver         = {
                .name   = "pic32-rng",
-               .of_match_table = of_match_ptr(pic32_rng_of_match),
+               .of_match_table = pic32_rng_of_match,
        },
 };
 
index a6731cf0627ac06c7202ce1d2bca604cfae1ca07..efb6a9f9a11b5c81be5f3fe45c5ae5768eb0ae01 100644 (file)
@@ -10,8 +10,9 @@
 #include <linux/iopoll.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/of.h>
 #include <linux/of_address.h>
-#include <linux/of_platform.h>
+#include <linux/platform_device.h>
 #include <linux/pm_runtime.h>
 #include <linux/reset.h>
 #include <linux/slab.h>
index 7c8f3cb7c6af785cdc54eaabc0322b2010fe09c8..c25bb169563dd80945ca251af2e1ef3e9492f762 100644 (file)
@@ -15,9 +15,8 @@
 #include <linux/init.h>
 #include <linux/interrupt.h>
 #include <linux/module.h>
-#include <linux/of_platform.h>
-#include <linux/of_irq.h>
-#include <linux/of_address.h>
+#include <linux/mod_devicetable.h>
+#include <linux/platform_device.h>
 #include <linux/timer.h>
 
 #define RNG_MAX_DATUM                  4
index 2a9fea72b2e0d0bc7426b0a5831fff0ffc078614..2c586d1fe8a952b500e4aa2dfc3bf5ce4cc6ff30 100644 (file)
@@ -7,7 +7,6 @@
 #include <linux/err.h>
 #include <linux/io.h>
 #include <linux/hw_random.h>
-#include <linux/of_device.h>
 #include <linux/platform_device.h>
 #include <linux/delay.h>