Skip to content

Commit f23e76a

Browse files
krzkakpm00
authored andcommitted
coccinelle: platform_no_drv_owner: handle also built-in drivers
builtin_platform_driver() and others also use macro platform_driver_register() which sets the .owner=THIS_MODULE, so extend the cocci script to detect these as well. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Krzysztof Kozlowski <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Nathan Chancellor <[email protected]> Cc: Nicolas Palix <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 347b564 commit f23e76a

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

scripts/coccinelle/api/platform_no_drv_owner.cocci

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,21 @@ virtual org
1010
virtual report
1111

1212
@match1@
13+
declarer name builtin_i2c_driver;
14+
declarer name builtin_platform_driver;
15+
declarer name builtin_platform_driver_probe;
1316
declarer name module_i2c_driver;
1417
declarer name module_platform_driver;
1518
declarer name module_platform_driver_probe;
1619
identifier __driver;
1720
@@
1821
(
22+
builtin_i2c_driver(__driver);
23+
|
24+
builtin_platform_driver(__driver);
25+
|
26+
builtin_platform_driver_probe(__driver, ...);
27+
|
1928
module_i2c_driver(__driver);
2029
|
2130
module_platform_driver(__driver);

0 commit comments

Comments
 (0)