On Thu, Dec 06, 2001 at 09:26:47PM -0500, Kipp Cannon wrote:
> The HP interface driver keeps track of which ports it owns by maintaining
> a private linked list of them. This could be done in every low-level
> driver but it's a lot of code duplication. My own preference would be to
> add the field
>
> struct module *owner
>
> to one of the parport structures, either struct parport or maybe struct
> parport_operations (a la file_operations). It's then trivial to set the
> pointer to THIS_MODULE and check it against THIS_MODULE before removing
> the port. I don't know if this method of keeping track of ownership is
> smiled upon or frowned upon by the kernel upper-ups but it can't be beaten
> for simplicity at the driver level. Any thoughts?
This is an excellent way of doing it IMHO. Care to write the patch
(you're in a better position to test it than I am)?
Thanks,
Tim.
*/
-- To unsubscribe, send mail to: linux-parport-request@torque.net --
-- with the single word "unsubscribe" in the body of the message. --
This archive was generated by hypermail 2b29 : Fri Dec 07 2001 - 04:35:37 EST