diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-01-24 13:35:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 19:00:35 -0500 |
commit | f3ff9247088a0af0c192a28908dab76ff3d8871f (patch) | |
tree | 4ff2c822bcf82213d14b2195d4f00fe470876b1d /drivers/pci/xen-pcifront.c | |
parent | 9f30ea950edfaefa51221dd26a065b3442599778 (diff) |
Remove useless get_driver()/put_driver() calls
As part of the removal of get_driver()/put_driver(), this patch
(as1512) gets rid of various useless and unnecessary calls in several
drivers. In some cases it may be desirable to pin the driver by
calling try_module_get(), but that can be done later.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: "David S. Miller" <davem@davemloft.net>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Michael Buesch <m@bues.ch>
CC: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/xen-pcifront.c')
-rw-r--r-- | drivers/pci/xen-pcifront.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/pci/xen-pcifront.c b/drivers/pci/xen-pcifront.c index 7cf3d2fcf56a..6f819988a8da 100644 --- a/drivers/pci/xen-pcifront.c +++ b/drivers/pci/xen-pcifront.c | |||
@@ -593,7 +593,7 @@ static pci_ers_result_t pcifront_common_process(int cmd, | |||
593 | } | 593 | } |
594 | pdrv = pcidev->driver; | 594 | pdrv = pcidev->driver; |
595 | 595 | ||
596 | if (get_driver(&pdrv->driver)) { | 596 | if (pdrv->driver) { |
597 | if (pdrv->err_handler && pdrv->err_handler->error_detected) { | 597 | if (pdrv->err_handler && pdrv->err_handler->error_detected) { |
598 | dev_dbg(&pcidev->dev, | 598 | dev_dbg(&pcidev->dev, |
599 | "trying to call AER service\n"); | 599 | "trying to call AER service\n"); |
@@ -623,7 +623,6 @@ static pci_ers_result_t pcifront_common_process(int cmd, | |||
623 | } | 623 | } |
624 | } | 624 | } |
625 | } | 625 | } |
626 | put_driver(&pdrv->driver); | ||
627 | } | 626 | } |
628 | if (!flag) | 627 | if (!flag) |
629 | result = PCI_ERS_RESULT_NONE; | 628 | result = PCI_ERS_RESULT_NONE; |