On 2014-06-20 21:28, H Hartley Sweeten wrote:
The struct s626_enc_info is used in this driver to defined the callbacks and other data needed to handle each encoder "channel". These "channel" numbers are the same as the comedi_subdevice channels. The channels specific stuff can easily be handled run-time by just using the subdevice channel number. The first 17 patches in this series remove members from the struct. The final patch removes the struct completely. H Hartley Sweeten (18): staging: comedi: s626: define CRA/CRB registers based on channel number staging: comedi: s626: add comedi "chan" number to struct s626_enc_info staging: comedi: s626: remove my_cr[ab] from encoder private data staging: comedi: s626: define S626_LP_CNTR* registers based on channel number staging: comedi: s626: remove my_latch_lsw from encoder private data staging: comedi: s626: remove 'set_enable' callback from encoder private data staging: comedi: s626: remove 'get_enable' callback from encoder private data staging: comedi: s626: remove 'set_load_trig' callback from encoder private data staging: comedi: s626: remove 'get_load_trig' callback from encoder private data staging: comedi: s626: remove 'set_int_src' callback from encoder private data staging: comedi: s626: remove 'get_int_src' callback from encoder private data staging: comedi: s626: remove 'pulse_index' callback from encoder private data staging: comedi: s626: remove 'reset_cap_flags' callback from encoder private data staging: comedi: s626: remove 'get_mode' callback from encoder private data staging: comedi: s626: remove 'set_mode' callback from encoder private data staging: comedi: s626: remove 'my_event_bits' from encoder private data staging: comedi: s626: tidy up s626_enc_insn_read() staging: comedi: s626: remove struct s626_enc_info drivers/staging/comedi/drivers/s626.c | 668 ++++++++++++++-------------------- drivers/staging/comedi/drivers/s626.h | 28 +- 2 files changed, 285 insertions(+), 411 deletions(-)
Probably a little bit more runtime overhead, but easier to follow. Reviewed-by: Ian Abbott <abbotti@xxxxxxxxx> -- -=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@xxxxxxxxx> )=- -=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=- _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel