mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 18:15:11 +00:00
[ACPI] Avoid unnecessary casts.
This commit is contained in:
parent
9bcd835074
commit
28be285da5
1 changed files with 12 additions and 12 deletions
|
@ -1440,7 +1440,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
{
|
||||
case ACPI_RESOURCE_TYPE_EXTENDED_IRQ:
|
||||
{
|
||||
ACPI_RESOURCE_EXTENDED_IRQ *irq_data = (ACPI_RESOURCE_EXTENDED_IRQ*) &resource->Data;
|
||||
ACPI_RESOURCE_EXTENDED_IRQ *irq_data = &resource->Data.ExtendedIrq;
|
||||
if (irq_data->ProducerConsumer == ACPI_PRODUCER)
|
||||
break;
|
||||
for (i = 0; i < irq_data->InterruptCount; i++)
|
||||
|
@ -1458,7 +1458,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_IRQ:
|
||||
{
|
||||
ACPI_RESOURCE_IRQ *irq_data = (ACPI_RESOURCE_IRQ*) &resource->Data;
|
||||
ACPI_RESOURCE_IRQ *irq_data = &resource->Data.Irq;
|
||||
for (i = 0; i < irq_data->InterruptCount; i++)
|
||||
{
|
||||
RequirementDescriptor->Option = (i == 0) ? IO_RESOURCE_PREFERRED : IO_RESOURCE_ALTERNATIVE;
|
||||
|
@ -1474,7 +1474,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_DMA:
|
||||
{
|
||||
ACPI_RESOURCE_DMA *dma_data = (ACPI_RESOURCE_DMA*) &resource->Data;
|
||||
ACPI_RESOURCE_DMA *dma_data = &resource->Data.Dma;
|
||||
for (i = 0; i < dma_data->ChannelCount; i++)
|
||||
{
|
||||
RequirementDescriptor->Type = CmResourceTypeDma;
|
||||
|
@ -1504,7 +1504,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_IO:
|
||||
{
|
||||
ACPI_RESOURCE_IO *io_data = (ACPI_RESOURCE_IO*) &resource->Data;
|
||||
ACPI_RESOURCE_IO *io_data = &resource->Data.Io;
|
||||
RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO;
|
||||
if (io_data->IoDecode == ACPI_DECODE_16)
|
||||
RequirementDescriptor->Flags |= CM_RESOURCE_PORT_16_BIT_DECODE;
|
||||
|
@ -1523,7 +1523,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_FIXED_IO:
|
||||
{
|
||||
ACPI_RESOURCE_FIXED_IO *io_data = (ACPI_RESOURCE_FIXED_IO*) &resource->Data;
|
||||
ACPI_RESOURCE_FIXED_IO *io_data = &resource->Data.FixedIo;
|
||||
RequirementDescriptor->Flags = CM_RESOURCE_PORT_IO;
|
||||
RequirementDescriptor->u.Port.Length = io_data->AddressLength;
|
||||
RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
|
||||
|
@ -1538,7 +1538,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_ADDRESS16:
|
||||
{
|
||||
ACPI_RESOURCE_ADDRESS16 *addr16_data = (ACPI_RESOURCE_ADDRESS16*) &resource->Data;
|
||||
ACPI_RESOURCE_ADDRESS16 *addr16_data = &resource->Data.Address16;
|
||||
if (addr16_data->ProducerConsumer == ACPI_PRODUCER)
|
||||
break;
|
||||
RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
|
||||
|
@ -1586,7 +1586,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_ADDRESS32:
|
||||
{
|
||||
ACPI_RESOURCE_ADDRESS32 *addr32_data = (ACPI_RESOURCE_ADDRESS32*) &resource->Data;
|
||||
ACPI_RESOURCE_ADDRESS32 *addr32_data = &resource->Data.Address32;
|
||||
if (addr32_data->ProducerConsumer == ACPI_PRODUCER)
|
||||
break;
|
||||
RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
|
||||
|
@ -1634,7 +1634,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_ADDRESS64:
|
||||
{
|
||||
ACPI_RESOURCE_ADDRESS64 *addr64_data = (ACPI_RESOURCE_ADDRESS64*) &resource->Data;
|
||||
ACPI_RESOURCE_ADDRESS64 *addr64_data = &resource->Data.Address64;
|
||||
if (addr64_data->ProducerConsumer == ACPI_PRODUCER)
|
||||
break;
|
||||
RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
|
||||
|
@ -1683,7 +1683,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS64:
|
||||
{
|
||||
ACPI_RESOURCE_EXTENDED_ADDRESS64 *addr64_data = (ACPI_RESOURCE_EXTENDED_ADDRESS64*) &resource->Data;
|
||||
ACPI_RESOURCE_EXTENDED_ADDRESS64 *addr64_data = &resource->Data.ExtAddress64;
|
||||
if (addr64_data->ProducerConsumer == ACPI_PRODUCER)
|
||||
break;
|
||||
RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
|
||||
|
@ -1732,7 +1732,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_MEMORY24:
|
||||
{
|
||||
ACPI_RESOURCE_MEMORY24 *mem24_data = (ACPI_RESOURCE_MEMORY24*) &resource->Data;
|
||||
ACPI_RESOURCE_MEMORY24 *mem24_data = &resource->Data.Memory24;
|
||||
RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
|
||||
RequirementDescriptor->Type = CmResourceTypeMemory;
|
||||
RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
|
||||
|
@ -1750,7 +1750,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_MEMORY32:
|
||||
{
|
||||
ACPI_RESOURCE_MEMORY32 *mem32_data = (ACPI_RESOURCE_MEMORY32*) &resource->Data;
|
||||
ACPI_RESOURCE_MEMORY32 *mem32_data = &resource->Data.Memory32;
|
||||
RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
|
||||
RequirementDescriptor->Type = CmResourceTypeMemory;
|
||||
RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
|
||||
|
@ -1768,7 +1768,7 @@ Bus_PDO_QueryResourceRequirements(
|
|||
}
|
||||
case ACPI_RESOURCE_TYPE_FIXED_MEMORY32:
|
||||
{
|
||||
ACPI_RESOURCE_FIXED_MEMORY32 *fixedmem32_data = (ACPI_RESOURCE_FIXED_MEMORY32*) &resource->Data;
|
||||
ACPI_RESOURCE_FIXED_MEMORY32 *fixedmem32_data = &resource->Data.FixedMemory32;
|
||||
RequirementDescriptor->Option = CurrentRes ? 0 : IO_RESOURCE_PREFERRED;
|
||||
RequirementDescriptor->Type = CmResourceTypeMemory;
|
||||
RequirementDescriptor->ShareDisposition = CmResourceShareDeviceExclusive;
|
||||
|
|
Loading…
Reference in a new issue