Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 575e3348 authored by Michael Ellerman's avatar Michael Ellerman Committed by Greg Kroah-Hartman
Browse files

PCI: Use a weak symbol for the empty version of pcibios_add_platform_entries()



I'm not sure if this is going to fly, weak symbols work on the compilers I'm
using, but whether they work for all of the affected architectures I can't say.
I've cc'ed as many arch maintainers/lists as I could find.

But assuming they do, we can use a weak empty definition of
pcibios_add_platform_entries() to avoid having an empty definition on every
arch.

Signed-off-by: default avatarMichael Ellerman <michael@ellerman.id.au>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent d556ad4b
Loading
Loading
Loading
Loading
+0 −6
Original line number Diff line number Diff line
@@ -633,12 +633,6 @@ void pcibios_make_OF_bus_map(void)
{
}

/* Add sysfs properties */
void pcibios_add_platform_entries(struct pci_dev *pdev)
{
}


static int __init
pcibios_init(void)
{
+5 −0
Original line number Diff line number Diff line
@@ -600,6 +600,11 @@ static struct bin_attribute pcie_config_attr = {
	.write = pci_write_config,
};

void __attribute__ ((weak)) pcibios_add_platform_entries(struct pci_dev *dev)
{
	return;
}

int __must_check pci_create_sysfs_dev_files (struct pci_dev *pdev)
{
	struct bin_attribute *rom_attr = NULL;
+0 −5
Original line number Diff line number Diff line
@@ -275,11 +275,6 @@ static inline int pci_proc_domain(struct pci_bus *bus)
	return hose->need_domain_info;
}

static inline void
pcibios_add_platform_entries(struct pci_dev *dev)
{
}

struct pci_dev *alpha_gendev_to_pci(struct device *dev);

#endif /* __KERNEL__ */
+0 −4
Original line number Diff line number Diff line
@@ -76,10 +76,6 @@ pcibios_select_root(struct pci_dev *pdev, struct resource *res)
	return root;
}

static inline void pcibios_add_platform_entries(struct pci_dev *dev)
{
}

#endif /* __KERNEL__ */
 
#endif
+0 −4
Original line number Diff line number Diff line
@@ -89,10 +89,6 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
			       enum pci_mmap_state mmap_state, int write_combine);


static inline void pcibios_add_platform_entries(struct pci_dev *dev)
{
}

#endif /* __KERNEL__ */

/* implement the pci_ DMA API in terms of the generic device dma_ one */
Loading