Skip to contentSkip to conversation

sh7760 i2c problem

DISCUSSION Luca Santini 2 participants 2 messages Jul 24, 2008 SuperH

lore
Share & tools
lore
#0 lore raw

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?

#1 lore raw
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_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,

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