expected declaration specifiers or '...' before string constant


/work/platform_bus_dev_drv/led_dev.c:52: error: expected declaration specifiers or '...' before string constant
/work/platform_bus_dev_drv/led_dev.c:52: warning: data definition has no type or storage class
/work/platform_bus_dev_drv/led_dev.c:52: warning: type defaults to 'int' in declaration of 'MODULE_LICENSE'
/work/platform_bus_dev_drv/led_dev.c:52: warning: function declaration isn't a prototype
make[2]: *** [/work/platform_bus_dev_drv/led_dev.o] Error 1
make[1]: *** [_module_/work/platform_bus_dev_drv] Error 2
make[1]: Leaving directory `/home/uboot/linux-3.4.20'
make: *** [all] Error 2

缺少头文件:

#include <linux/module.h>








原文地址:https://www.cnblogs.com/alan666/p/8311955.html