[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.44L0.1201241315180.1200-100000@iolanthe.rowland.org>
Date: Tue, 24 Jan 2012 13:35:02 -0500 (EST)
From: Alan Stern <stern@...land.harvard.edu>
To: Greg KH <greg@...ah.com>
cc: Dmitry Torokhov <dmitry.torokhov@...il.com>,
Sebastian Ott <sebott@...ux.vnet.ibm.com>,
Martin Schwidefsky <schwidefsky@...ibm.com>,
<linux-s390@...r.kernel.org>,
Kernel development list <linux-kernel@...r.kernel.org>
Subject: [PATCH 3/5] cio: remove {get,put}_driver
From: Sebastian Ott <sebott@...ux.vnet.ibm.com>
Remove useless {get,put}_driver - the caller of the functions
has to ensure valid driver pointers.
Signed-off-by: Sebastian Ott <sebott@...ux.vnet.ibm.com>
Signed-off-by: Alan Stern <stern@...land.harvard.edu>
CC: Martin Schwidefsky <schwidefsky@...ibm.com>
---
drivers/s390/cio/ccwgroup.c | 2 --
drivers/s390/cio/device.c | 8 +-------
2 files changed, 1 insertion(+), 9 deletions(-)
Index: usb-3.3/drivers/s390/cio/ccwgroup.c
===================================================================
--- usb-3.3.orig/drivers/s390/cio/ccwgroup.c
+++ usb-3.3/drivers/s390/cio/ccwgroup.c
@@ -580,7 +580,6 @@ void ccwgroup_driver_unregister(struct c
struct device *dev;
/* We don't want ccwgroup devices to live longer than their driver. */
- get_driver(&cdriver->driver);
while ((dev = driver_find_device(&cdriver->driver, NULL, NULL,
__ccwgroup_match_all))) {
struct ccwgroup_device *gdev = to_ccwgroupdev(dev);
@@ -592,7 +591,6 @@ void ccwgroup_driver_unregister(struct c
mutex_unlock(&gdev->reg_mutex);
put_device(dev);
}
- put_driver(&cdriver->driver);
driver_unregister(&cdriver->driver);
}
EXPORT_SYMBOL(ccwgroup_driver_unregister);
Index: usb-3.3/drivers/s390/cio/device.c
===================================================================
--- usb-3.3.orig/drivers/s390/cio/device.c
+++ usb-3.3/drivers/s390/cio/device.c
@@ -1676,15 +1676,9 @@ struct ccw_device *get_ccwdev_by_busid(s
const char *bus_id)
{
struct device *dev;
- struct device_driver *drv;
- drv = get_driver(&cdrv->driver);
- if (!drv)
- return NULL;
-
- dev = driver_find_device(drv, NULL, (void *)bus_id,
+ dev = driver_find_device(&cdrv->driver, NULL, (void *)bus_id,
__ccwdev_check_busid);
- put_driver(drv);
return dev ? to_ccwdev(dev) : NULL;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists