aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-sysmo/eeprom.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-01 10:51:26 +0200
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2013-07-04 17:38:15 +0200
commit89582f7e77068bc38fa9ee391f5c898913f241a7 (patch)
tree5ff4505d67bc65ec603532805fa6ab7e4db1685a /src/osmo-bts-sysmo/eeprom.c
parent270cf418fc64ad77b179f75394c5dc34c95f4388 (diff)
sysmobts: Add a method to free cached epprom resources
Close the cached file descriptor once the calibration data is loaded and applied.
Diffstat (limited to 'src/osmo-bts-sysmo/eeprom.c')
-rw-r--r--src/osmo-bts-sysmo/eeprom.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/osmo-bts-sysmo/eeprom.c b/src/osmo-bts-sysmo/eeprom.c
index 272d41a..e3b94fc 100644
--- a/src/osmo-bts-sysmo/eeprom.c
+++ b/src/osmo-bts-sysmo/eeprom.c
@@ -1323,6 +1323,13 @@ int eeprom_dump( int addr, int size, int hex )
static FILE *g_file;
+void eeprom_free_resources(void)
+{
+ if (g_file)
+ fclose(g_file);
+ g_file = NULL;
+}
+
/**
* Read up to 'size' bytes of data from the EEPROM starting at offset 'addr'.
*/