This patch repalce I2C_SET_BUS macro with i2c_set_bus_num() finction.

Signed-off-by: Piotr Wilczek <p.wilc...@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.p...@samsung.com>

---
Changes in v3:
- new patch

Changes in v2: None

 drivers/power/power_i2c.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/power/power_i2c.c b/drivers/power/power_i2c.c
index 3e5a784..e0f2092 100644
--- a/drivers/power/power_i2c.c
+++ b/drivers/power/power_i2c.c
@@ -114,7 +114,13 @@ int pmic_reg_read(struct pmic *p, u32 reg, u32 *val)
 
 int pmic_probe(struct pmic *p)
 {
+       /* this #ifdef should go away when all i2c drivers */
+       /* are adapted to the new i2c framework */
+#ifdef CONFIG_SYS_I2C
+       i2c_set_bus_num(p->bus);
+#else
        I2C_SET_BUS(p->bus);
+#endif
        debug("Bus: %d PMIC:%s probed!\n", p->bus, p->name);
        if (i2c_probe(pmic_i2c_addr)) {
                printf("Can't find PMIC:%s\n", p->name);
-- 
1.7.9.5

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to