summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/85xx
diff options
context:
space:
mode:
authorPali Rohár <pali@kernel.org>2023-04-09 02:08:06 +0200
committerMichael Ellerman <mpe@ellerman.id.au>2023-04-20 02:20:49 +0200
commit485536b9f289c8c3c86ecaad0f05a1a7b633cb8a (patch)
tree8c289bdd24ec2f535147e4ee585f9a7c4f090b5e /arch/powerpc/platforms/85xx
parentpowerpc/fsl_uli1575: Misc cleanup (diff)
downloadlinux-485536b9f289c8c3c86ecaad0f05a1a7b633cb8a.tar.xz
linux-485536b9f289c8c3c86ecaad0f05a1a7b633cb8a.zip
powerpc/85xx: mpc85xx_ds: Simplify mpc85xx_exclude_device() function
Function mpc85xx_exclude_device() is installed and used only when pci_with_uli is fsl_pci_primary. So replace check for pci_with_uli by fsl_pci_primary in mpc85xx_exclude_device() and move pci_with_uli variable declaration into function mpc85xx_ds_uli_init() where it is used. Signed-off-by: Pali Rohár <pali@kernel.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://msgid.link/20230409000812.18904-3-pali@kernel.org
Diffstat (limited to 'arch/powerpc/platforms/85xx')
-rw-r--r--arch/powerpc/platforms/85xx/mpc85xx_ds.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/powerpc/platforms/85xx/mpc85xx_ds.c b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
index ed7b71d55b10..0c905a838942 100644
--- a/arch/powerpc/platforms/85xx/mpc85xx_ds.c
+++ b/arch/powerpc/platforms/85xx/mpc85xx_ds.c
@@ -108,12 +108,10 @@ void __init mpc85xx_ds_pic_init(void)
}
#ifdef CONFIG_PCI
-static struct device_node *pci_with_uli;
-
static int mpc85xx_exclude_device(struct pci_controller *hose,
u_char bus, u_char devfn)
{
- if (hose->dn == pci_with_uli)
+ if (hose->dn == fsl_pci_primary)
return uli_exclude_device(hose, bus, devfn);
return PCIBIOS_SUCCESSFUL;
@@ -124,6 +122,7 @@ static void __init mpc85xx_ds_uli_init(void)
{
#ifdef CONFIG_PCI
struct device_node *node;
+ struct device_node *pci_with_uli;
/* See if we have a ULI under the primary */