]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: amplc_dio200: remove private data
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 1 Aug 2014 20:06:59 +0000 (13:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 16 Aug 2014 19:23:09 +0000 (12:23 -0700)
commit60826d0a24036a309c30937967472d158fd6e87a
tree15a9d2fca9960c5a51585152481c449f60ec0cfa
parent73b3611446579bbd0cce52116620254c2fc2d11b
staging: comedi: amplc_dio200: remove private data

The private data in this driver only has one member, 'intr_sd', which is
the index to the interrupt subdevice.

This member is initialized during the attach of the driver when the sd_intr
subdevice is detected in the boadinfo 'layout'. The member is then used in
the interrupt handler to get the pointer to the subdevice.

This member is not necessary. The comedi_device 'read_subdev' is also
initialized during the attach. This can be used in the interrupt handler
to get the subdevice pointer.

Refactor the code to not require the private data and remove the struct
and its allocations.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/amplc_dio200.c
drivers/staging/comedi/drivers/amplc_dio200.h
drivers/staging/comedi/drivers/amplc_dio200_common.c
drivers/staging/comedi/drivers/amplc_dio200_pci.c