remove executable bit on test.c
clean up poke.c don't need to check the module in uninit_driver() git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22247 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -159,7 +159,6 @@ init_driver()
|
|||||||
void
|
void
|
||||||
uninit_driver()
|
uninit_driver()
|
||||||
{
|
{
|
||||||
if (gConfigManager != NULL)
|
put_module(B_CONFIG_MANAGER_FOR_DRIVER_MODULE_NAME);
|
||||||
put_module(B_CONFIG_MANAGER_FOR_DRIVER_MODULE_NAME);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -31,8 +31,8 @@ static const char* poke_name[] = {
|
|||||||
|
|
||||||
device_hooks poke_hooks = {
|
device_hooks poke_hooks = {
|
||||||
poke_open,
|
poke_open,
|
||||||
poke_close,
|
poke_close,
|
||||||
poke_free,
|
poke_free,
|
||||||
poke_control,
|
poke_control,
|
||||||
poke_read,
|
poke_read,
|
||||||
poke_write,
|
poke_write,
|
||||||
@@ -51,14 +51,14 @@ static uint32 open_count;
|
|||||||
status_t
|
status_t
|
||||||
init_hardware(void)
|
init_hardware(void)
|
||||||
{
|
{
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
init_driver(void)
|
init_driver(void)
|
||||||
{
|
{
|
||||||
open_count = 0;
|
open_count = 0;
|
||||||
|
|
||||||
if (get_module(B_ISA_MODULE_NAME, (module_info**)&isa) < B_OK)
|
if (get_module(B_ISA_MODULE_NAME, (module_info**)&isa) < B_OK)
|
||||||
return ENOSYS;
|
return ENOSYS;
|
||||||
@@ -68,7 +68,7 @@ init_driver(void)
|
|||||||
return ENOSYS;
|
return ENOSYS;
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ uninit_driver(void)
|
|||||||
const char**
|
const char**
|
||||||
publish_devices(void)
|
publish_devices(void)
|
||||||
{
|
{
|
||||||
return poke_name;
|
return poke_name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -101,29 +101,29 @@ find_device(const char* name)
|
|||||||
status_t
|
status_t
|
||||||
poke_open(const char* name, uint32 flags, void** cookie)
|
poke_open(const char* name, uint32 flags, void** cookie)
|
||||||
{
|
{
|
||||||
*cookie = NULL;
|
*cookie = NULL;
|
||||||
|
|
||||||
if (atomic_add(&open_count, 1) != 0) {
|
if (atomic_add(&open_count, 1) != 0) {
|
||||||
atomic_add(&open_count, -1);
|
atomic_add(&open_count, -1);
|
||||||
return B_BUSY;
|
return B_BUSY;
|
||||||
}
|
}
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
poke_close(void* cookie)
|
poke_close(void* cookie)
|
||||||
{
|
{
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
status_t
|
status_t
|
||||||
poke_free(void* cookie)
|
poke_free(void* cookie)
|
||||||
{
|
{
|
||||||
atomic_add(&open_count, -1);
|
atomic_add(&open_count, -1);
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Executable → Regular
Reference in New Issue
Block a user