Removed circular dependency - the module is now opened in B_MODULE_INIT.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@7832 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2004-06-08 06:05:05 +00:00
parent bd383ca361
commit 94c145777c
2 changed files with 16 additions and 14 deletions
+10 -2
View File
@@ -502,12 +502,20 @@ static uchar scsi_reset_device( scsi_device_info *device )
} }
static status_t std_ops( int32 op, ... ) static status_t
std_ops(int32 op, ...)
{ {
switch (op) { switch (op) {
case B_MODULE_INIT: case B_MODULE_INIT:
{
// Link to SCSI bus.
// SCSI device driver must have SCSI bus loaded, but it calls its functions
// directly instead via official interface, so this pointer is never read.
module_info *dummy;
return get_module(SCSI_BUS_MODULE_NAME, &dummy);
}
case B_MODULE_UNINIT: case B_MODULE_UNINIT:
return B_OK; return put_module(SCSI_BUS_MODULE_NAME);
default: default:
return B_ERROR; return B_ERROR;
@@ -16,16 +16,10 @@ locked_pool_interface *locked_pool;
device_manager_info *pnp; device_manager_info *pnp;
fast_log_info *fast_log; fast_log_info *fast_log;
// Link to SCSI bus.
// SCSI device driver must have SCSI bus loaded, but it calls its functions
// directly instead via official interface, so this pointer is never read.
static module_info *scsi_bus_dummy;
module_dependency module_dependencies[] = { module_dependency module_dependencies[] = {
{ DEVICE_MANAGER_MODULE_NAME, (module_info **)&pnp }, { DEVICE_MANAGER_MODULE_NAME, (module_info **)&pnp },
{ LOCKED_POOL_MODULE_NAME, (module_info **)&locked_pool }, { LOCKED_POOL_MODULE_NAME, (module_info **)&locked_pool },
{ FAST_LOG_MODULE_NAME, (module_info **)&fast_log }, { FAST_LOG_MODULE_NAME, (module_info **)&fast_log },
{ SCSI_BUS_MODULE_NAME, &scsi_bus_dummy },
{} {}
}; };