diff mbox

[U-Boot,1/3] i2c: eliminate warnings in i2c_reloc_fixup function

Message ID 1381899184-23315-2-git-send-email-yamada.m@jp.panasonic.com
State Accepted
Delegated to: Heiko Schocher
Headers show

Commit Message

Masahiro Yamada Oct. 16, 2013, 4:53 a.m. UTC
The prototype of handlers had changed.
This commit uses cast with (void *) rather than
the handler-specific prototype.

Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---

Note:
The body of i2c_reloc_fixup function is surrounded by
  #if defined(CONFIG_NEEDS_MANUAL_RELOC) ... #endif

avr32, m68k, nds32, sparc defines this macro.


 drivers/i2c/i2c_core.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

Comments

Heiko Schocher Oct. 17, 2013, 6:27 a.m. UTC | #1
Hello Masahiro,

Am 16.10.2013 06:53, schrieb Masahiro Yamada:
> The prototype of handlers had changed.
> This commit uses cast with (void *) rather than
> the handler-specific prototype.
>
> Signed-off-by: Masahiro Yamada<yamada.m@jp.panasonic.com>
>
> ---
> Note:
> The body of i2c_reloc_fixup function is surrounded by
>    #if defined(CONFIG_NEEDS_MANUAL_RELOC) ... #endif
>
> avr32, m68k, nds32, sparc defines this macro.
>
>
>   drivers/i2c/i2c_core.c | 12 +++++-------
>   1 file changed, 5 insertions(+), 7 deletions(-)

Applied to u-boot-i2c.git

Thanks!

bye,
Heiko
diff mbox

Patch

diff --git a/drivers/i2c/i2c_core.c b/drivers/i2c/i2c_core.c
index d1072e8..b853ac2 100644
--- a/drivers/i2c/i2c_core.c
+++ b/drivers/i2c/i2c_core.c
@@ -60,25 +60,23 @@  void i2c_reloc_fixup(void)
 		/* i2c_init() */
 		addr = (unsigned long)i2c_adap_p->init;
 		addr += gd->reloc_off;
-		i2c_adap_p->init = (void (*)(int, int))addr;
+		i2c_adap_p->init = (void *)addr;
 		/* i2c_probe() */
 		addr = (unsigned long)i2c_adap_p->probe;
 		addr += gd->reloc_off;
-		i2c_adap_p->probe = (int (*)(uint8_t))addr;
+		i2c_adap_p->probe = (void *)addr;
 		/* i2c_read() */
 		addr = (unsigned long)i2c_adap_p->read;
 		addr += gd->reloc_off;
-		i2c_adap_p->read = (int (*)(uint8_t, uint, int, uint8_t *,
-					int))addr;
+		i2c_adap_p->read = (void *)addr;
 		/* i2c_write() */
 		addr = (unsigned long)i2c_adap_p->write;
 		addr += gd->reloc_off;
-		i2c_adap_p->write = (int (*)(uint8_t, uint, int, uint8_t *,
-					int))addr;
+		i2c_adap_p->write = (void *)addr;
 		/* i2c_set_bus_speed() */
 		addr = (unsigned long)i2c_adap_p->set_bus_speed;
 		addr += gd->reloc_off;
-		i2c_adap_p->set_bus_speed = (uint (*)(uint))addr;
+		i2c_adap_p->set_bus_speed = (void *)addr;
 		/* name */
 		addr = (unsigned long)i2c_adap_p->name;
 		addr += gd->reloc_off;