aboutsummaryrefslogtreecommitdiff
path: root/drivers/pci/probe.c
diff options
context:
space:
mode:
authorGravatar Bjorn Helgaas <bhelgaas@google.com> 2024-03-12 12:14:23 -0500
committerGravatar Bjorn Helgaas <bhelgaas@google.com> 2024-03-12 12:14:23 -0500
commitb8de187056f10f31739cad3d7b66677415f79883 (patch)
treed1af8073803863d345d3b3d79e1cfca884e6a5be /drivers/pci/probe.c
parentMerge branch 'pci/switchtec' (diff)
parentPCI/sysfs: Demacrofy pci_dev_resource_resize_attr(n) functions (diff)
downloadlinux-b8de187056f10f31739cad3d7b66677415f79883.tar.gz
linux-b8de187056f10f31739cad3d7b66677415f79883.tar.bz2
linux-b8de187056f10f31739cad3d7b66677415f79883.zip
Merge branch 'pci/sysfs'
- Compile pci-sysfs.c only if CONFIG_SYSFS=y, which reduces kernel size by ~120KB when it's disabled (Lukas Wunner) - Remove obsolete pci_cleanup_rom() declaration (Lukas Wunner) - Rework pci_dev_resource_resize_attr(n) macros to call a function instead of duplicating most of the body, which saves about 2.5KB of text (Ilpo Järvinen) * pci/sysfs: PCI/sysfs: Demacrofy pci_dev_resource_resize_attr(n) functions PCI: Remove obsolete pci_cleanup_rom() declaration PCI/sysfs: Compile pci-sysfs.c only if CONFIG_SYSFS=y # Conflicts: # drivers/pci/Makefile
Diffstat (limited to 'drivers/pci/probe.c')
-rw-r--r--drivers/pci/probe.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c
index 1434bf495db3..1325fbae2f28 100644
--- a/drivers/pci/probe.c
+++ b/drivers/pci/probe.c
@@ -2297,6 +2297,10 @@ static void pci_release_dev(struct device *dev)
kfree(pci_dev);
}
+static const struct device_type pci_dev_type = {
+ .groups = pci_dev_attr_groups,
+};
+
struct pci_dev *pci_alloc_dev(struct pci_bus *bus)
{
struct pci_dev *dev;