Skip to content

Commit b0cc749

Browse files
robherringherbertx
authored andcommitted
crypto: drivers - Explicitly include correct DT includes
The DT of_device.h and of_platform.h date back to the separate of_platform_bus_type before it as 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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 5ce0bc6 commit b0cc749

33 files changed

+25
-45
lines changed

drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
#include <linux/io.h>
1515
#include <linux/module.h>
1616
#include <linux/of.h>
17-
#include <linux/of_device.h>
1817
#include <linux/platform_device.h>
1918
#include <crypto/scatterwalk.h>
2019
#include <linux/scatterlist.h>

drivers/crypto/allwinner/sun8i-ce/sun8i-ce-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
#include <linux/kernel.h>
2525
#include <linux/module.h>
2626
#include <linux/of.h>
27-
#include <linux/of_device.h>
2827
#include <linux/platform_device.h>
2928
#include <linux/pm_runtime.h>
3029
#include <linux/reset.h>

drivers/crypto/allwinner/sun8i-ss/sun8i-ss-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include <linux/kernel.h>
2424
#include <linux/module.h>
2525
#include <linux/of.h>
26-
#include <linux/of_device.h>
2726
#include <linux/platform_device.h>
2827
#include <linux/pm_runtime.h>
2928
#include <linux/reset.h>

drivers/crypto/amlogic/amlogic-gxl-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <linux/kernel.h>
1919
#include <linux/module.h>
2020
#include <linux/of.h>
21-
#include <linux/of_device.h>
2221
#include <linux/platform_device.h>
2322

2423
#include "amlogic-gxl.h"

drivers/crypto/aspeed/aspeed-acry.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,6 @@
1515
#include <linux/mfd/syscon.h>
1616
#include <linux/module.h>
1717
#include <linux/of.h>
18-
#include <linux/of_device.h>
19-
#include <linux/of_address.h>
20-
#include <linux/of_irq.h>
2118
#include <linux/platform_device.h>
2219
#include <linux/regmap.h>
2320
#include <linux/slab.h>

drivers/crypto/atmel-aes.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <linux/irq.h>
2929
#include <linux/scatterlist.h>
3030
#include <linux/dma-mapping.h>
31-
#include <linux/of_device.h>
31+
#include <linux/mod_devicetable.h>
3232
#include <linux/delay.h>
3333
#include <linux/crypto.h>
3434
#include <crypto/scatterwalk.h>
@@ -2533,13 +2533,11 @@ static void atmel_aes_get_cap(struct atmel_aes_dev *dd)
25332533
}
25342534
}
25352535

2536-
#if defined(CONFIG_OF)
25372536
static const struct of_device_id atmel_aes_dt_ids[] = {
25382537
{ .compatible = "atmel,at91sam9g46-aes" },
25392538
{ /* sentinel */ }
25402539
};
25412540
MODULE_DEVICE_TABLE(of, atmel_aes_dt_ids);
2542-
#endif
25432541

25442542
static int atmel_aes_probe(struct platform_device *pdev)
25452543
{
@@ -2678,7 +2676,7 @@ static struct platform_driver atmel_aes_driver = {
26782676
.remove = atmel_aes_remove,
26792677
.driver = {
26802678
.name = "atmel_aes",
2681-
.of_match_table = of_match_ptr(atmel_aes_dt_ids),
2679+
.of_match_table = atmel_aes_dt_ids,
26822680
},
26832681
};
26842682

drivers/crypto/atmel-ecc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include <linux/init.h>
1515
#include <linux/kernel.h>
1616
#include <linux/module.h>
17-
#include <linux/of_device.h>
17+
#include <linux/of.h>
1818
#include <linux/scatterlist.h>
1919
#include <linux/slab.h>
2020
#include <linux/workqueue.h>

drivers/crypto/atmel-sha.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <linux/irq.h>
2929
#include <linux/scatterlist.h>
3030
#include <linux/dma-mapping.h>
31-
#include <linux/of_device.h>
31+
#include <linux/mod_devicetable.h>
3232
#include <linux/delay.h>
3333
#include <linux/crypto.h>
3434
#include <crypto/scatterwalk.h>
@@ -2571,14 +2571,12 @@ static void atmel_sha_get_cap(struct atmel_sha_dev *dd)
25712571
}
25722572
}
25732573

2574-
#if defined(CONFIG_OF)
25752574
static const struct of_device_id atmel_sha_dt_ids[] = {
25762575
{ .compatible = "atmel,at91sam9g46-sha" },
25772576
{ /* sentinel */ }
25782577
};
25792578

25802579
MODULE_DEVICE_TABLE(of, atmel_sha_dt_ids);
2581-
#endif
25822580

25832581
static int atmel_sha_probe(struct platform_device *pdev)
25842582
{
@@ -2708,7 +2706,7 @@ static struct platform_driver atmel_sha_driver = {
27082706
.remove = atmel_sha_remove,
27092707
.driver = {
27102708
.name = "atmel_sha",
2711-
.of_match_table = of_match_ptr(atmel_sha_dt_ids),
2709+
.of_match_table = atmel_sha_dt_ids,
27122710
},
27132711
};
27142712

drivers/crypto/atmel-tdes.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
#include <linux/irq.h>
2929
#include <linux/scatterlist.h>
3030
#include <linux/dma-mapping.h>
31-
#include <linux/of_device.h>
31+
#include <linux/mod_devicetable.h>
3232
#include <linux/delay.h>
3333
#include <linux/crypto.h>
3434
#include <crypto/scatterwalk.h>
@@ -1139,13 +1139,11 @@ static void atmel_tdes_get_cap(struct atmel_tdes_dev *dd)
11391139
}
11401140
}
11411141

1142-
#if defined(CONFIG_OF)
11431142
static const struct of_device_id atmel_tdes_dt_ids[] = {
11441143
{ .compatible = "atmel,at91sam9g46-tdes" },
11451144
{ /* sentinel */ }
11461145
};
11471146
MODULE_DEVICE_TABLE(of, atmel_tdes_dt_ids);
1148-
#endif
11491147

11501148
static int atmel_tdes_probe(struct platform_device *pdev)
11511149
{
@@ -1274,7 +1272,7 @@ static struct platform_driver atmel_tdes_driver = {
12741272
.remove = atmel_tdes_remove,
12751273
.driver = {
12761274
.name = "atmel_tdes",
1277-
.of_match_table = of_match_ptr(atmel_tdes_dt_ids),
1275+
.of_match_table = atmel_tdes_dt_ids,
12781276
},
12791277
};
12801278

drivers/crypto/bcm/cipher.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@
1515
#include <linux/kthread.h>
1616
#include <linux/rtnetlink.h>
1717
#include <linux/sched.h>
18-
#include <linux/of_address.h>
19-
#include <linux/of_device.h>
18+
#include <linux/of.h>
2019
#include <linux/io.h>
2120
#include <linux/bitops.h>
2221

0 commit comments

Comments
 (0)