Minor cleanup.
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8682 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
** Copyright 2002/03, Thomas Kurschel. All rights reserved.
|
** Copyright 2002/03, Thomas Kurschel. All rights reserved.
|
||||||
** Distributed under the terms of the OpenBeOS License.
|
** Distributed under the terms of the Haiku License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -23,13 +23,11 @@ scsi_alloc_dpc(scsi_dpc_info **dpc)
|
|||||||
{
|
{
|
||||||
SHOW_FLOW0(3, "");
|
SHOW_FLOW0(3, "");
|
||||||
|
|
||||||
*dpc = (scsi_dpc_info *)malloc( sizeof( **dpc ));
|
*dpc = (scsi_dpc_info *)malloc(sizeof(scsi_dpc_info));
|
||||||
|
|
||||||
if (*dpc == NULL)
|
if (*dpc == NULL)
|
||||||
return B_NO_MEMORY;
|
return B_NO_MEMORY;
|
||||||
|
|
||||||
memset( *dpc, 0, sizeof( **dpc ));
|
memset(*dpc, 0, sizeof(scsi_dpc_info));
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,9 +37,7 @@ scsi_free_dpc(scsi_dpc_info *dpc)
|
|||||||
{
|
{
|
||||||
SHOW_FLOW0(3, "");
|
SHOW_FLOW0(3, "");
|
||||||
|
|
||||||
if( dpc != NULL )
|
|
||||||
free(dpc);
|
free(dpc);
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,7 +63,6 @@ scsi_schedule_dpc(scsi_bus_info *bus, scsi_dpc_info *dpc, /*int flags,*/
|
|||||||
|
|
||||||
// this is called in IRQ context, so scheduler is not allowed
|
// this is called in IRQ context, so scheduler is not allowed
|
||||||
release_sem_etc(bus->start_service, 1, B_DO_NOT_RESCHEDULE);
|
release_sem_etc(bus->start_service, 1, B_DO_NOT_RESCHEDULE);
|
||||||
|
|
||||||
return B_OK;
|
return B_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,11 +90,10 @@ scsi_check_exec_dpc(scsi_bus_info *bus)
|
|||||||
release_spinlock_irq(&bus->dpc_lock);
|
release_spinlock_irq(&bus->dpc_lock);
|
||||||
|
|
||||||
dpc_func(dpc_arg);
|
dpc_func(dpc_arg);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
release_spinlock_irq(&bus->dpc_lock);
|
release_spinlock_irq(&bus->dpc_lock);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user