linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] pci: remove pcibios_add_platform_entries
@ 2014-04-17 17:48 Sebastian Ott
  2014-04-18  2:47 ` Greg Kroah-Hartman
  2014-04-30 20:52 ` Bjorn Helgaas
  0 siblings, 2 replies; 3+ messages in thread
From: Sebastian Ott @ 2014-04-17 17:48 UTC (permalink / raw)
  To: Bjorn Helgaas; +Cc: linux-pci, Greg Kroah-Hartman

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

Link: https://lkml.kernel.org/r/alpine.LFD.2.11.1404141101500.1529@denkbrett
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
---
 drivers/pci/pci-sysfs.c |   10 ----------
 include/linux/pci.h     |    1 -
 2 files changed, 11 deletions(-)

--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -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)
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -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,


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pci: remove pcibios_add_platform_entries
  2014-04-17 17:48 [PATCH] pci: remove pcibios_add_platform_entries Sebastian Ott
@ 2014-04-18  2:47 ` Greg Kroah-Hartman
  2014-04-30 20:52 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2014-04-18  2:47 UTC (permalink / raw)
  To: Sebastian Ott; +Cc: Bjorn Helgaas, linux-pci

On Thu, Apr 17, 2014 at 07:48:07PM +0200, Sebastian Ott wrote:
> Remove pcibios_add_platform_entries. Architecture specific attributes
> can be achieved by setting pdev->dev.groups .
> 
> Link: https://lkml.kernel.org/r/alpine.LFD.2.11.1404141101500.1529@denkbrett
> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>

Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] pci: remove pcibios_add_platform_entries
  2014-04-17 17:48 [PATCH] pci: remove pcibios_add_platform_entries Sebastian Ott
  2014-04-18  2:47 ` Greg Kroah-Hartman
@ 2014-04-30 20:52 ` Bjorn Helgaas
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2014-04-30 20:52 UTC (permalink / raw)
  To: Sebastian Ott; +Cc: linux-pci, Greg Kroah-Hartman

On Thu, Apr 17, 2014 at 07:48:07PM +0200, Sebastian Ott wrote:
> Remove pcibios_add_platform_entries. Architecture specific attributes
> can be achieved by setting pdev->dev.groups .
> 
> Link: https://lkml.kernel.org/r/alpine.LFD.2.11.1404141101500.1529@denkbrett
> Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>

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!

> ---
>  drivers/pci/pci-sysfs.c |   10 ----------
>  include/linux/pci.h     |    1 -
>  2 files changed, 11 deletions(-)
> 
> --- a/drivers/pci/pci-sysfs.c
> +++ b/drivers/pci/pci-sysfs.c
> @@ -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)
> --- a/include/linux/pci.h
> +++ b/include/linux/pci.h
> @@ -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,
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-04-30 20:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-17 17:48 [PATCH] pci: remove pcibios_add_platform_entries Sebastian Ott
2014-04-18  2:47 ` Greg Kroah-Hartman
2014-04-30 20:52 ` Bjorn Helgaas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).