mirror of
https://review.haiku-os.org/haiku
synced 2024-11-23 07:18:40 +01:00
poke: allow multiple open()
Not sure why it only ever allowed a single instance. Change-Id: I972a1d601d93725674a97fb341aa7ffb3625b105 Reviewed-on: https://review.haiku-os.org/c/haiku/+/1075 Reviewed-by: Jérôme Duval <jerome.duval@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
parent
9918c82954
commit
e5495bf648
@ -41,8 +41,6 @@ int32 api_version = B_CUR_DRIVER_API_VERSION;
|
||||
isa_module_info* isa;
|
||||
pci_module_info* pci;
|
||||
|
||||
static int32 open_count;
|
||||
|
||||
|
||||
status_t
|
||||
init_hardware(void)
|
||||
@ -54,8 +52,6 @@ init_hardware(void)
|
||||
status_t
|
||||
init_driver(void)
|
||||
{
|
||||
open_count = 0;
|
||||
|
||||
if (get_module(B_ISA_MODULE_NAME, (module_info**)&isa) < B_OK)
|
||||
return ENOSYS;
|
||||
|
||||
@ -101,11 +97,6 @@ poke_open(const char* name, uint32 flags, void** cookie)
|
||||
if (getuid() != 0 && geteuid() != 0)
|
||||
return EPERM;
|
||||
|
||||
if (atomic_add(&open_count, 1) != 0) {
|
||||
atomic_add(&open_count, -1);
|
||||
return B_BUSY;
|
||||
}
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
@ -120,7 +111,6 @@ poke_close(void* cookie)
|
||||
status_t
|
||||
poke_free(void* cookie)
|
||||
{
|
||||
atomic_add(&open_count, -1);
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user