diff options
author | Boaz Harrosh <bharrosh@panasas.com> | 2009-11-29 16:25:26 +0200 |
---|---|---|
committer | James Bottomley <James.Bottomley@suse.de> | 2009-12-04 12:01:45 -0600 |
commit | d6ae4333e648492721a098bdc329bbd82d25eb67 (patch) | |
tree | 88a78be7ebd13ac3d1cfb386dd1a9bb68ba9aa1f /drivers/serial/m32r_sio.c | |
parent | 89f5e1f2f13b1079b8d7ff7d3ade345b7ad7c009 (diff) | |
download | blackbird-op-linux-d6ae4333e648492721a098bdc329bbd82d25eb67.tar.gz blackbird-op-linux-d6ae4333e648492721a098bdc329bbd82d25eb67.zip |
[SCSI] osduld: Use device->release instead of internal kref
The true logic of this patch will be clear in the next patch where we
use the class_find_device() API. When doing so the use of an internal
kref leaves us a narrow window where a find is started while the actual
object can go away. Using the device's kobj reference solves this
problem because now the same kref is used for both operations. (Remove
and find)
Core changes
* Embed a struct device in uld_ structure and use device_register
instead of devie_create. Set __remove to be the device release
function.
* __uld_get/put is just get_/put_device. Now every thing is accounted
for on the device object. Internal kref is removed.
* At __remove() we can safely de-allocate the uld_ structure. (The
function has moved to avoid forward declaration)
Some cleanups
* Use class register/unregister is cleaner for this driver now.
* cdev ref-counting games are no longer necessary
I have incremented the device version string in case of new bugs.
Note: Previous bugfix of taking the reference around fput() still
applies.
Signed-off-by: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/serial/m32r_sio.c')
0 files changed, 0 insertions, 0 deletions