mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hanna Linder <hannal@us.ibm.com>
To: sfeldma@pobox.com
Cc: Hanna Linder <hannal@us.ibm.com>,
	lkml <linux-kernel@vger.kernel.org>,
	kernel-janitors <kernel-janitors@lists.osdl.org>,
	greg@kroah.com, wli@holomorphy.com
Subject: Re: [KJ] [RFT 2.6] ebus.c replace pci_find_device with	pci_get_device
Date: Tue, 12 Oct 2004 15:07:06 -0700	[thread overview]
Message-ID: <148640000.1097618825@w-hlinder.beaverton.ibm.com> (raw)
In-Reply-To: <1097342008.3903.12.camel@sfeldma-mobl2.dsl-verizon.net>

--On Saturday, October 09, 2004 10:13:28 AM -0700 Scott Feldman <sfeldma@pobox.com> wrote:
> If we can get out of the while() with pdev != NULL, then a
> pci_dev_put(pdev) cleanup is required.  
> 
> -scott

Here is the new patch. Thanks Scott.

Signed-off-by: Hanna Linder <hannal@us.ibm.com>

diff -Nrup linux-2.6.9-rc4-mm1cln/arch/sparc/kernel/ebus.c linux-2.6.9-rc4-mm1patch/arch/sparc/kernel/ebus.c
--- linux-2.6.9-rc4-mm1cln/arch/sparc/kernel/ebus.c	2004-10-12 14:15:31.000000000 -0700
+++ linux-2.6.9-rc4-mm1patch/arch/sparc/kernel/ebus.c	2004-10-12 14:53:55.369254888 -0700
@@ -275,7 +275,7 @@ void __init ebus_init(void)
 		}
 	}
 
-	pdev = pci_find_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, 0);
+	pdev = pci_get_device(PCI_VENDOR_ID_SUN, PCI_DEVICE_ID_SUN_EBUS, 0);
 	if (!pdev) {
 		return;
 	}
@@ -342,7 +342,7 @@ void __init ebus_init(void)
 		}
 
 	next_ebus:
-		pdev = pci_find_device(PCI_VENDOR_ID_SUN,
+		pdev = pci_get_device(PCI_VENDOR_ID_SUN,
 				       PCI_DEVICE_ID_SUN_EBUS, pdev);
 		if (!pdev)
 			break;
@@ -356,4 +356,6 @@ void __init ebus_init(void)
 		ebus->next = 0;
 		++num_ebus;
 	}
+	if(pdev)
+		pci_dev_put(pdev);
 }


      reply	other threads:[~2004-10-12 22:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-08 22:26 Hanna Linder
2004-10-09 17:13 ` [KJ] " Scott Feldman
2004-10-12 22:07   ` Hanna Linder [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=148640000.1097618825@w-hlinder.beaverton.ibm.com \
    --to=hannal@us.ibm.com \
    --cc=greg@kroah.com \
    --cc=kernel-janitors@lists.osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sfeldma@pobox.com \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®