summaryrefslogtreecommitdiffstats
path: root/internal.c
diff options
context:
space:
mode:
authorEdward O'Callaghan <quasisec@google.com>2020-10-26 19:07:25 +1100
committerEdward O'Callaghan <quasisec@chromium.org>2020-10-27 11:32:38 +0000
commitc15de25a7ca6504a4191f8da44448a0723923e58 (patch)
treeb25d8393f06791dc414fb0d9b7a5f98707838928 /internal.c
parentd7b48758a5b2c9ab911b77370726071b30ac8c2c (diff)
downloadflashrom-c15de25a7ca6504a4191f8da44448a0723923e58.tar.gz
flashrom-c15de25a7ca6504a4191f8da44448a0723923e58.tar.bz2
flashrom-c15de25a7ca6504a4191f8da44448a0723923e58.zip
internal.c: Co-locate global variables to top of file
This just makes internal.c at bit easier to parse and helps the read get a view of all the singleton state in one go. BUG=none BRANCH=none TEST=builds Change-Id: Id4109dfb17f63d80fb3fb3f2a1d0ab54d9eddc6e Signed-off-by: Edward O'Callaghan <quasisec@google.com> Reviewed-on: https://review.coreboot.org/c/flashrom/+/46814 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'internal.c')
-rw-r--r--internal.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/internal.c b/internal.c
index abd90a8f5..5d74f92c2 100644
--- a/internal.c
+++ b/internal.c
@@ -21,6 +21,14 @@
#include "programmer.h"
#include "hwaccess.h"
+int is_laptop = 0;
+int laptop_ok = 0;
+
+int force_boardenable = 0;
+int force_boardmismatch = 0;
+
+enum chipbustype internal_buses_supported = BUS_NONE;
+
struct pci_dev *pci_dev_find_vendorclass(uint16_t vendor, uint16_t devclass)
{
struct pci_dev *temp;
@@ -79,9 +87,6 @@ struct pci_dev *pci_card_find(uint16_t vendor, uint16_t device,
return NULL;
}
-int force_boardenable = 0;
-int force_boardmismatch = 0;
-
#if IS_X86
void probe_superio(void)
{
@@ -110,9 +115,6 @@ int register_superio(struct superio s)
#endif
-int is_laptop = 0;
-int laptop_ok = 0;
-
static void internal_chip_writeb(const struct flashctx *flash, uint8_t val,
chipaddr addr)
{
@@ -167,8 +169,6 @@ static const struct par_master par_master_internal = {
.chip_writen = fallback_chip_writen,
};
-enum chipbustype internal_buses_supported = BUS_NONE;
-
int internal_init(void)
{
int ret = 0;