Change code in InterfaceBusTranslateBusAddress to use less pointer dereferences and...
authorHervé Poussineau <hpoussin@reactos.org>
Mon, 5 Dec 2005 14:20:29 +0000 (14:20 +0000)
committerHervé Poussineau <hpoussin@reactos.org>
Mon, 5 Dec 2005 14:20:29 +0000 (14:20 +0000)
svn path=/trunk/; revision=19907

reactos/drivers/bus/pci/pdo.c

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