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:
Jérôme Duval 2007-09-18 19:40:32 +00:00
parent b76d376bab
commit ce1e9a2d44
3 changed files with 16 additions and 17 deletions

View File

@ -159,7 +159,6 @@ init_driver()
void
uninit_driver()
{
if (gConfigManager != NULL)
put_module(B_CONFIG_MANAGER_FOR_DRIVER_MODULE_NAME);
put_module(B_CONFIG_MANAGER_FOR_DRIVER_MODULE_NAME);
}

View File

@ -31,8 +31,8 @@ static const char* poke_name[] = {
device_hooks poke_hooks = {
poke_open,
poke_close,
poke_free,
poke_close,
poke_free,
poke_control,
poke_read,
poke_write,
@ -51,14 +51,14 @@ static uint32 open_count;
status_t
init_hardware(void)
{
return B_OK;
return B_OK;
}
status_t
init_driver(void)
{
open_count = 0;
open_count = 0;
if (get_module(B_ISA_MODULE_NAME, (module_info**)&isa) < B_OK)
return ENOSYS;
@ -68,7 +68,7 @@ init_driver(void)
return ENOSYS;
}
return B_OK;
return B_OK;
}
@ -83,7 +83,7 @@ uninit_driver(void)
const char**
publish_devices(void)
{
return poke_name;
return poke_name;
}
@ -101,29 +101,29 @@ find_device(const char* name)
status_t
poke_open(const char* name, uint32 flags, void** cookie)
{
*cookie = NULL;
*cookie = NULL;
if (atomic_add(&open_count, 1) != 0) {
atomic_add(&open_count, -1);
return B_BUSY;
}
if (atomic_add(&open_count, 1) != 0) {
atomic_add(&open_count, -1);
return B_BUSY;
}
return B_OK;
return B_OK;
}
status_t
poke_close(void* cookie)
{
return B_OK;
return B_OK;
}
status_t
poke_free(void* cookie)
{
atomic_add(&open_count, -1);
return B_OK;
atomic_add(&open_count, -1);
return B_OK;
}

0
src/add-ons/kernel/drivers/misc/test.c Executable file → Normal file
View File