Change code in InterfaceBusTranslateBusAddress to use less pointer dereferences and less stack variables

svn path=/trunk/; revision=19907
This commit is contained in:
Hervé Poussineau 2005-12-05 14:20:29 +00:00
parent 593d6d0f28
commit 0f841983cd

View file

@ -858,16 +858,14 @@ InterfaceBusTranslateBusAddress(
OUT PPHYSICAL_ADDRESS TranslatedAddress) OUT PPHYSICAL_ADDRESS TranslatedAddress)
{ {
PPDO_DEVICE_EXTENSION DeviceExtension; PPDO_DEVICE_EXTENSION DeviceExtension;
PFDO_DEVICE_EXTENSION FdoDeviceExtension;
DPRINT("InterfaceBusTranslateBusAddress(%p %p 0x%lx %p %p)\n", DPRINT("InterfaceBusTranslateBusAddress(%p %p 0x%lx %p %p)\n",
Context, BusAddress, Length, AddressSpace, TranslatedAddress); Context, BusAddress, Length, AddressSpace, TranslatedAddress);
DeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)Context)->DeviceExtension; DeviceExtension = (PPDO_DEVICE_EXTENSION)((PDEVICE_OBJECT)Context)->DeviceExtension;
FdoDeviceExtension = (PFDO_DEVICE_EXTENSION)DeviceExtension->Fdo->DeviceExtension;
return HalTranslateBusAddress( return HalTranslateBusAddress(
PCIBus, FdoDeviceExtension->BusNumber, PCIBus, DeviceExtension->PciDevice->BusNumber,
BusAddress, AddressSpace, TranslatedAddress); BusAddress, AddressSpace, TranslatedAddress);
} }