mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-26 04:25:27 +08:00
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@freescale.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
a3483353ca
commit
71473dbd66
@ -3445,9 +3445,9 @@ static int ni_enable_smc_cac(struct radeon_device *rdev,
|
|||||||
static int ni_pcie_performance_request(struct radeon_device *rdev,
|
static int ni_pcie_performance_request(struct radeon_device *rdev,
|
||||||
u8 perf_req, bool advertise)
|
u8 perf_req, bool advertise)
|
||||||
{
|
{
|
||||||
|
#if defined(CONFIG_ACPI)
|
||||||
struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
|
struct evergreen_power_info *eg_pi = evergreen_get_pi(rdev);
|
||||||
|
|
||||||
#if defined(CONFIG_ACPI)
|
|
||||||
if ((perf_req == PCIE_PERF_REQ_PECI_GEN1) ||
|
if ((perf_req == PCIE_PERF_REQ_PECI_GEN1) ||
|
||||||
(perf_req == PCIE_PERF_REQ_PECI_GEN2)) {
|
(perf_req == PCIE_PERF_REQ_PECI_GEN2)) {
|
||||||
if (eg_pi->pcie_performance_request_registered == false)
|
if (eg_pi->pcie_performance_request_registered == false)
|
||||||
|
Loading…
Reference in New Issue
Block a user