From e5495bf64897f89411d31888b97fc63179d58b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Sun, 13 Mar 2016 22:03:27 +0100 Subject: [PATCH] poke: allow multiple open() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Tested-by: Commit checker robot --- src/add-ons/kernel/drivers/misc/poke.cpp | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/add-ons/kernel/drivers/misc/poke.cpp b/src/add-ons/kernel/drivers/misc/poke.cpp index 516efbce00..9983e2b52d 100644 --- a/src/add-ons/kernel/drivers/misc/poke.cpp +++ b/src/add-ons/kernel/drivers/misc/poke.cpp @@ -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; }