[PATCH 2/2] drm: radeon: cypress_dpm: Fix unused variable warning when CONFIG_ACPI=n
Fabio Estevam
festevam at gmail.com
Sat Nov 9 09:59:03 PST 2013
From: Fabio Estevam <fabio.estevam at freescale.com>
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]
Move the definition of eg_pi inside the CONFIG_ACPI 'if' block.
Signed-off-by: Fabio Estevam <fabio.estevam at freescale.com>
---
drivers/gpu/drm/radeon/cypress_dpm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index 91bb470..a231c59 100644
--- a/drivers/gpu/drm/radeon/cypress_dpm.c
+++ b/drivers/gpu/drm/radeon/cypress_dpm.c
@@ -299,7 +299,6 @@ void cypress_program_response_times(struct radeon_device *rdev)
static int cypress_pcie_performance_request(struct radeon_device *rdev,
u8 perf_req, bool advertise)
{
- struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
u32 tmp;
udelay(10);
@@ -308,6 +307,7 @@ static int cypress_pcie_performance_request(struct radeon_device *rdev,
return 0;
#if defined(CONFIG_ACPI)
+ struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
if ((perf_req == PCIE_PERF_REQ_PECI_GEN1) ||
(perf_req == PCIE_PERF_REQ_PECI_GEN2)) {
eg_pi->pcie_performance_request_registered = true;
--
1.8.1.2
More information about the dri-devel
mailing list