All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Lamanna <jlamanna@gmail.com>
To: kernel-janitors@vger.kernel.org
Subject: [KJ] [PATCH] drivers/scsi/advansys.c: Convert pci_find_device() to
Date: Thu, 07 Jul 2005 21:14:39 +0000	[thread overview]
Message-ID: <aa4c40ff0507071414328c64ad@mail.gmail.com> (raw)

So here's a conversion of another driver from pci_find_device() to
pci_get_device().
After reading Greg's earlier comments about this change, hopefully
this is mostly correct.
Oh and BTW, advansys.c needs a serious Lindent run and some warnings
cleanup, but that will have to be for another day...
This patch matches the current indentation of the file that's why
there are spaces not tabs.
Compile-tested but not runtime-tested.

Signed-off by: James Lamanna <jlamanna@gmail.com>
 
advansys.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/advansys.c b/drivers/scsi/advansys.c
--- a/drivers/scsi/advansys.c
+++ b/drivers/scsi/advansys.c
@@ -4472,7 +4472,7 @@ advansys_detect(struct scsi_host_templat

                     /* Find all PCI cards. */
                     while (pci_device_id_cnt < ASC_PCI_DEVICE_ID_CNT) {
-                        if ((pci_devp = pci_find_device(ASC_PCI_VENDORID,
+                        if ((pci_devp = pci_get_device(ASC_PCI_VENDORID,
                             pci_device_id[pci_device_id_cnt], pci_devp)) =
                             NULL) {
                             pci_device_id_cnt++;
@@ -5472,7 +5472,10 @@ advansys_release(struct Scsi_Host *shp)
             boardp->adv_sgblkp = sgp->next_sgblkp;
             kfree(sgp);
         }
-    }
+        pci_dev_put(to_pci_dev(boardp->dvc_cfg.adv_dvc_cfg.dev));
+    } else
+        pci_dev_put(to_pci_dev(boardp->dvc_cfg.asc_dvc_cfg.dev));
+
 #ifdef CONFIG_PROC_FS
     ASC_ASSERT(boardp->prtbuf != NULL);
     kfree(boardp->prtbuf);

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors

             reply	other threads:[~2005-07-07 21:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-07 21:14 James Lamanna [this message]
2005-07-08 17:19 ` [KJ] [PATCH] drivers/scsi/advansys.c: Convert pci_find_device() Greg KH
2005-07-08 18:04 ` James Lamanna

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=aa4c40ff0507071414328c64ad@mail.gmail.com \
    --to=jlamanna@gmail.com \
    --cc=kernel-janitors@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.