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

Heiko Schocher hs at denx.de
Wed Apr 30 16:31:48 CEST 2014


Hello Dirk,

Am 30.04.2014 15:49, schrieb dirk.eibach at gdsys.cc:
> From: Dirk Eibach<dirk.eibach at gdsys.cc>
>
> Signed-off-by: Dirk Eibach<dirk.eibach at 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 at denx.de>

bye,
Heiko
-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany


More information about the U-Boot mailing list