On Tue, Jun 29, 2010 at 1:42 PM, Bruno Prémont <bonbons@xxxxxxxxxxxxxxxxx> wrote: > Something like > framebuffer_alloc() <-- set refcount to 1 > ... > register_framebuffer() <-- inc refcount > ... > and open() of fb device would inc refcount > and close() would decrement it > > unregister_framebuffer() <-- dec refcount > framebuffer_release() <-- dec refcount Totally agree. Just verbalizing smaller details - wiith a struct kref added to fb_info, initialized in framebuffer_alloc, get_kref() and put_kref() at the points you list, and a framebuffer_free() for use with put_kref (static to start, assuming only fbmem itself will directly touch refs), this is sounds like you'd have a good fix for fbdev's current problems here. Best wishes, Bernie -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html