• Alexey Kardashevskiy's avatar
    powerpc/pci: Remove OF node back pointer from pci_dn · f1e08232
    Alexey Kardashevskiy authored
    The check_req() helper uses pci_get_pdn() to get an OF node pointer.
    pci_get_pdn() returns a pci_dn pointer which either:
    1) from the OF node returned by pci_device_to_OF_node();
    2) from the parent child_list where entries don't have OF node pointers.
    Since check_req() does not care about 2), it can call
    pci_device_to_OF_node() directly, hence the change.
    
    The find_pe_dn() helper uses embedded pci_dn to get an OF node which is
    also stored in edev->pdev so let's take a shortcut and call
    pci_device_to_OF_node() directly.
    
    With these 2 changes, we can finally get rid of the OF node back pointer.
    Signed-off-by: default avatarAlexey Kardashevskiy <aik@ozlabs.ru>
    Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
    f1e08232
pci_dn.c 12.7 KB