drm: radeon: ni_dpm: Fix unused variable warning when CONFIG_ACPI=n

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Fri Nov 22 17:59:09 EST 2013


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=71473dbd66d4a61be4cd531ef96b4877f6ee3941
Commit:     71473dbd66d4a61be4cd531ef96b4877f6ee3941
Parent:     a3483353ca4e6dbeef2ed62ebed01af109b5b27a
Author:     Fabio Estevam <fabio.estevam at freescale.com>
AuthorDate: Sat Nov 9 15:59:02 2013 -0200
Committer:  Alex Deucher <alexander.deucher at amd.com>
CommitDate: Fri Nov 15 15:29:31 2013 -0500

    drm: radeon: ni_dpm: Fix unused variable warning when CONFIG_ACPI=n
    
    With CONFIG_ACPI=n the following build warning is seen:
    
    drivers/gpu/drm/radeon/ni_dpm.c:3448: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>
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/radeon/ni_dpm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/ni_dpm.c b/drivers/gpu/drm/radeon/ni_dpm.c
index f263390..cdc0030 100644
--- a/drivers/gpu/drm/radeon/ni_dpm.c
+++ b/drivers/gpu/drm/radeon/ni_dpm.c
@@ -3445,9 +3445,9 @@ static int ni_enable_smc_cac(struct radeon_device *rdev,
 static int ni_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);
 
-#if defined(CONFIG_ACPI)
 	if ((perf_req == PCIE_PERF_REQ_PECI_GEN1) ||
             (perf_req == PCIE_PERF_REQ_PECI_GEN2)) {
 		if (eg_pi->pcie_performance_request_registered == false)



More information about the linux-mtd-cvs mailing list