msm: usb: Fix compilation for multi-target binary
Rename some USB devices to fix concurrent compilation for
8960 and 8064.
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-apq8064.c b/arch/arm/mach-msm/board-apq8064.c
index 1056cbb..6b5eee6 100644
--- a/arch/arm/mach-msm/board-apq8064.c
+++ b/arch/arm/mach-msm/board-apq8064.c
@@ -76,8 +76,6 @@
&apq8064_device_qup_spi_gsbi5,
&apq8064_device_ssbi_pmic1,
&apq8064_device_ssbi_pmic2,
- &msm_device_otg,
- &msm_device_gadget_peripheral,
};
static struct msm_spi_platform_data apq8064_qup_spi_gsbi5_pdata = {
@@ -118,8 +116,8 @@
&apq8064_ssbi_pm8921_pdata;
apq8064_device_ssbi_pmic2.dev.platform_data =
&apq8064_ssbi_pm8821_pdata;
- msm_device_otg.dev.platform_data = &msm_otg_pdata;
- msm_device_gadget_peripheral.dev.parent = &msm_device_otg.dev;
+ apq8064_device_otg.dev.platform_data = &msm_otg_pdata;
+ apq8064_device_gadget_peripheral.dev.parent = &apq8064_device_otg.dev;
platform_add_devices(common_devices, ARRAY_SIZE(common_devices));
}
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index d6676eb..df21fb7 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -2223,7 +2223,8 @@
return;
if (on) {
- mvs_otg_switch = regulator_get(&msm_device_otg.dev, "vbus_otg");
+ mvs_otg_switch = regulator_get(&msm8960_device_otg.dev,
+ "vbus_otg");
if (IS_ERR(mvs_otg_switch)) {
pr_err("Unable to get mvs_otg_switch\n");
return;
@@ -2326,7 +2327,7 @@
.update_pid_and_serial_num = usb_diag_update_pid_and_serial_num,
};
-struct platform_device android_usb_device = {
+static struct platform_device android_usb_device = {
.name = "android_usb",
.id = -1,
.dev = {
@@ -2735,8 +2736,8 @@
};
static struct platform_device *sim_devices[] __initdata = {
- &msm_device_otg,
- &msm_device_gadget_peripheral,
+ &msm8960_device_otg,
+ &msm8960_device_gadget_peripheral,
&msm_device_hsusb_host,
&android_usb_device,
&msm_device_vidc,
@@ -2783,8 +2784,8 @@
};
static struct platform_device *cdp_devices[] __initdata = {
- &msm_device_otg,
- &msm_device_gadget_peripheral,
+ &msm8960_device_otg,
+ &msm8960_device_gadget_peripheral,
&msm_device_hsusb_host,
&android_usb_device,
&msm_pcm,
@@ -3383,9 +3384,9 @@
/* Simulator supports a QWERTY keypad */
pm8921_platform_data.keypad_pdata = &keypad_data_sim;
- msm_device_otg.dev.platform_data = &msm_otg_pdata;
- msm_device_gadget_peripheral.dev.parent = &msm_device_otg.dev;
- msm_device_hsusb_host.dev.parent = &msm_device_otg.dev;
+ msm8960_device_otg.dev.platform_data = &msm_otg_pdata;
+ msm8960_device_gadget_peripheral.dev.parent = &msm8960_device_otg.dev;
+ msm_device_hsusb_host.dev.parent = &msm8960_device_otg.dev;
gpiomux_init();
ethernet_init();
msm8960_i2c_init();
@@ -3459,9 +3460,9 @@
if (msm_xo_init())
pr_err("Failed to initialize XO votes\n");
msm8960_clock_init();
- msm_device_otg.dev.platform_data = &msm_otg_pdata;
- msm_device_gadget_peripheral.dev.parent = &msm_device_otg.dev;
- msm_device_hsusb_host.dev.parent = &msm_device_otg.dev;
+ msm8960_device_otg.dev.platform_data = &msm_otg_pdata;
+ msm8960_device_gadget_peripheral.dev.parent = &msm8960_device_otg.dev;
+ msm_device_hsusb_host.dev.parent = &msm8960_device_otg.dev;
gpiomux_init();
ethernet_init();
msm8960_device_qup_spi_gsbi1.dev.platform_data =
diff --git a/arch/arm/mach-msm/devices-8064.c b/arch/arm/mach-msm/devices-8064.c
index c723f54..26663be 100644
--- a/arch/arm/mach-msm/devices-8064.c
+++ b/arch/arm/mach-msm/devices-8064.c
@@ -162,7 +162,7 @@
},
};
-struct platform_device msm_device_otg = {
+struct platform_device apq8064_device_otg = {
.name = "msm_otg",
.id = -1,
.num_resources = ARRAY_SIZE(resources_otg),
@@ -185,7 +185,7 @@
},
};
-struct platform_device msm_device_gadget_peripheral = {
+struct platform_device apq8064_device_gadget_peripheral = {
.name = "msm_hsusb",
.id = -1,
.num_resources = ARRAY_SIZE(resources_hsusb),
diff --git a/arch/arm/mach-msm/devices-8960.c b/arch/arm/mach-msm/devices-8960.c
index 8c668fe..1d6e254 100644
--- a/arch/arm/mach-msm/devices-8960.c
+++ b/arch/arm/mach-msm/devices-8960.c
@@ -92,7 +92,7 @@
},
};
-struct platform_device msm_device_otg = {
+struct platform_device msm8960_device_otg = {
.name = "msm_otg",
.id = -1,
.num_resources = ARRAY_SIZE(resources_otg),
@@ -115,7 +115,7 @@
},
};
-struct platform_device msm_device_gadget_peripheral = {
+struct platform_device msm8960_device_gadget_peripheral = {
.name = "msm_hsusb",
.id = -1,
.num_resources = ARRAY_SIZE(resources_hsusb),
diff --git a/arch/arm/mach-msm/devices.h b/arch/arm/mach-msm/devices.h
index 5e321b2..d272fa6 100644
--- a/arch/arm/mach-msm/devices.h
+++ b/arch/arm/mach-msm/devices.h
@@ -70,6 +70,13 @@
extern struct platform_device msm_device_otg;
+extern struct platform_device msm8960_device_otg;
+extern struct platform_device msm8960_device_gadget_peripheral;
+
+extern struct platform_device apq8064_device_otg;
+extern struct platform_device apq8064_usb_diag_device;
+extern struct platform_device apq8064_device_gadget_peripheral;
+
extern struct platform_device msm_device_i2c;
extern struct platform_device msm_device_i2c_2;