aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlan Stern2012-01-24 13:35:24 -0500
committerGreg Kroah-Hartman2012-01-24 16:00:35 -0800
commitf3ff9247088a0af0c192a28908dab76ff3d8871f (patch)
tree4ff2c822bcf82213d14b2195d4f00fe470876b1d /lib
parent9f30ea950edfaefa51221dd26a065b3442599778 (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 'lib')
-rw-r--r--lib/dma-debug.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c
index fea790a2b176..13ef2338be41 100644
--- a/lib/dma-debug.c
+++ b/lib/dma-debug.c
@@ -170,7 +170,7 @@ static bool driver_filter(struct device *dev)
return false;
/* driver filter on but not yet initialized */
- drv = get_driver(dev->driver);
+ drv = dev->driver;
if (!drv)
return false;
@@ -185,7 +185,6 @@ static bool driver_filter(struct device *dev)
}
read_unlock_irqrestore(&driver_name_lock, flags);
- put_driver(drv);
return ret;
}