Commit ed072e44 authored by Bjorn Helgaas's avatar Bjorn Helgaas

Merge branch 'pci/sysfs'

- Add ARCH_PCI_DEV_GROUPS so s390 can add its own attribute_groups without
  having to stomp on the core's pdev->dev.groups (Lukas Wunner)

* pci/sysfs:
  s390/pci: Stop usurping pdev->dev.groups
parents f2a3ce15 265baca6
...@@ -191,7 +191,14 @@ static inline bool zdev_enabled(struct zpci_dev *zdev) ...@@ -191,7 +191,14 @@ static inline bool zdev_enabled(struct zpci_dev *zdev)
return (zdev->fh & (1UL << 31)) ? true : false; return (zdev->fh & (1UL << 31)) ? true : false;
} }
extern const struct attribute_group *zpci_attr_groups[]; extern const struct attribute_group zpci_attr_group;
extern const struct attribute_group pfip_attr_group;
extern const struct attribute_group zpci_ident_attr_group;
#define ARCH_PCI_DEV_GROUPS &zpci_attr_group, \
&pfip_attr_group, \
&zpci_ident_attr_group,
extern unsigned int s390_pci_force_floating __initdata; extern unsigned int s390_pci_force_floating __initdata;
extern unsigned int s390_pci_no_rid; extern unsigned int s390_pci_no_rid;
......
...@@ -3,7 +3,8 @@ ...@@ -3,7 +3,8 @@
# Makefile for the s390 PCI subsystem. # Makefile for the s390 PCI subsystem.
# #
obj-$(CONFIG_PCI) += pci.o pci_irq.o pci_clp.o pci_sysfs.o \ obj-$(CONFIG_PCI) += pci.o pci_irq.o pci_clp.o \
pci_event.o pci_debug.o pci_insn.o pci_mmio.o \ pci_event.o pci_debug.o pci_insn.o pci_mmio.o \
pci_bus.o pci_kvm_hook.o pci_bus.o pci_kvm_hook.o
obj-$(CONFIG_PCI_IOV) += pci_iov.o obj-$(CONFIG_PCI_IOV) += pci_iov.o
obj-$(CONFIG_SYSFS) += pci_sysfs.o
...@@ -587,7 +587,6 @@ int pcibios_device_add(struct pci_dev *pdev) ...@@ -587,7 +587,6 @@ int pcibios_device_add(struct pci_dev *pdev)
if (pdev->is_physfn) if (pdev->is_physfn)
pdev->no_vf_scan = 1; pdev->no_vf_scan = 1;
pdev->dev.groups = zpci_attr_groups;
zpci_map_resources(pdev); zpci_map_resources(pdev);
for (i = 0; i < PCI_STD_NUM_BARS; i++) { for (i = 0; i < PCI_STD_NUM_BARS; i++) {
......
...@@ -197,7 +197,7 @@ static struct attribute *zpci_ident_attrs[] = { ...@@ -197,7 +197,7 @@ static struct attribute *zpci_ident_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group zpci_ident_attr_group = { const struct attribute_group zpci_ident_attr_group = {
.attrs = zpci_ident_attrs, .attrs = zpci_ident_attrs,
.is_visible = zpci_index_is_visible, .is_visible = zpci_index_is_visible,
}; };
...@@ -223,7 +223,7 @@ static struct attribute *zpci_dev_attrs[] = { ...@@ -223,7 +223,7 @@ static struct attribute *zpci_dev_attrs[] = {
NULL, NULL,
}; };
static struct attribute_group zpci_attr_group = { const struct attribute_group zpci_attr_group = {
.attrs = zpci_dev_attrs, .attrs = zpci_dev_attrs,
.bin_attrs = zpci_bin_attrs, .bin_attrs = zpci_bin_attrs,
}; };
...@@ -235,14 +235,8 @@ static struct attribute *pfip_attrs[] = { ...@@ -235,14 +235,8 @@ static struct attribute *pfip_attrs[] = {
&dev_attr_segment3.attr, &dev_attr_segment3.attr,
NULL, NULL,
}; };
static struct attribute_group pfip_attr_group = {
const struct attribute_group pfip_attr_group = {
.name = "pfip", .name = "pfip",
.attrs = pfip_attrs, .attrs = pfip_attrs,
}; };
const struct attribute_group *zpci_attr_groups[] = {
&zpci_attr_group,
&pfip_attr_group,
&zpci_ident_attr_group,
NULL,
};
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
#include <linux/aperture.h> #include <linux/aperture.h>
#include "pci.h" #include "pci.h"
#ifndef ARCH_PCI_DEV_GROUPS
#define ARCH_PCI_DEV_GROUPS
#endif
static int sysfs_initialized; /* = 0 */ static int sysfs_initialized; /* = 0 */
/* show configuration fields */ /* show configuration fields */
...@@ -1624,6 +1628,7 @@ const struct attribute_group *pci_dev_groups[] = { ...@@ -1624,6 +1628,7 @@ const struct attribute_group *pci_dev_groups[] = {
&pci_dev_acpi_attr_group, &pci_dev_acpi_attr_group,
#endif #endif
&pci_dev_resource_resize_group, &pci_dev_resource_resize_group,
ARCH_PCI_DEV_GROUPS
NULL, NULL,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment