drm/radeon: cypress_dpm: Fix unused variable warning when CONFIG_ACPI=n

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


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=936b32643cb03dcb34ef5dab81970229b1cc2a33
Commit:     936b32643cb03dcb34ef5dab81970229b1cc2a33
Parent:     71473dbd66d4a61be4cd531ef96b4877f6ee3941
Author:     Alex Deucher <alexander.deucher at amd.com>
AuthorDate: Tue Nov 12 12:31:54 2013 -0500
Committer:  Alex Deucher <alexander.deucher at amd.com>
CommitDate: Fri Nov 15 15:29:31 2013 -0500

    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 at freescale.com>
    but doesn't mix allocation and code.
    
    Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/radeon/cypress_dpm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/radeon/cypress_dpm.c b/drivers/gpu/drm/radeon/cypress_dpm.c
index 91bb470..920e1e4 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);



More information about the linux-mtd-cvs mailing list