mirror of
https://github.com/acpica/acpica/
synced 2025-02-12 03:24:13 +03:00
only deref Value once
date 2002.04.18.20.25.00; author agrover; state Exp;
This commit is contained in:
parent
76a0e9e570
commit
a46381020f
@ -3,7 +3,7 @@
|
|||||||
*
|
*
|
||||||
* Module Name: hwregs - Read/write access functions for the various ACPI
|
* Module Name: hwregs - Read/write access functions for the various ACPI
|
||||||
* control and status registers.
|
* control and status registers.
|
||||||
* $Revision: 1.124 $
|
* $Revision: 1.125 $
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
@ -828,13 +828,11 @@ AcpiHwLowLevelRead (
|
|||||||
* Must have a valid pointer to a GAS structure, and
|
* Must have a valid pointer to a GAS structure, and
|
||||||
* a non-zero address within
|
* a non-zero address within
|
||||||
*/
|
*/
|
||||||
#if 0
|
|
||||||
if ((!Reg) ||
|
if ((!Reg) ||
|
||||||
(!ACPI_VALID_ADDRESS (Reg->Address)))
|
(!ACPI_VALID_ADDRESS (Reg->Address)))
|
||||||
{
|
{
|
||||||
return (AE_BAD_PARAMETER);
|
return (AE_OK);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
*Value = 0;
|
*Value = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -848,7 +846,7 @@ AcpiHwLowLevelRead (
|
|||||||
MemAddress = (ACPI_GET_ADDRESS (Reg->Address)
|
MemAddress = (ACPI_GET_ADDRESS (Reg->Address)
|
||||||
+ (ACPI_PHYSICAL_ADDRESS) Offset);
|
+ (ACPI_PHYSICAL_ADDRESS) Offset);
|
||||||
|
|
||||||
Status = AcpiOsReadMemory (MemAddress, &Value, Width);
|
Status = AcpiOsReadMemory (MemAddress, Value, Width);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
@ -857,7 +855,7 @@ AcpiHwLowLevelRead (
|
|||||||
IoAddress = (ACPI_IO_ADDRESS) (ACPI_GET_ADDRESS (Reg->Address)
|
IoAddress = (ACPI_IO_ADDRESS) (ACPI_GET_ADDRESS (Reg->Address)
|
||||||
+ (ACPI_PHYSICAL_ADDRESS) Offset);
|
+ (ACPI_PHYSICAL_ADDRESS) Offset);
|
||||||
|
|
||||||
Status = AcpiOsReadPort (IoAddress, &Value, Width);
|
Status = AcpiOsReadPort (IoAddress, Value, Width);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
@ -870,7 +868,7 @@ AcpiHwLowLevelRead (
|
|||||||
PciRegister = (UINT16) (ACPI_PCI_REGISTER (ACPI_GET_ADDRESS (Reg->Address))
|
PciRegister = (UINT16) (ACPI_PCI_REGISTER (ACPI_GET_ADDRESS (Reg->Address))
|
||||||
+ Offset);
|
+ Offset);
|
||||||
|
|
||||||
Status = AcpiOsReadPciConfiguration (&PciId, PciRegister, &Value, Width);
|
Status = AcpiOsReadPciConfiguration (&PciId, PciRegister, Value, Width);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
@ -921,13 +919,11 @@ AcpiHwLowLevelWrite (
|
|||||||
* Must have a valid pointer to a GAS structure, and
|
* Must have a valid pointer to a GAS structure, and
|
||||||
* a non-zero address within
|
* a non-zero address within
|
||||||
*/
|
*/
|
||||||
#if 0
|
|
||||||
if ((!Reg) ||
|
if ((!Reg) ||
|
||||||
(!ACPI_VALID_ADDRESS (Reg->Address)))
|
(!ACPI_VALID_ADDRESS (Reg->Address)))
|
||||||
{
|
{
|
||||||
return (AE_BAD_PARAMETER);
|
return (AE_OK);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
/*
|
/*
|
||||||
* Three address spaces supported:
|
* Three address spaces supported:
|
||||||
* Memory, Io, or PCI config.
|
* Memory, Io, or PCI config.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user