From: Dave Peterson <dsp@llnl.gov>
To: alan@lxorguk.ukuu.org.uk, akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, bluesmoke-devel@lists.sourceforge.net
Subject: [PATCH 4/15] EDAC: amd76x pci_dev_get/pci_dev_put fixes
Date: Thu, 2 Mar 2006 17:47:55 -0800 [thread overview]
Message-ID: <200603021747.55112.dsp@llnl.gov> (raw)
Eliminate unnecessary calls to pci_dev_get() and pci_dev_put() from
amd76x driver.
Signed-Off-By: David S. Peterson <dsp@llnl.gov> <dave_peterson@pobox.com>
---
Index: linux-2.6.16-rc5-edac/drivers/edac/amd76x_edac.c
===================================================================
--- linux-2.6.16-rc5-edac.orig/drivers/edac/amd76x_edac.c 2006-02-27 16:58:41.000000000 -0800
+++ linux-2.6.16-rc5-edac/drivers/edac/amd76x_edac.c 2006-02-27 17:00:39.000000000 -0800
@@ -226,7 +226,7 @@ static int amd76x_probe1(struct pci_dev
debugf0("%s(): mci = %p\n", __func__, mci);
- mci->pdev = pci_dev_get(pdev);
+ mci->pdev = pdev;
mci->mtype_cap = MEM_FLAG_RDDR;
mci->edac_ctl_cap = EDAC_FLAG_NONE | EDAC_FLAG_EC | EDAC_FLAG_SECDED;
@@ -284,11 +284,8 @@ static int amd76x_probe1(struct pci_dev
return 0;
fail:
- if (mci) {
- if(mci->pdev)
- pci_dev_put(mci->pdev);
+ if (mci != NULL)
edac_mc_free(mci);
- }
return rc;
}
@@ -322,7 +319,6 @@ static void __devexit amd76x_remove_one(
return;
if (edac_mc_del_mc(mci))
return;
- pci_dev_put(mci->pdev);
edac_mc_free(mci);
}
reply other threads:[~2006-03-03 1:49 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=200603021747.55112.dsp@llnl.gov \
--to=dsp@llnl.gov \
--cc=akpm@osdl.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=bluesmoke-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome