diff mbox

PCI: eliminate redundant pci_stop_dev() call from pci_destroy_dev()

Message ID 20090519010222.12679.74898.stgit@bob.kio (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Alexander Chiang May 19, 2009, 1:02 a.m. UTC
We always call pci_stop_bus_device before calling pci_destroy_dev.

Since pci_stop_bus_device calls pci_stop_dev, there is no need
for pci_destroy_dev to repeat the call.

Signed-off-by: Alex Chiang <achiang@hp.com>
---

 drivers/pci/remove.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jesse Barnes June 11, 2009, 6:27 p.m. UTC | #1
On Mon, 18 May 2009 19:02:38 -0600
Alex Chiang <achiang@hp.com> wrote:

> We always call pci_stop_bus_device before calling pci_destroy_dev.
> 
> Since pci_stop_bus_device calls pci_stop_dev, there is no need
> for pci_destroy_dev to repeat the call.
> 
> Signed-off-by: Alex Chiang <achiang@hp.com>
> ---
> 
>  drivers/pci/remove.c |    2 --
>  1 files changed, 0 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
> index 86503c1..176615e 100644
> --- a/drivers/pci/remove.c
> +++ b/drivers/pci/remove.c
> @@ -32,8 +32,6 @@ static void pci_stop_dev(struct pci_dev *dev)
>  
>  static void pci_destroy_dev(struct pci_dev *dev)
>  {
> -	pci_stop_dev(dev);
> -
>  	/* Remove the device from the device lists, and prevent any
> further
>  	 * list accesses from this device */
>  	down_write(&pci_bus_sem);

Applied to linux-next, thanks.
diff mbox

Patch

diff --git a/drivers/pci/remove.c b/drivers/pci/remove.c
index 86503c1..176615e 100644
--- a/drivers/pci/remove.c
+++ b/drivers/pci/remove.c
@@ -32,8 +32,6 @@  static void pci_stop_dev(struct pci_dev *dev)
 
 static void pci_destroy_dev(struct pci_dev *dev)
 {
-	pci_stop_dev(dev);
-
 	/* Remove the device from the device lists, and prevent any further
 	 * list accesses from this device */
 	down_write(&pci_bus_sem);