问题:
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>