Skip to content

Commit

Permalink
powerpc/85xx: mpc85xx_ds: Simplify mpc85xx_exclude_device() function
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Pali Rohár authored and Michael Ellerman committed Apr 20, 2023
1 parent 821b3a4 commit 485536b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/powerpc/platforms/85xx/mpc85xx_ds.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 */

Expand Down

0 comments on commit 485536b

Please sign in to comment.