diff options
Diffstat (limited to 'internal.c')
-rw-r--r-- | internal.c | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -127,6 +127,12 @@ int register_superio(struct superio s) int is_laptop = 0; int laptop_ok = 0; +static int internal_shutdown(void *data) +{ + release_io_perms(); + return 0; +} + int internal_init(void) { #if __FLASHROM_LITTLE_ENDIAN__ @@ -178,6 +184,8 @@ int internal_init(void) free(arg); get_io_perms(); + if (register_shutdown(internal_shutdown, NULL)) + return 1; /* Default to Parallel/LPC/FWH flash devices. If a known host controller * is found, the init routine sets the buses_supported bitfield. @@ -287,13 +295,6 @@ int internal_init(void) return 1; #endif } - -int internal_shutdown(void) -{ - release_io_perms(); - - return 0; -} #endif void internal_chip_writeb(uint8_t val, chipaddr addr) |