Section mismatch in reference from the variable to the function.devinit.text:spiadc_probe()的解決方法

問題:

WARNING: /home/hzg/Train/code/spi_adc/Spiadc.o(.data+0x10):
 Section mismatch in reference from the variable Spiadc to the function.devinit.text:spiadc_probe()
The variable Spiadc referencesthe function __devinit spiadc_probe()
If the reference is valid then annotate thevariable with __init* or __refdata (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console

原因:
缺少:
#include <linux/platform_device.h>
解決方法:
     添加:
#include <linux/platform_device.h>  
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章