修改后就有错误信息输出了。 [oct1158@fed41-bh8f7e0 first]$ make make -C /home/oct1158/Documents/Code/C/luckfox-pico/sysdrv/source/kernel M=/home/oct1158/Documents/Code/C/driver_test/first modules ARCH=arm CROSS_COMPILE=/home/oct1158/Documents/Code/C/luckfox-pico/tools/linux/toolchain/arm-rockchip830-linux-uclibcgnueabihf/bin/arm-rockchip830-linux-uclibcgnueabihf- CC [M] /home/oct1158/Documents/Code/C/driver_test/first/test.o /home/oct1158/Documents/Code/C/driver_test/first/test.c: In function 'mytestdriver_probe': /home/oct1158/Documents/Code/C/driver_test/first/test.c:10:9: error: implicit declaration of function 'devm_gpiod_get'; did you mean 'em_pd_get'? [-Werror=implicit-function-declaration] gpio = devm_gpiod_get(&pdev->dev, NULL, GPIOD_OUT_HIGH); // led on ^~~~~~~~~~~~~~ em_pd_get /home/oct1158/Documents/Code/C/driver_test/first/test.c:10:42: error: 'GPIOD_OUT_HIGH' undeclared (first use in this function) gpio = devm_gpiod_get(&pdev->dev, NULL, GPIOD_OUT_HIGH); // led on ^~~~~~~~~~~~~~ /home/oct1158/Documents/Code/C/driver_test/first/test.c:10:42: note: each undeclared identifier is reported only once for each function it appears in /home/oct1158/Documents/Code/C/driver_test/first/test.c: In function 'mytestdriver_remove': /home/oct1158/Documents/Code/C/driver_test/first/test.c:28:3: error: implicit declaration of function 'gpiod_set_value'; did you mean 'bitmap_set_value8'? [-Werror=implicit-function-declaration] gpiod_set_value(gpio, 0); // led off ^~~~~~~~~~~~~~~ bitmap_set_value8 cc1: all warnings being treated as errors make[2]: *** [scripts/Makefile.build:273: /home/oct1158/Documents/Code/C/driver_test/first/test.o] Error 1 make[1]: *** [Makefile:1935: /home/oct1158/Documents/Code/C/driver_test/first] Error 2 make: *** [Makefile:7: build] Error 2 [oct1158@fed41-bh8f7e0 first]$
|