Skip to content

Commit

Permalink
ACPICA: Fix acpi_os_read_pci_configuration prototype
Browse files Browse the repository at this point in the history
Prototype in acpiosxf.h had the output value pointer as a (u32 *).
Should be a (u64 *).

Signed-off-by: Bob Moore <[email protected]>
Signed-off-by: Lin Ming <[email protected]>
Signed-off-by: Len Brown <[email protected]>
  • Loading branch information
acpibob authored and lenb committed Oct 1, 2010
1 parent 899611e commit c5f0231
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 1 addition & 3 deletions drivers/acpi/acpica/exregion.c
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ acpi_ex_pci_config_space_handler(u32 function,
acpi_status status = AE_OK;
struct acpi_pci_id *pci_id;
u16 pci_register;
u32 value32;

ACPI_FUNCTION_TRACE(ex_pci_config_space_handler);

Expand Down Expand Up @@ -381,8 +380,7 @@ acpi_ex_pci_config_space_handler(u32 function,
case ACPI_READ:

status = acpi_os_read_pci_configuration(pci_id, pci_register,
&value32, bit_width);
*value = value32;
value, bit_width);
break;

case ACPI_WRITE:
Expand Down
8 changes: 5 additions & 3 deletions drivers/acpi/osl.c
Original file line number Diff line number Diff line change
Expand Up @@ -547,9 +547,10 @@ acpi_os_write_memory(acpi_physical_address phys_addr, u32 value, u32 width)

acpi_status
acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,
u32 *value, u32 width)
u64 *value, u32 width)
{
int result, size;
u32 value32;

if (!value)
return AE_BAD_PARAMETER;
Expand All @@ -570,7 +571,8 @@ acpi_os_read_pci_configuration(struct acpi_pci_id * pci_id, u32 reg,

result = raw_pci_read(pci_id->segment, pci_id->bus,
PCI_DEVFN(pci_id->device, pci_id->function),
reg, size, value);
reg, size, &value32);
*value = value32;

return (result ? AE_ERROR : AE_OK);
}
Expand Down Expand Up @@ -626,7 +628,7 @@ static void acpi_os_derive_pci_id_2(acpi_handle rhandle, /* upper bound */
status = acpi_evaluate_integer(handle, METHOD_NAME__ADR, NULL,
&temp);
if (ACPI_SUCCESS(status)) {
u32 val;
u64 val;
pci_id->device = ACPI_HIWORD(ACPI_LODWORD(temp));
pci_id->function = ACPI_LOWORD(ACPI_LODWORD(temp));

Expand Down
2 changes: 1 addition & 1 deletion include/acpi/acpiosxf.h
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ acpi_os_write_memory(acpi_physical_address address, u32 value, u32 width);
*/
acpi_status
acpi_os_read_pci_configuration(struct acpi_pci_id *pci_id,
u32 reg, u32 *value, u32 width);
u32 reg, u64 *value, u32 width);

acpi_status
acpi_os_write_pci_configuration(struct acpi_pci_id *pci_id,
Expand Down

0 comments on commit c5f0231

Please sign in to comment.