powerpc/pci: Remove OF node back pointer from pci_dn
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Tue, 29 Aug 2017 07:34:04 +0000 (17:34 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Thu, 31 Aug 2017 04:26:12 +0000 (14:26 +1000)
commitf1e08232ede8d1888d51e94940645f93a8462d75
tree7ede0e7b81d7f50be5ffeb09132b36cd61617265
parent14db3d52d3a214ae8132a403de410af7643cb8b0
powerpc/pci: Remove OF node back pointer from pci_dn

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: Alexey Kardashevskiy <aik@ozlabs.ru>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/pci-bridge.h
arch/powerpc/kernel/pci_dn.c
arch/powerpc/platforms/pseries/msi.c