sh7760 i2c problem
if i try to compile it as a module, i get:
WARNING: drivers/i2c/busses/i2c-sh7760.o(.data+0x0): Section mismatch in reference from the variable sh7760_i2c_drv to the function .devinit.text:sh7760_i2c_probe()
The variable sh7760_i2c_drv references
the function __devinit sh7760_i2c_probe()
If the reference is valid then annotate the
variable with __init* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
WARNING: drivers/i2c/busses/i2c-sh7760.o(.data+0x4): Section mismatch in reference from the variable sh7760_i2c_drv to the function .devexit.text:sh7760_i2c_remove()
The variable sh7760_i2c_drv references
the function __devexit sh7760_i2c_remove()
If the reference is valid then annotate the
variable with __exit* (see linux/init.h) or name the variable:
*driver, *_template, *_timer, *_sht, *_ops, *_probe, *_probe_one, *_console,
how to fix this?
Quoted 25 lines · Luca Santini
if i try to compile it as a module, i get:
WARNING: drivers/i2c/busses/i2c-sh7760.o(.data+0x0): Section mismatch in reference from the variable
sh7760_i2c_drvto the function .devinit.text:sh7760_i2c_probe()
The variablesh7760_i2c_drvreferences
the function__devinitsh7760_i2c_probe()
If the reference is valid then annotate the
variable with __init* (seelinux/init.h) or name the variable:
*driver,*_template,*_timer,*_sht,*_ops,*_probe,*_probe_one,*_console,WARNING: drivers/i2c/busses/i2c-sh7760.o(.data+0x4): Section mismatch in reference from the variable
sh7760_i2c_drvto the function .devexit.text:sh7760_i2c_remove()
The variablesh7760_i2c_drvreferences
the function__devexitsh7760_i2c_remove()
If the reference is valid then annotate the
variable with __exit* (seelinux/init.h) or name the variable:
*driver,*_template,*_timer,*_sht,*_ops,*_probe,*_probe_one,*_console,
Quoted 1 line
how to fix this?
replace all instances of "sh7760_i2c_drv" with "sh7760_i2c_driver". It's not a bug, just a mismatch detector stupidity.
Best regards,
Manuel Lauss