[linux-dvb] dvb_register_adapter using kmalloc

Andreas Oberritter obi at linuxtv.org
Sat Mar 12 23:51:46 CET 2005


I wonder whether there is a reason for letting dvb_register_adapter
allocate the struct dvb_adapter. I think it is better to embed struct
dvb_adapter in the hardware's private struct and pass that one to the
register function instead.

I think even the 'void *priv' field of struct dvb_adapter could then be
replaced by the container_of(x) macro.

Am I overlooking something?

If nobody objects I am going to prepare and commit a patch converting
dvb_register_adapter. I am not going to change usage of the priv field
for drivers I am not maintaining.


More information about the linux-dvb mailing list