Skip to contentSkip to conversation

scripts/kernel-doc: fix fatal error on function prototype

PATCH New Randy Dunlap 1 participant 1 message Mar 20, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 scripts/kernel-doc: fix fatal error on function prototype

From: Randy Dunlap <[email protected]>

Fix a fatal error in scripts/kernel-doc when a function signature uses __init_or_module (just ignore that string):

Error(drivers/base/platform.c:568): cannot understand prototype: 'struct platform_device * __init_or_module platform_create_bundle(struct platform_driver *driver, int (*probe)(struct platform_device *), struct resource *res, unsigned int n_res, const void *data, size_t size) '

---
 scripts/kernel-doc |    1 +
 1 file changed, 1 insertion(+)
scripts/kernel-doc +1 -0
@@ -1728,6 +1728,7 @@ sub dump_function($$) {
     $prototype =~ s/^noinline +//;
     $prototype =~ s/__devinit +//;
     $prototype =~ s/__init +//;
+    $prototype =~ s/__init_or_module +//;
     $prototype =~ s/^#\s*define\s+//; #ak added
     $prototype =~ s/__attribute__\s*\(\([a-z,]*\)\)//;