diff options
author | Sebastian Ott <sebott@linux.vnet.ibm.com> | 2012-01-24 13:35:02 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 19:00:35 -0500 |
commit | 9f30ea950edfaefa51221dd26a065b3442599778 (patch) | |
tree | 32c4321c5dfbaa946c485983dcbdcb82fdaea0d5 | |
parent | cef9bc56e1e944afd11f96de569657117a138c6d (diff) |
cio: remove {get,put}_driver
Remove useless {get,put}_driver - the caller of the functions
has to ensure valid driver pointers.
Signed-off-by: Sebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/s390/cio/ccwgroup.c | 2 | ||||
-rw-r--r-- | drivers/s390/cio/device.c | 8 |
2 files changed, 1 insertions, 9 deletions
diff --git a/drivers/s390/cio/ccwgroup.c b/drivers/s390/cio/ccwgroup.c index 4f1989d27b1f..5f1dc6fb5708 100644 --- a/drivers/s390/cio/ccwgroup.c +++ b/drivers/s390/cio/ccwgroup.c | |||
@@ -580,7 +580,6 @@ void ccwgroup_driver_unregister(struct ccwgroup_driver *cdriver) | |||
580 | struct device *dev; | 580 | struct device *dev; |
581 | 581 | ||
582 | /* We don't want ccwgroup devices to live longer than their driver. */ | 582 | /* We don't want ccwgroup devices to live longer than their driver. */ |
583 | get_driver(&cdriver->driver); | ||
584 | while ((dev = driver_find_device(&cdriver->driver, NULL, NULL, | 583 | while ((dev = driver_find_device(&cdriver->driver, NULL, NULL, |
585 | __ccwgroup_match_all))) { | 584 | __ccwgroup_match_all))) { |
586 | struct ccwgroup_device *gdev = to_ccwgroupdev(dev); | 585 | struct ccwgroup_device *gdev = to_ccwgroupdev(dev); |
@@ -592,7 +591,6 @@ void ccwgroup_driver_unregister(struct ccwgroup_driver *cdriver) | |||
592 | mutex_unlock(&gdev->reg_mutex); | 591 | mutex_unlock(&gdev->reg_mutex); |
593 | put_device(dev); | 592 | put_device(dev); |
594 | } | 593 | } |
595 | put_driver(&cdriver->driver); | ||
596 | driver_unregister(&cdriver->driver); | 594 | driver_unregister(&cdriver->driver); |
597 | } | 595 | } |
598 | EXPORT_SYMBOL(ccwgroup_driver_unregister); | 596 | EXPORT_SYMBOL(ccwgroup_driver_unregister); |
diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c index 47269858ecb6..02d015259461 100644 --- a/drivers/s390/cio/device.c +++ b/drivers/s390/cio/device.c | |||
@@ -1676,15 +1676,9 @@ struct ccw_device *get_ccwdev_by_busid(struct ccw_driver *cdrv, | |||
1676 | const char *bus_id) | 1676 | const char *bus_id) |
1677 | { | 1677 | { |
1678 | struct device *dev; | 1678 | struct device *dev; |
1679 | struct device_driver *drv; | ||
1680 | 1679 | ||
1681 | drv = get_driver(&cdrv->driver); | 1680 | dev = driver_find_device(&cdrv->driver, NULL, (void *)bus_id, |
1682 | if (!drv) | ||
1683 | return NULL; | ||
1684 | |||
1685 | dev = driver_find_device(drv, NULL, (void *)bus_id, | ||
1686 | __ccwdev_check_busid); | 1681 | __ccwdev_check_busid); |
1687 | put_driver(drv); | ||
1688 | 1682 | ||
1689 | return dev ? to_ccwdev(dev) : NULL; | 1683 | return dev ? to_ccwdev(dev) : NULL; |
1690 | } | 1684 | } |