[linux-dvb] [PATCH] Add driver specific module option to choose dvb adapter numbers, second try

Janne Grunau janne-dvb at grunau.be
Sat Mar 29 22:40:25 CET 2008


Hi,

I resubmit this patch since I still think it is a good idea to the this 
driver option. There is still no udev recipe to guaranty stable dvb 
adapter numbers. I've tried to come up with some rules but it's tricky 
due to the multiple device nodes in a subdirectory. I won't claim that 
it is impossible to get udev to assign driver or hardware specific 
stable dvb adapter numbers but I think this patch is easier and more 
clean than a udev based solution.

I'll drop this patch if a simple udev solution is found in a reasonable 
amount of time. But if there is no I would like to see the attached 
patch merged.

Quoting myself for a short desciprtion for the patch:

> V4L drivers have the {radio|vbi|video}_nr module options to allocate
> static minor numbers per driver.
>
> Attached patch adds a similiar mechanism to the dvb subsystem. To
> avoid problems with device unplugging and repluging each driver holds
> a DVB_MAX_ADAPTER long array of the preffered order of adapter
> numbers.
>
> options dvb-usb-dib0700 adapter_nr=7,6,5,4,3,2,1,0 would result in a
> reversed allocation of adapter numbers.
>
> With adapter_nr=2,5 it tries first to get adapter number 2 and 5. If
> both are already in use it will allocate the lowest free adapter
> number.

Janne
-------------- next part --------------
A non-text attachment was scrubbed...
Name: modoption_adapter_numbers2.diff
Type: text/x-diff
Size: 39432 bytes
Desc: not available
Url : http://www.linuxtv.org/pipermail/linux-dvb/attachments/20080329/6481e051/attachment-0001.diff 


More information about the linux-dvb mailing list