Releasing IO permissions was done by hand everywhere
Use a proper abstraction. Kill unneeded #include statements.
Corresponding to flashrom svn r672.
Signed-off-by: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2006@gmx.net>
Acked-by: Stefan Reinauer <stepan@coresystems.de>
diff --git a/satasii.c b/satasii.c
index 03baa3e..b576749 100644
--- a/satasii.c
+++ b/satasii.c
@@ -22,10 +22,6 @@
#include <stdlib.h>
#include <string.h>
-#include <fcntl.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <errno.h>
#include "flash.h"
#define PCI_VENDOR_ID_SII 0x1095
@@ -77,9 +73,7 @@
{
free(pcidev_bdf);
pci_cleanup(pacc);
-#if defined(__FreeBSD__) || defined(__DragonFly__)
- close(io_fd);
-#endif
+ release_io_perms();
return 0;
}