From 6205e038283ebc65087cb8e3798d54fb15edc732 Mon Sep 17 00:00:00 2001 From: Angel Pons Date: Sat, 17 Apr 2021 12:25:23 +0200 Subject: soc/intel/common/block/pcr: Define __SIMPLE_DEVICE__ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I06f9c623947e48a7213e42507f4da51c12b425d7 Signed-off-by: Angel Pons Reviewed-on: https://review.coreboot.org/c/coreboot/+/52458 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Michael Niewöhner --- src/soc/intel/common/block/pcr/pcr.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/soc/intel/common/block/pcr/pcr.c b/src/soc/intel/common/block/pcr/pcr.c index 03f0a0aec5..96b93ad37a 100644 --- a/src/soc/intel/common/block/pcr/pcr.c +++ b/src/soc/intel/common/block/pcr/pcr.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: GPL-2.0-only */ +#define __SIMPLE_DEVICE__ + #include #include #include @@ -208,11 +210,7 @@ void pcr_or8(uint8_t pid, uint16_t offset, uint8_t ordata) #if !CONFIG(PCR_COMMON_IOSF_1_0) -#ifdef __SIMPLE_DEVICE__ -static int pcr_wait_for_completion(pci_devfn_t dev) -#else -static int pcr_wait_for_completion(struct device *dev) -#endif +static int pcr_wait_for_completion(const pci_devfn_t dev) { struct stopwatch sw; @@ -245,11 +243,7 @@ static int pcr_wait_for_completion(struct device *dev) int pcr_execute_sideband_msg(struct pcr_sbi_msg *msg, uint32_t *data, uint8_t *response) { -#if defined(__SIMPLE_DEVICE__) - pci_devfn_t dev = PCH_DEV_P2SB; -#else - struct device *dev = PCH_DEV_P2SB; -#endif + const pci_devfn_t dev = PCH_DEV_P2SB; uint32_t sbi_data; uint16_t sbi_status; uint16_t sbi_rid; -- cgit v1.2.3