diff mbox

[U-Boot,v1,03/11] board: controlcenterd: Use new API for setting i2c bus

Message ID 1398865804-12539-4-git-send-email-dirk.eibach@gdsys.cc
State Accepted
Delegated to: Stefan Roese
Headers show

Commit Message

Dirk Eibach April 30, 2014, 1:49 p.m. UTC
From: Dirk Eibach <dirk.eibach@gdsys.cc>

Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc>
---

 board/gdsys/p1022/controlcenterd-id.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

Heiko Schocher April 30, 2014, 2:31 p.m. UTC | #1
Hello Dirk,

Am 30.04.2014 15:49, schrieb dirk.eibach@gdsys.cc:
> From: Dirk Eibach<dirk.eibach@gdsys.cc>
>
> Signed-off-by: Dirk Eibach<dirk.eibach@gdsys.cc>
> ---
>
>   board/gdsys/p1022/controlcenterd-id.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
> index 3fca3c5..019df5e 100644
> --- a/board/gdsys/p1022/controlcenterd-id.c
> +++ b/board/gdsys/p1022/controlcenterd-id.c
> @@ -1189,8 +1189,8 @@ int startup_ccdm_id_module(void)
>   	int result = 0;
>   	unsigned int orig_i2c_bus;
>
> -	orig_i2c_bus = I2C_GET_BUS();
> -	I2C_SET_BUS(1);
> +	orig_i2c_bus = i2c_get_bus_num();
> +	i2c_set_bus_num(1);

Nitpicking: Can you replace the "1" with a define?

If all i2c drivers switched to the new API, we can get rid of this
"storing from old i2c bus" mechanism complete ... but as this is not
done yet:

Acked-by: Heiko Schocher <hs@denx.de>

bye,
Heiko
diff mbox

Patch

diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c
index 3fca3c5..019df5e 100644
--- a/board/gdsys/p1022/controlcenterd-id.c
+++ b/board/gdsys/p1022/controlcenterd-id.c
@@ -1189,8 +1189,8 @@  int startup_ccdm_id_module(void)
 	int result = 0;
 	unsigned int orig_i2c_bus;
 
-	orig_i2c_bus = I2C_GET_BUS();
-	I2C_SET_BUS(1);
+	orig_i2c_bus = i2c_get_bus_num();
+	i2c_set_bus_num(1);
 
 	/* goto end; */
 
@@ -1216,7 +1216,7 @@  int startup_ccdm_id_module(void)
 failure:
 	result = 1;
 end:
-	I2C_SET_BUS(orig_i2c_bus);
+	i2c_set_bus_num(orig_i2c_bus);
 	if (result)
 		ccdm_hang();