summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/skylake/pmutil.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/soc/intel/skylake/pmutil.c b/src/soc/intel/skylake/pmutil.c
index ec960b5fbe..6d16f52695 100644
--- a/src/soc/intel/skylake/pmutil.c
+++ b/src/soc/intel/skylake/pmutil.c
@@ -5,6 +5,8 @@
* and the differences between PCH variants.
*/
+#define __SIMPLE_DEVICE__
+
#include <acpi/acpi.h>
#include <device/mmio.h>
#include <device/pci_ops.h>
@@ -183,11 +185,8 @@ int rtc_failure(void)
u8 reg8;
int rtc_failed;
/* PMC Controller Device 0x1F, Func 02 */
-#if defined(__SIMPLE_DEVICE__)
- pci_devfn_t dev = PCH_DEV_PMC;
-#else
- struct device *dev = PCH_DEV_PMC;
-#endif
+ const pci_devfn_t dev = PCH_DEV_PMC;
+
reg8 = pci_read_config8(dev, GEN_PMCON_B);
rtc_failed = reg8 & RTC_BATTERY_DEAD;
if (rtc_failed) {