aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Miao <eric.miao@linaro.org>2011-12-04 23:22:23 +0800
committerEric Miao <eric.miao@linaro.org>2011-12-04 23:34:49 +0800
commitb78b75907b24fbcfe4e6107d7457a427b73939eb (patch)
tree8ae42e1879678c70ae666dad6a386cfdce28527f
parent45bf67ee696ba61e94f3f077caec338d85e8b5fd (diff)
downloadlinux-linaro-b78b75907b24fbcfe4e6107d7457a427b73939eb.tar.gz
SAUCE: mx53_loco: fix gpio_to_irq() being non-constant
Signed-off-by: Eric Miao <eric.miao@linaro.org>
-rw-r--r--arch/arm/mach-mx5/board-mx53_loco.c19
-rw-r--r--arch/arm/mach-mx5/mx53_loco_pmic_da9053.c4
2 files changed, 13 insertions, 10 deletions
diff --git a/arch/arm/mach-mx5/board-mx53_loco.c b/arch/arm/mach-mx5/board-mx53_loco.c
index 63e47ef276a..fe3485f62b3 100644
--- a/arch/arm/mach-mx5/board-mx53_loco.c
+++ b/arch/arm/mach-mx5/board-mx53_loco.c
@@ -331,15 +331,14 @@ static struct i2c_board_info mxc_i2c0_board_info[] __initdata = {
};
static struct i2c_board_info mxc_i2c1_board_info[] __initdata = {
- {
- .type = "sgtl5000",
- .addr = 0x0a,
+ [0] = {
+ .type = "sgtl5000",
+ .addr = 0x0a,
},
- {
- .type = "sii902x",
- .addr = 0x39,
- .irq = gpio_to_irq(LOCO_DISP0_DET_INT),
- .platform_data = &sii902x_hdmi_data,
+ [1] = {
+ .type = "sii902x",
+ .addr = 0x39,
+ .platform_data = &sii902x_hdmi_data,
},
};
@@ -551,8 +550,12 @@ static void __init mx53_loco_board_init(void)
imx53_add_imx_i2c(1, &mx53_loco_i2c_data);
i2c_register_board_info(0, mxc_i2c0_board_info,
ARRAY_SIZE(mxc_i2c0_board_info));
+
+ mxc_i2c1_board_info[1].irq = gpio_to_irq(LOCO_DISP0_DET_INT);
+
i2c_register_board_info(1, mxc_i2c1_board_info,
ARRAY_SIZE(mxc_i2c1_board_info));
+
imx53_add_sdhci_esdhc_imx(0, &mx53_loco_sd1_data);
imx53_add_sdhci_esdhc_imx(2, &mx53_loco_sd3_data);
mxc_register_device(&loco_audio_device, &loco_audio_data);
diff --git a/arch/arm/mach-mx5/mx53_loco_pmic_da9053.c b/arch/arm/mach-mx5/mx53_loco_pmic_da9053.c
index 98f62f96c4a..75266141fea 100644
--- a/arch/arm/mach-mx5/mx53_loco_pmic_da9053.c
+++ b/arch/arm/mach-mx5/mx53_loco_pmic_da9053.c
@@ -26,6 +26,7 @@
#include <linux/platform_device.h>
#include <linux/i2c.h>
#include <linux/irq.h>
+#include <linux/gpio.h>
#include <linux/interrupt.h>
#include <linux/err.h>
#include <linux/regulator/machine.h>
@@ -36,7 +37,6 @@
#include <linux/mfd/da9052/tsi.h>
#include <mach/irqs.h>
#include <mach/iomux-mx53.h>
-#include <mach/gpio.h>
#define DA9052_LDO(max, min, rname, suspend_mv) \
{\
@@ -279,11 +279,11 @@ static struct da9052_platform_data __initdata da9052_plat = {
static struct i2c_board_info __initdata da9052_i2c_device = {
I2C_BOARD_INFO(DA9052_SSC_I2C_DEVICE_NAME, DA9052_I2C_ADDR >> 1),
- .irq = gpio_to_irq(MX53_LOCO_DA9052_IRQ),
.platform_data = &da9052_plat,
};
int __init mx53_loco_init_da9052(void)
{
+ da9052_i2c_device.irq = gpio_to_irq(MX53_LOCO_DA9052_IRQ);
return i2c_register_board_info(0, &da9052_i2c_device, 1);
}