Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: PROC_FS patch and other stuff




> Create lets say dvb_proc.c and .h. Define a struct dvb_proc_fe struct in
> dvb_proc.h and place all the required proc var things inside this struct.
> Then add this struct to the frontend struct, wrapped by #ifdef DVB_PROC_FS.
> So you blow up the fe_struct just by 3 lines.
>
> Next move all the register unregister proc code to the dvb_proc.c and in
> the fe_register just call dvb_proc_register_frontend(&fe) (again wrapped by
> ifdef DVB_RPOC_FS)
>
> Maybe it's a good idea to put the proc register/unregister hooks inside the
> dvb_device_register. Since it will become generic and you get proc infos
> for all device, not just the fe's. But i haven't checked this idea yet.
>
> Hope that helps a bit,
>      Florian

That's a good idea actually :-) Holger, is it ok to blow up a few functions 
and structures by those 3 lines, if I keep everything else in proc_fs files? 
This is sufficient for exposing all driver functionality to /proc, but there 
is also the case of allowing more low level adjustments, which are not 
otherwise made public in the driver.

For example the PWM and ves1820 register values, for these I need to do a bit 
more work. I will still try to move it all to proc_fs specific source 
file(s), and keep the modifications to the actual driver very small. 

Holger, in the write_proc function, for example for /proc/.../frequency, I 
just fire off a new frontend_set_parameters with the frequency changed, and 
the other parameters the same, is that OK ? 

Dennis


--
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index