ida: simplified functions for id allocation
authorRusty Russell <rusty@rustcorp.com.au>
Wed, 3 Aug 2011 23:21:06 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Aug 2011 00:25:20 +0000 (14:25 -1000)
commit88eca0207cf1574328c3ce8c3be537a9317261bb
tree155b13f5df1e239fea2ad5512ef5b19865de4a9e
parenta7295898a1d2e501427f557111c2b4bdfc90b1ed
ida: simplified functions for id allocation

The current hyper-optimized functions are overkill if you simply want to
allocate an id for a device.  Create versions which use an internal
lock.

In followup patches, numerous drivers are converted to use this
interface.

Thanks to Tejun for feedback.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Tejun Heo <tj@kernel.org>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/idr.h
lib/idr.c