mirror of
https://github.com/genesi/linux-legacy.git
synced 2026-05-18 10:28:58 +00:00
whitespace cleanups?
This commit is contained in:
@@ -31,18 +31,18 @@
|
||||
// functions
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static const gsl_intrblock_reg_t *
|
||||
static const gsl_intrblock_reg_t *
|
||||
kgsl_intr_id2block(gsl_intrid_t id)
|
||||
{
|
||||
const gsl_intrblock_reg_t *block;
|
||||
int i;
|
||||
|
||||
// interrupt id to hw block
|
||||
for (i = 0; i < GSL_INTR_BLOCK_COUNT; i++)
|
||||
for (i = 0; i < GSL_INTR_BLOCK_COUNT; i++)
|
||||
{
|
||||
block = &gsl_cfg_intrblock_reg[i];
|
||||
|
||||
if (block->first_id <= id && id <= block->last_id)
|
||||
if (block->first_id <= id && id <= block->last_id)
|
||||
{
|
||||
return (block);
|
||||
}
|
||||
@@ -75,7 +75,7 @@ kgsl_intr_decode(gsl_device_t *device, gsl_intrblock_t block_id)
|
||||
device->ftbl.device_regwrite(device, block->clear_reg, status);
|
||||
|
||||
// loop through the block's masks, determine which interrupt bits are active, and call callback (or TODO queue DPC)
|
||||
for (id = block->first_id; id <= block->last_id; id++)
|
||||
for (id = block->first_id; id <= block->last_id; id++)
|
||||
{
|
||||
if (status & gsl_cfg_intr_mask[id])
|
||||
{
|
||||
@@ -128,14 +128,14 @@ int kgsl_intr_close(gsl_device_t *device)
|
||||
if (device->intr.flags & GSL_FLAGS_INITIALIZED)
|
||||
{
|
||||
// check if there are any enabled interrupts lingering around
|
||||
for (i = 0; i < GSL_INTR_BLOCK_COUNT; i++)
|
||||
for (i = 0; i < GSL_INTR_BLOCK_COUNT; i++)
|
||||
{
|
||||
if (device->intr.enabled[i])
|
||||
if (device->intr.enabled[i])
|
||||
{
|
||||
block = &gsl_cfg_intrblock_reg[i];
|
||||
|
||||
// loop through the block's masks, disable interrupts which active
|
||||
for (id = block->first_id; id <= block->last_id; id++)
|
||||
for (id = block->first_id; id <= block->last_id; id++)
|
||||
{
|
||||
if (device->intr.enabled[i] & gsl_cfg_intr_mask[id])
|
||||
{
|
||||
@@ -159,18 +159,18 @@ int kgsl_intr_enable(gsl_intr_t *intr, gsl_intrid_t id)
|
||||
unsigned int mask;
|
||||
unsigned int enabled;
|
||||
|
||||
if (GSL_INTRID_VALIDATE(id))
|
||||
if (GSL_INTRID_VALIDATE(id))
|
||||
{
|
||||
return (GSL_FAILURE_BADPARAM);
|
||||
}
|
||||
|
||||
if (intr->handler[id].callback == NULL)
|
||||
if (intr->handler[id].callback == NULL)
|
||||
{
|
||||
return (GSL_FAILURE_NOTINITIALIZED);
|
||||
}
|
||||
|
||||
block = kgsl_intr_id2block(id);
|
||||
if (block == NULL)
|
||||
if (block == NULL)
|
||||
{
|
||||
return (GSL_FAILURE_SYSTEMERROR);
|
||||
}
|
||||
@@ -234,18 +234,18 @@ int kgsl_intr_disable(gsl_intr_t *intr, gsl_intrid_t id)
|
||||
int
|
||||
kgsl_intr_attach(gsl_intr_t *intr, gsl_intrid_t id, gsl_intr_callback_t callback, void *cookie)
|
||||
{
|
||||
if (GSL_INTRID_VALIDATE(id) || callback == NULL)
|
||||
if (GSL_INTRID_VALIDATE(id) || callback == NULL)
|
||||
{
|
||||
return (GSL_FAILURE_BADPARAM);
|
||||
}
|
||||
|
||||
if (intr->handler[id].callback != NULL)
|
||||
if (intr->handler[id].callback != NULL)
|
||||
{
|
||||
if (intr->handler[id].callback == callback && intr->handler[id].cookie == cookie)
|
||||
if (intr->handler[id].callback == callback && intr->handler[id].cookie == cookie)
|
||||
{
|
||||
return (GSL_FAILURE_ALREADYINITIALIZED);
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
return (GSL_FAILURE_NOMOREAVAILABLE);
|
||||
}
|
||||
@@ -262,12 +262,12 @@ kgsl_intr_attach(gsl_intr_t *intr, gsl_intrid_t id, gsl_intr_callback_t callback
|
||||
int
|
||||
kgsl_intr_detach(gsl_intr_t *intr, gsl_intrid_t id)
|
||||
{
|
||||
if (GSL_INTRID_VALIDATE(id))
|
||||
if (GSL_INTRID_VALIDATE(id))
|
||||
{
|
||||
return (GSL_FAILURE_BADPARAM);
|
||||
}
|
||||
|
||||
if (intr->handler[id].callback == NULL)
|
||||
if (intr->handler[id].callback == NULL)
|
||||
{
|
||||
return (GSL_FAILURE_NOTINITIALIZED);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user