ARM: tegra: Fix build breaks
Bo Yan [Wed, 11 Jul 2012 20:03:03 +0000 (13:03 -0700)]
When warnings are treated as errors, the unused variables and
functions are causing build breaks. Remove them or enclose them
in appropriate #ifdef macros.

Change-Id: Ia40d00966dcd4e7c48843d2e812f28dd308ef3a2
Signed-off-by: Bo Yan <byan@nvidia.com>
Reviewed-on: http://git-master/r/115083
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>

Rebase-Id: R9dd3b0fc6bf91bc57b42164ad592d56c9932767e

arch/arm/mach-tegra/board-curacao-panel.c
arch/arm/mach-tegra/board-curacao-sensors.c
arch/arm/mach-tegra/board-curacao.c
arch/arm/mach-tegra/hotplug.c

index ce1d5c2..a07a5da 100644 (file)
@@ -53,7 +53,9 @@
 #define DSI_PANEL_RESET        1
 #define DC_CTRL_MODE   TEGRA_DC_OUT_CONTINUOUS_MODE
 
+#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
 static atomic_t sd_brightness = ATOMIC_INIT(255);
+#endif
 
 static int curacao_backlight_init(struct device *dev)
 {
@@ -96,6 +98,7 @@ static struct platform_device curacao_backlight_device = {
        },
 };
 
+#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
 static int curacao_panel_enable(void)
 {
 #if DSI_PANEL_218
@@ -393,87 +396,7 @@ static struct nvhost_device curacao_disp1_device = {
                .platform_data = &curacao_disp1_pdata,
        },
 };
-
-static struct resource curacao_disp2_resources[] = {
-       {
-               .name   = "irq",
-               .start  = INT_DISPLAY_B_GENERAL,
-               .end    = INT_DISPLAY_B_GENERAL,
-               .flags  = IORESOURCE_IRQ,
-       },
-       {
-               .name   = "regs",
-               .start  = TEGRA_DISPLAY2_BASE,
-               .end    = TEGRA_DISPLAY2_BASE + TEGRA_DISPLAY2_SIZE-1,
-               .flags  = IORESOURCE_MEM,
-       },
-       {
-               .name   = "fbmem",
-               .start  = 0,    /* Filled in by curacao_panel_init() */
-               .end    = 0,    /* Filled in by curacao_panel_init() */
-               .flags  = IORESOURCE_MEM,
-       },
-#if TEGRA_DSI_GANGED_MODE
-       {
-               .name   = "ganged_dsia_regs",
-               .start  = TEGRA_DSI_BASE,
-               .end    = TEGRA_DSI_BASE + TEGRA_DSI_SIZE - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-       {
-               .name   = "ganged_dsib_regs",
-               .start  = TEGRA_DSIB_BASE,
-               .end    = TEGRA_DSIB_BASE + TEGRA_DSIB_SIZE - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-#else
-       {
-               .name   = "dsi_regs",
-               .start  = TEGRA_DSI_BASE,
-               .end    = TEGRA_DSI_BASE + TEGRA_DSI_SIZE - 1,
-               .flags  = IORESOURCE_MEM,
-       },
-
-#endif
-};
-
-static struct tegra_dc_out curacao_disp2_out = {
-       .sd_settings    = &curacao_sd_settings,
-
-#ifdef CONFIG_TEGRA_SIMULATION_PLATFORM
-       .type           = TEGRA_DC_OUT_RGB,
-#else
-       .type           = TEGRA_DC_OUT_DSI,
 #endif
-       .dsi            = &curacao_dsi,
-
-       .align          = TEGRA_DC_ALIGN_MSB,
-       .order          = TEGRA_DC_ORDER_RED_BLUE,
-
-       .flags          = DC_CTRL_MODE,
-
-       .modes          = curacao_panel_modes,
-       .n_modes        = ARRAY_SIZE(curacao_panel_modes),
-
-       .enable         = curacao_panel_enable,
-       .disable        = curacao_panel_disable,
-};
-
-static struct tegra_dc_platform_data curacao_disp2_pdata = {
-       .flags          = TEGRA_DC_FLAG_ENABLED,
-       .default_out    = &curacao_disp2_out,
-       .fb             = &curacao_fb_data,
-};
-
-static struct nvhost_device curacao_disp2_device = {
-       .name           = "tegradc",
-       .id             = 0,
-       .resource       = curacao_disp2_resources,
-       .num_resources  = ARRAY_SIZE(curacao_disp2_resources),
-       .dev = {
-               .platform_data = &curacao_disp2_pdata,
-       },
-};
 
 static struct nvmap_platform_carveout curacao_carveouts[] = {
        [0] = {
@@ -521,7 +444,9 @@ static struct platform_device *curacao_gfx_devices[] __initdata = {
 int __init curacao_panel_init(void)
 {
        int err;
+#if defined(CONFIG_TEGRA_GRHOST) && defined(CONFIG_TEGRA_DC)
        struct resource *res;
+#endif
 
        curacao_carveouts[1].base = tegra_carveout_start;
        curacao_carveouts[1].size = tegra_carveout_size;
index bc19250..acc8aad 100644 (file)
@@ -145,13 +145,6 @@ struct ov2710_platform_data curacao_ov2710_data = {
        .power_off = curacao_ov2710_power_off,
 };
 
-static struct i2c_board_info curacao_i2c1_board_info[] = {
-       {
-               I2C_BOARD_INFO("ov5650", 0x36),
-               .platform_data = &curacao_ov5650_data,
-       },
-};
-
 static struct i2c_board_info curacao_i2c2_board_info[] = {
        {
                I2C_BOARD_INFO("ov5650R", 0x36),
@@ -165,9 +158,6 @@ int __init curacao_sensors_init(void)
 
        curacao_camera_init();
 
-/*     i2c_register_board_info(3, curacao_i2c1_board_info,
-               ARRAY_SIZE(curacao_i2c1_board_info));*/
-
        i2c_register_board_info(3, curacao_i2c2_board_info,
                ARRAY_SIZE(curacao_i2c2_board_info));
 
index 90ad915..c9bbd15 100644 (file)
@@ -171,16 +171,6 @@ static const struct tegra_pingroup_config i2c2_gen2 = {
 };
 #endif
 
-static struct tegra_i2c_platform_data curacao_i2c2_platform_data = {
-       .adapter_nr     = 1,
-       .bus_count      = 2,
-       .bus_clk_rate   = { 100000, 100000 },
-#if 0  /* !!!FIXME!!!! */
-       .bus_mux        = { &i2c2_ddc, &i2c2_gen2 },
-       .bus_mux_len    = { 1, 1 },
-#endif
-};
-
 static struct tegra_i2c_slave_platform_data curacao_i2c2_slave_platform_data = {
        .adapter_nr     = 1,
        .bus_clk_rate   = 100000,
@@ -385,7 +375,6 @@ static struct platform_device *curacao_devices[] __initdata = {
        &tegra_smmu_device,
 #endif
        &curacao_keys_device,
-       &tegra_wdt_device,
 #if defined(CONFIG_SND_HDA_TEGRA)
        &tegra_hda_device,
 #endif
@@ -440,6 +429,7 @@ static struct tegra_usb_platform_data tegra_udc_pdata = {
        },
 };
 
+#if defined(USB_HOST_ONLY)
 static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
        .port_otg = true,
        .has_hostpc = true,
@@ -465,62 +455,7 @@ static struct tegra_usb_platform_data tegra_ehci1_utmi_pdata = {
                .xcvr_use_fuses = 1,
        },
 };
-
-static struct tegra_usb_platform_data tegra_ehci2_utmi_pdata = {
-       .port_otg = false,
-       .has_hostpc = true,
-       .unaligned_dma_buf_supported = true,
-       .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
-       .op_mode        = TEGRA_USB_OPMODE_HOST,
-       .u_data.host = {
-               .vbus_gpio = -1,
-               .hot_plug = true,
-               .remote_wakeup_supported = true,
-               .power_off_on_suspend = true,
-       },
-       .u_cfg.utmi = {
-               .hssync_start_delay = 0,
-               .elastic_limit = 16,
-               .idle_wait_delay = 17,
-               .term_range_adj = 6,
-               .xcvr_setup = 15,
-               .xcvr_lsfslew = 2,
-               .xcvr_lsrslew = 2,
-               .xcvr_setup_offset = 0,
-               .xcvr_use_fuses = 1,
-       },
-};
-
-static struct tegra_usb_platform_data tegra_ehci3_utmi_pdata = {
-       .port_otg = false,
-       .has_hostpc = true,
-       .unaligned_dma_buf_supported = true,
-       .phy_intf = TEGRA_USB_PHY_INTF_UTMI,
-       .op_mode        = TEGRA_USB_OPMODE_HOST,
-       .u_data.host = {
-               .vbus_gpio = -1,
-               .vbus_reg = "vdd_vbus_typea_usb",
-               .hot_plug = true,
-               .remote_wakeup_supported = true,
-               .power_off_on_suspend = true,
-       },
-       .u_cfg.utmi = {
-               .hssync_start_delay = 0,
-               .elastic_limit = 16,
-               .idle_wait_delay = 17,
-               .term_range_adj = 6,
-               .xcvr_setup = 8,
-               .xcvr_lsfslew = 2,
-               .xcvr_lsrslew = 2,
-               .xcvr_setup_offset = 0,
-               .xcvr_use_fuses = 1,
-       },
-};
-
-static struct tegra_usb_otg_data tegra_otg_pdata = {
-       .ehci_device = &tegra_ehci1_device,
-       .ehci_pdata = &tegra_ehci1_utmi_pdata,
-};
+#endif
 
 static void curacao_usb_init(void)
 {
index 61c71ef..f14ea9e 100644 (file)
@@ -43,7 +43,7 @@ void tegra_cpu_die(unsigned int cpu)
 
 #ifndef CONFIG_ARCH_TEGRA_2x_SOC
 #ifdef CONFIG_ARCH_TEGRA_11x_SOC
-       unsigned int r;
+       unsigned int r = 0;
 #endif
 
        /* Disable GIC CPU interface for this CPU. */