[PATCH 2/2] drm: radeon: cypress_dpm: Fix unused variable warning when CONFIG_ACPI=n

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Fabio Estevam <fabio.estevam@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>
---
 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

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux