aboutsummaryrefslogtreecommitdiff
path: root/drivers/atm/idt77105.h
diff options
context:
space:
mode:
authorJay Fenlason <fenlason@redhat.com>2008-12-21 16:47:17 +0100
committerStefan Richter <stefanr@s5r6.in-berlin.de>2009-03-24 20:56:38 +0100
commit45ee3199eb3e4233b755a9bb353a0527a4c58b5f (patch)
tree4fa2ab6e54af7cb6aceab1cea1b5676836644841 /drivers/atm/idt77105.h
parent97811e347310766030a648fdf0e407b2c91a39c1 (diff)
firewire: cdev: use an idr rather than a linked list for resources
The current code uses a linked list and a counter for storing resources and the corresponding handle numbers. By changing to an idr we can be safe from counter wrap-around giving two resources the same handle. Furthermore, the deallocation ioctls now check whether the resource to be freed is of the intended type. Signed-off-by: Jay Fenlason <fenlason@redhat.com> Some rework by Stefan R: - The idr API documentation says we get an ID within 0...0x7fffffff. Hence we can rest assured that idr handles fit into cdev handles. - Fix some races. Add a client->in_shutdown flag for this purpose. - Add allocation retry to add_client_resource(). - It is possible to use idr_for_each() in fw_device_op_release(). - Fix ioctl_send_response() regression. - Small style changes. Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/atm/idt77105.h')
0 files changed, 0 insertions, 0 deletions