video: tegra: fix compilation warning
Rhyland Klein [Thu, 12 Jul 2012 16:51:54 +0000 (09:51 -0700)]
Without the CONFIG_SWITCH enabled, there are multiple unused
variable warnings that get treated as error.

bug 949219

Signed-off-by: Rhyland Klein <rklein@nvidia.com>
Change-Id: I39512367fa4bbd3b00a435d0d7a31cfede9e712f
Reviewed-on: http://git-master/r/115428
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Reviewed-by: Sanjay Singh Rawat <srawat@nvidia.com>

drivers/video/tegra/dc/hdmi.c

index 456691b..9cd6cef 100644 (file)
@@ -1500,10 +1500,10 @@ static void tegra_dc_hdmi_resume(struct tegra_dc *dc)
        tegra_nvhdcp_resume(hdmi->nvhdcp);
 }
 
+#ifdef CONFIG_SWITCH
 static ssize_t underscan_show(struct device *dev,
                                struct device_attribute *attr, char *buf)
 {
-#ifdef CONFIG_SWITCH
        struct tegra_dc_hdmi_data *hdmi =
                        container_of(dev_get_drvdata(dev), struct tegra_dc_hdmi_data, hpd_switch);
 
@@ -1511,19 +1511,19 @@ static ssize_t underscan_show(struct device *dev,
                return sprintf(buf, "%d\n", tegra_edid_underscan_supported(hdmi->edid));
        else
                return 0;
-#else
-       return 0;
-#endif
 }
 
 static DEVICE_ATTR(underscan, S_IRUGO | S_IWUSR, underscan_show, NULL);
+#endif
 
 static int tegra_dc_hdmi_init(struct tegra_dc *dc)
 {
        struct tegra_dc_hdmi_data *hdmi;
        struct resource *res;
        struct resource *base_res;
+#ifdef CONFIG_SWITCH
        int ret;
+#endif
        void __iomem *base;
        struct clk *clk = NULL;
        struct clk *disp1_clk = NULL;