diff options
author | Scott Williams <scwilliams@nvidia.com> | 2011-06-14 13:31:54 -0700 |
---|---|---|
committer | Varun Colbert <vcolbert@nvidia.com> | 2011-07-08 22:54:07 -0700 |
commit | 6e481f8f1cb49d7600fc5bd4e0f4fdb86d5ca221 (patch) | |
tree | 45b00651f6b6086733a4005b3793e0a4ab2eb0c2 /arch/arm/mach-tegra/board-cardhu-panel.c | |
parent | 48d66a4e3071e94b33aa9e8827a07028fa59ce54 (diff) |
arm: tegra: panel: Fix build warnings for Cardhu
Fixes "warning: '<variable>' defined but not used" and "warning:
label '<label>' defined but not used" messages.
Change-Id: I6172b3648f824bb315d4a296b034f419d81bc786
Reviewed-on: http://git-master/r/36583
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
Diffstat (limited to 'arch/arm/mach-tegra/board-cardhu-panel.c')
-rw-r--r-- | arch/arm/mach-tegra/board-cardhu-panel.c | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/arch/arm/mach-tegra/board-cardhu-panel.c b/arch/arm/mach-tegra/board-cardhu-panel.c index 17f2676808cb..2eb792ff4472 100644 --- a/arch/arm/mach-tegra/board-cardhu-panel.c +++ b/arch/arm/mach-tegra/board-cardhu-panel.c @@ -57,17 +57,19 @@ #define cardhu_dsi_panel_reset TEGRA_GPIO_PD2 #endif -static struct regulator *cardhu_dsi_reg = NULL; - static struct regulator *cardhu_hdmi_reg = NULL; static struct regulator *cardhu_hdmi_pll = NULL; static struct regulator *cardhu_hdmi_vddio = NULL; static atomic_t sd_brightness = ATOMIC_INIT(255); +#ifdef CONFIG_TEGRA_CARDHU_DSI +static struct regulator *cardhu_dsi_reg = NULL; +#else static struct regulator *cardhu_lvds_reg = NULL; static struct regulator *cardhu_lvds_vdd_bl = NULL; static struct regulator *cardhu_lvds_vdd_panel = NULL; +#endif static struct board_info board_info; @@ -152,9 +154,7 @@ static int cardhu_backlight_notify(struct device *unused, int brightness) /* Set the backlight GPIO pin mode to 'backlight_enable' */ gpio_request(cardhu_bl_enb, "backlight_enb"); gpio_set_value(cardhu_bl_enb, !!brightness); - goto final; -#endif -#if DSI_PANEL_219 || DSI_PANEL_218 +#elif DSI_PANEL_219 || DSI_PANEL_218 /* DSIa */ gpio_set_value(cardhu_dsia_bl_enb, !!brightness); @@ -162,7 +162,6 @@ static int cardhu_backlight_notify(struct device *unused, int brightness) gpio_set_value(cardhu_dsib_bl_enb, !!brightness); #endif -final: /* SD brightness is a percentage, 8-bit value. */ brightness = (brightness * cur_sd_brightness) / 255; if (cur_sd_brightness != 255) { @@ -191,6 +190,7 @@ static struct platform_device cardhu_backlight_device = { }, }; +#ifndef CONFIG_TEGRA_CARDHU_DSI static int cardhu_panel_enable(void) { if (cardhu_lvds_reg == NULL) { @@ -246,6 +246,7 @@ static int cardhu_panel_disable(void) gpio_set_value(cardhu_lvds_shutdown, 0); return 0; } +#endif static int cardhu_hdmi_vddio_enable(void) { @@ -387,6 +388,7 @@ static struct resource cardhu_disp2_resources[] = { }, }; +#ifndef CONFIG_TEGRA_CARDHU_DSI static struct tegra_dc_mode cardhu_panel_modes[] = { { /* 1366x768@59Hz */ @@ -403,6 +405,7 @@ static struct tegra_dc_mode cardhu_panel_modes[] = { .v_front_porch = 3, }, }; +#endif static struct tegra_dc_sd_settings cardhu_sd_settings = { .enable = 0, /* Disabled by default. */ @@ -495,6 +498,7 @@ static struct tegra_dc_sd_settings cardhu_sd_settings = { .bl_device = &cardhu_backlight_device, }; +#ifndef CONFIG_TEGRA_CARDHU_DSI static struct tegra_fb_data cardhu_fb_data = { .win = 0, .xres = 1366, @@ -502,6 +506,7 @@ static struct tegra_fb_data cardhu_fb_data = { .bits_per_pixel = 32, .flags = TEGRA_FB_FLIP_ON_PROBE, }; +#endif static struct tegra_fb_data cardhu_hdmi_fb_data = { .win = 0, @@ -536,6 +541,7 @@ static struct tegra_dc_platform_data cardhu_disp2_pdata = { .emc_clk_rate = 300000000, }; +#ifdef CONFIG_TEGRA_CARDHU_DSI static int cardhu_dsi_panel_enable(void) { int ret; @@ -786,7 +792,7 @@ static struct tegra_fb_data cardhu_dsi_fb_data = { #endif .flags = TEGRA_FB_FLIP_ON_PROBE, }; - +#endif static struct tegra_dc_out cardhu_disp1_out = { .align = TEGRA_DC_ALIGN_MSB, |