summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-11-12 18:31:54 +0100
committerAlex Deucher <alexander.deucher@amd.com>2013-11-15 21:29:31 +0100
commit936b32643cb03dcb34ef5dab81970229b1cc2a33 (patch)
treeb12cb253e970a7164569638999895ba46eed78df /drivers
parentdrm: radeon: ni_dpm: Fix unused variable warning when CONFIG_ACPI=n (diff)
downloadlinux-936b32643cb03dcb34ef5dab81970229b1cc2a33.tar.xz
linux-936b32643cb03dcb34ef5dab81970229b1cc2a33.zip
drm/radeon: cypress_dpm: Fix unused variable warning when CONFIG_ACPI=n
With CONFIG_ACPI=n the following build warning is seen: drivers/gpu/drm/radeon/cypress_dpm.c:302:31: warning: unused variable 'eg_pi' [-Wunused-variable] Protect eg_pi with CONFIG_ACPI. Based on patch from: Fabio Estevam <fabio.estevam@freescale.com> but doesn't mix allocation and code. Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/radeon/cypress_dpm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index 91bb470de0a3..920e1e4a52c5 100644
--- a/drivers/gpu/drm/radeon/cypress_dpm.c
+++ b/drivers/gpu/drm/radeon/cypress_dpm.c
@@ -299,7 +299,9 @@ void cypress_program_response_times(struct radeon_device *rdev)
static int cypress_pcie_performance_request(struct radeon_device *rdev,
u8 perf_req, bool advertise)
{
+#if defined(CONFIG_ACPI)
struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
+#endif
u32 tmp;
udelay(10);