Skip to content

Commit 941943c

Browse files
Paul Gortmakergregkh
authored andcommitted
drivers/hwtracing: make coresight-* explicitly non-modular
None of the Kconfig currently controlling compilation of any of the files here are tristate, meaning that none of it currently is being built as a module by anyone. We need not be concerned about .remove functions and blocking the unbind sysfs operations, since that was already done in a recent commit. Lets remove any remaining modular references, so that when reading the drivers there is no doubt they are builtin-only. All drivers get mostly the same changes, so they are handled in batch. Changes are (1) convert to builtin_amba_driver, (2) delete module.h include where unused, and (3) relocate the description into the comments so we don't need MODULE_DESCRIPTION and associated tags. The etm3x and etm4x use module_param_named, and have been adjusted to just include moduleparam.h for that purpose. In commit f309d44 ("platform_device: better support builtin boilerplate avoidance") we introduced the builtin_driver macro. Here we use that support and extend it to amba driver registration, so where a driver is clearly non-modular and builtin-only, we can update with the simple mapping of module_amba_driver(...) ---> builtin_amba_driver(...) Since module_amba_driver() uses the same init level priority as builtin_amba_driver() the init ordering remains unchanged with this commit. Cc: Mathieu Poirier <mathieu.poirier@linaro.org> Cc: linux-arm-kernel@lists.infradead.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Acked-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 17534ce commit 941943c

11 files changed

Lines changed: 33 additions & 45 deletions

File tree

‎drivers/hwtracing/coresight/coresight-etb10.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
2+
*
3+
* Description: CoreSight Embedded Trace Buffer driver
24
*
35
* This program is free software; you can redistribute it and/or modify
46
* it under the terms of the GNU General Public License version 2 and
@@ -12,7 +14,6 @@
1214

1315
#include <asm/local.h>
1416
#include <linux/kernel.h>
15-
#include <linux/module.h>
1617
#include <linux/init.h>
1718
#include <linux/types.h>
1819
#include <linux/device.h>
@@ -781,8 +782,4 @@ static struct amba_driver etb_driver = {
781782
.probe = etb_probe,
782783
.id_table = etb_ids,
783784
};
784-
785-
module_amba_driver(etb_driver);
786-
787-
MODULE_LICENSE("GPL v2");
788-
MODULE_DESCRIPTION("CoreSight Embedded Trace Buffer driver");
785+
builtin_amba_driver(etb_driver);

‎drivers/hwtracing/coresight/coresight-etm3x.c‎

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
2+
*
3+
* Description: CoreSight Program Flow Trace driver
24
*
35
* This program is free software; you can redistribute it and/or modify
46
* it under the terms of the GNU General Public License version 2 and
@@ -11,7 +13,7 @@
1113
*/
1214

1315
#include <linux/kernel.h>
14-
#include <linux/module.h>
16+
#include <linux/moduleparam.h>
1517
#include <linux/init.h>
1618
#include <linux/types.h>
1719
#include <linux/device.h>
@@ -38,6 +40,10 @@
3840
#include "coresight-etm.h"
3941
#include "coresight-etm-perf.h"
4042

43+
/*
44+
* Not really modular but using module_param is the easiest way to
45+
* remain consistent with existing use cases for now.
46+
*/
4147
static int boot_enable;
4248
module_param_named(boot_enable, boot_enable, int, S_IRUGO);
4349

@@ -912,8 +918,4 @@ static struct amba_driver etm_driver = {
912918
.probe = etm_probe,
913919
.id_table = etm_ids,
914920
};
915-
916-
module_amba_driver(etm_driver);
917-
918-
MODULE_LICENSE("GPL v2");
919-
MODULE_DESCRIPTION("CoreSight Program Flow Trace driver");
921+
builtin_amba_driver(etm_driver);

‎drivers/hwtracing/coresight/coresight-etm4x.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <linux/init.h>
1616
#include <linux/types.h>
1717
#include <linux/device.h>
18-
#include <linux/module.h>
1918
#include <linux/io.h>
2019
#include <linux/err.h>
2120
#include <linux/fs.h>
@@ -2710,5 +2709,4 @@ static struct amba_driver etm4x_driver = {
27102709
.probe = etm4_probe,
27112710
.id_table = etm4_ids,
27122711
};
2713-
2714-
module_amba_driver(etm4x_driver);
2712+
builtin_amba_driver(etm4x_driver);

‎drivers/hwtracing/coresight/coresight-funnel.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
2+
*
3+
* Description: CoreSight Funnel driver
24
*
35
* This program is free software; you can redistribute it and/or modify
46
* it under the terms of the GNU General Public License version 2 and
@@ -11,7 +13,6 @@
1113
*/
1214

1315
#include <linux/kernel.h>
14-
#include <linux/module.h>
1516
#include <linux/init.h>
1617
#include <linux/types.h>
1718
#include <linux/device.h>
@@ -268,8 +269,4 @@ static struct amba_driver funnel_driver = {
268269
.probe = funnel_probe,
269270
.id_table = funnel_ids,
270271
};
271-
272-
module_amba_driver(funnel_driver);
273-
274-
MODULE_LICENSE("GPL v2");
275-
MODULE_DESCRIPTION("CoreSight Funnel driver");
272+
builtin_amba_driver(funnel_driver);

‎drivers/hwtracing/coresight/coresight-replicator-qcom.c‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <linux/clk.h>
1616
#include <linux/coresight.h>
1717
#include <linux/device.h>
18-
#include <linux/module.h>
1918
#include <linux/err.h>
2019
#include <linux/init.h>
2120
#include <linux/io.h>
@@ -198,5 +197,4 @@ static struct amba_driver replicator_driver = {
198197
.probe = replicator_probe,
199198
.id_table = replicator_ids,
200199
};
201-
202-
module_amba_driver(replicator_driver);
200+
builtin_amba_driver(replicator_driver);

‎drivers/hwtracing/coresight/coresight-replicator.c‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
2+
*
3+
* Description: CoreSight Replicator driver
24
*
35
* This program is free software; you can redistribute it and/or modify
46
* it under the terms of the GNU General Public License version 2 and
@@ -11,7 +13,6 @@
1113
*/
1214

1315
#include <linux/kernel.h>
14-
#include <linux/module.h>
1516
#include <linux/device.h>
1617
#include <linux/platform_device.h>
1718
#include <linux/io.h>
@@ -166,8 +167,4 @@ static struct platform_driver replicator_driver = {
166167
.suppress_bind_attrs = true,
167168
},
168169
};
169-
170170
builtin_platform_driver(replicator_driver);
171-
172-
MODULE_LICENSE("GPL v2");
173-
MODULE_DESCRIPTION("CoreSight Replicator driver");

‎drivers/hwtracing/coresight/coresight-tmc.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
2+
*
3+
* Description: CoreSight Trace Memory Controller driver
24
*
35
* This program is free software; you can redistribute it and/or modify
46
* it under the terms of the GNU General Public License version 2 and
@@ -11,7 +13,6 @@
1113
*/
1214

1315
#include <linux/kernel.h>
14-
#include <linux/module.h>
1516
#include <linux/init.h>
1617
#include <linux/types.h>
1718
#include <linux/device.h>
@@ -782,8 +783,4 @@ static struct amba_driver tmc_driver = {
782783
.probe = tmc_probe,
783784
.id_table = tmc_ids,
784785
};
785-
786-
module_amba_driver(tmc_driver);
787-
788-
MODULE_LICENSE("GPL v2");
789-
MODULE_DESCRIPTION("CoreSight Trace Memory Controller driver");
786+
builtin_amba_driver(tmc_driver);

‎drivers/hwtracing/coresight/coresight-tpiu.c‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/* Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
2+
*
3+
* Description: CoreSight Trace Port Interface Unit driver
24
*
35
* This program is free software; you can redistribute it and/or modify
46
* it under the terms of the GNU General Public License version 2 and
@@ -11,7 +13,6 @@
1113
*/
1214

1315
#include <linux/kernel.h>
14-
#include <linux/module.h>
1516
#include <linux/init.h>
1617
#include <linux/device.h>
1718
#include <linux/io.h>
@@ -218,8 +219,4 @@ static struct amba_driver tpiu_driver = {
218219
.probe = tpiu_probe,
219220
.id_table = tpiu_ids,
220221
};
221-
222-
module_amba_driver(tpiu_driver);
223-
224-
MODULE_LICENSE("GPL v2");
225-
MODULE_DESCRIPTION("CoreSight Trace Port Interface Unit driver");
222+
builtin_amba_driver(tpiu_driver);

‎drivers/hwtracing/coresight/coresight.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
*/
1212

1313
#include <linux/kernel.h>
14-
#include <linux/module.h>
1514
#include <linux/init.h>
1615
#include <linux/types.h>
1716
#include <linux/device.h>
@@ -894,5 +893,3 @@ void coresight_unregister(struct coresight_device *csdev)
894893
device_unregister(&csdev->dev);
895894
}
896895
EXPORT_SYMBOL_GPL(coresight_unregister);
897-
898-
MODULE_LICENSE("GPL v2");

‎drivers/hwtracing/coresight/of_coresight.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
* GNU General Public License for more details.
1111
*/
1212

13-
#include <linux/module.h>
1413
#include <linux/types.h>
1514
#include <linux/err.h>
1615
#include <linux/slab.h>

0 commit comments

Comments
 (0)