On Thursday, May 29, 2014 9:43 PM, Chase Southwood wrote: > The addi_private struct defined in addi-data/addi_common.h is very bloated > and contains many fields which addi_apci_1564 does not require. In the > interest of eventually removing this driver's dependency on > addi_common.h, we can create a private data struct specifically for > addi_apci_1564 containing only the fields it will actually use. > > Signed-off-by: Chase Southwood <chase.southwood@xxxxxxxxx> > Cc: Ian Abbott <abbotti@xxxxxxxxx> > Cc: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> > --- > .../comedi/drivers/addi-data/hwdrv_apci1564.c | 164 +++++++++++---------- > drivers/staging/comedi/drivers/addi_apci_1564.c | 34 ++--- > 2 files changed, 102 insertions(+), 96 deletions(-) > > diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c > index f974bd2..054e731 100644 > --- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c > +++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci1564.c > @@ -49,7 +49,7 @@ > #define APCI1564_COUNTER4 3 > > /* > - * devpriv->i_IobaseAmcc Register Map > + * devpriv->amcc_iobase Register Map > */ > #define APCI1564_DI_REG 0x04 > #define APCI1564_DI_INT_MODE1_REG 0x08 > @@ -93,6 +93,12 @@ > static unsigned int ui_InterruptStatus_1564; > static unsigned int ui_InterruptData, ui_Type; These static variables could also go into the new private data struct. But, hopefully you will be removing them eventually anyway. > > +struct apci1564_private { > + unsigned int amcc_iobase; /* base of AMCC I/O registers */ > + unsigned char timer_select_mode; > + unsigned char mode_select_register; > +}; > + The new private data struct should really be defined in the driver (addi_apci_1564.c) before the include of hwdrv_apci1564.c . Then you don't have to move it later. Other than that: Reviewed-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx> _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel