i2c: mxc: Fix dev_err being called on a nonexistant variable
[platform/kernel/u-boot.git] / drivers / i2c / lpc32xx_i2c.c
index f172e0e..6af2e97 100644 (file)
@@ -1,13 +1,13 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * LPC32xx I2C interface driver
  *
  * (C) Copyright 2014-2015  DENX Software Engineering GmbH
  * Written-by: Albert ARIBAUD - 3ADEV <albert.aribaud@3adev.fr>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 #include <common.h>
+#include <log.h>
 #include <asm/io.h>
 #include <i2c.h>
 #include <linux/errno.h>
@@ -282,6 +282,7 @@ U_BOOT_I2C_ADAP_COMPLETE(lpc32xx_2, lpc32xx_i2c_init, NULL,
 static int lpc32xx_i2c_probe(struct udevice *bus)
 {
        struct lpc32xx_i2c_dev *dev = dev_get_platdata(bus);
+       bus->seq = dev->index;
 
        __i2c_init(dev->base, dev->speed, 0, dev->index);
        return 0;