]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/i2c/fsl_i2c.c
Section name should be ".data", not "data"
[karo-tx-uboot.git] / drivers / i2c / fsl_i2c.c
index 281a88b972fd7594faf7b90d9b41a04232842584..3b5c06ba65fb2b4ee507e53ce7c122ff37cc2590 100644 (file)
@@ -38,11 +38,10 @@ DECLARE_GLOBAL_DATA_PTR;
  * runs from ROM, and we can't switch buses because we can't modify
  * the global variables.
  */
-#ifdef CONFIG_SYS_SPD_BUS_NUM
-static unsigned int i2c_bus_num __attribute__ ((section ("data"))) = CONFIG_SYS_SPD_BUS_NUM;
-#else
-static unsigned int i2c_bus_num __attribute__ ((section ("data"))) = 0;
+#ifndef CONFIG_SYS_SPD_BUS_NUM
+#define CONFIG_SYS_SPD_BUS_NUM 0
 #endif
+static unsigned int i2c_bus_num __attribute__ ((section (".data"))) = CONFIG_SYS_SPD_BUS_NUM;
 
 static unsigned int i2c_bus_speed[2] = {CONFIG_SYS_I2C_SPEED, CONFIG_SYS_I2C_SPEED};