Finding a free range (idr, blockdev)

Previous thread: [PATCH try #2] Blackfin BF54x Input Keypad controller driver by Bryan Wu on Thursday, October 4, 2007 - 10:03 am. (2 messages)

Next thread: Vague maybe ppp-related panic report for 2.6.23-rc9 by Roland Dreier on Thursday, October 4, 2007 - 11:12 am. (5 messages)
From: Jan Engelhardt
Date: Thursday, October 4, 2007 - 11:04 am

Hi,


I'd like to register a blkdev region, much like

	blk_register_region(MKDEV(major, first_minor), number_minors, 
		            xmodule, xprobe, xlock, xdata);

number_minors is known, but how do I decide what first_minor to use?
Module owns the full major number, so I thought I could use an idr map,
but there does not seem to be a function that marks a range used.
(Something along idr_get_new_range(&my_idr, ptr, &new_id, range_len)
would have been cool.)
Ideas on how to proceed?


Thanks,
Jan
-

Previous thread: [PATCH try #2] Blackfin BF54x Input Keypad controller driver by Bryan Wu on Thursday, October 4, 2007 - 10:03 am. (2 messages)

Next thread: Vague maybe ppp-related panic report for 2.6.23-rc9 by Roland Dreier on Thursday, October 4, 2007 - 11:12 am. (5 messages)