Skip to contentSkip to conversation

pci: remove pcibios_add_platform_entries

PATCH In review Sebastian Ott 3 participants 3 messages Apr 17, 2014 – Apr 30, 2014 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pci: remove pcibios_add_platform_entries

Remove pcibios_add_platform_entries. Architecture specific attributes can be achieved by setting pdev->dev.groups .

---
 drivers/pci/pci-sysfs.c |   10 ----------
 include/linux/pci.h     |    1 -
 2 files changed, 11 deletions(-)
drivers/pci/pci-sysfs.c +0 -10
@@ -1272,11 +1272,6 @@ static struct bin_attribute pcie_config_
 	.write = pci_write_config,
 };
 
-int __weak pcibios_add_platform_entries(struct pci_dev *dev)
-{
-	return 0;
-}
-
 static ssize_t reset_store(struct device *dev,
 			   struct device_attribute *attr, const char *buf,
 			   size_t count)
@@ -1392,11 +1387,6 @@ int __must_check pci_create_sysfs_dev_fi
 		pdev->rom_attr = attr;
 	}
 
-	/* add platform-specific attributes */
-	retval = pcibios_add_platform_entries(pdev);
-	if (retval)
-		goto err_rom_file;
-
 	/* add sysfs entries for various capabilities */
 	retval = pci_create_capabilities_sysfs(pdev);
 	if (retval)
include/linux/pci.h +0 -1
@@ -1572,7 +1572,6 @@ extern unsigned long pci_hotplug_io_size
 extern unsigned long pci_hotplug_mem_size;
 
 /* Architecture-specific versions may override these (weak) */
-int pcibios_add_platform_entries(struct pci_dev *dev);
 void pcibios_disable_device(struct pci_dev *dev);
 void pcibios_set_master(struct pci_dev *dev);
 int pcibios_set_pcie_reset_state(struct pci_dev *dev,
maintainer
#2 lore raw
In reply to Sebastian Ott
Quoted 5 lines · Sebastian Ott

Remove pcibios_add_platform_entries. Architecture specific attributes can be achieved by setting pdev->dev.groups .

I cherry-picked 8e209e424f8b ("s390/pci: use pdev->dev.groups for attribute creation") from Martin's tree and then applied this with Greg's ack to pci/misc for v3.16. Thanks!

Quoted 42 lines
---
 drivers/pci/pci-sysfs.c |   10 ----------
 include/linux/pci.h     |    1 -
 2 files changed, 11 deletions(-)
drivers/pci/pci-sysfs.c +0 -10
@@ -1272,11 +1272,6 @@ static struct bin_attribute pcie_config_
 	.write = pci_write_config,
 };
 
-int __weak pcibios_add_platform_entries(struct pci_dev *dev)
-{
-	return 0;
-}
-
 static ssize_t reset_store(struct device *dev,
 			   struct device_attribute *attr, const char *buf,
 			   size_t count)
@@ -1392,11 +1387,6 @@ int __must_check pci_create_sysfs_dev_fi
 		pdev->rom_attr = attr;
 	}
 
-	/* add platform-specific attributes */
-	retval = pcibios_add_platform_entries(pdev);
-	if (retval)
-		goto err_rom_file;
-
 	/* add sysfs entries for various capabilities */
 	retval = pci_create_capabilities_sysfs(pdev);
 	if (retval)
include/linux/pci.h +0 -1
@@ -1572,7 +1572,6 @@ extern unsigned long pci_hotplug_io_size
 extern unsigned long pci_hotplug_mem_size;
 
 /* Architecture-specific versions may override these (weak) */
-int pcibios_add_platform_entries(struct pci_dev *dev);
 void pcibios_disable_device(struct pci_dev *dev);
 void pcibios_set_master(struct pci_dev *dev);
 int pcibios_set_pcie_reset_state(struct pci_dev *dev,