mirror of
https://review.coreboot.org/flashrom.git
synced 2025-07-01 22:21:16 +02:00
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>
This commit is contained in:
11
internal.c
11
internal.c
@ -95,6 +95,13 @@ void get_io_perms(void)
|
||||
}
|
||||
}
|
||||
|
||||
void release_io_perms(void)
|
||||
{
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
close(io_fd);
|
||||
#endif
|
||||
}
|
||||
|
||||
int internal_init(void)
|
||||
{
|
||||
int ret = 0;
|
||||
@ -128,9 +135,7 @@ int internal_init(void)
|
||||
|
||||
int internal_shutdown(void)
|
||||
{
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
close(io_fd);
|
||||
#endif
|
||||
release_io_perms();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user