[PATCH 22/34] staging: comedi: addi_common.h: remove boardinfo definition

H Hartley Sweeten hsweeten at visionengravers.com
Tue Oct 14 17:44:38 UTC 2014


The addi_board definition is not only used by the addi_apci_3120 driver.

Introduce a private definition in that driver and remove the global definition
from addi_common.h.

Signed-off-by: H Hartley Sweeten <hsweeten at visionengravers.com>
Cc: Ian Abbott <abbotti at mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
---
 .../staging/comedi/drivers/addi-data/addi_common.h   | 20 --------------------
 drivers/staging/comedi/drivers/addi_apci_3120.c      | 17 +++++++++++++++--
 2 files changed, 15 insertions(+), 22 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/addi_common.h b/drivers/staging/comedi/drivers/addi-data/addi_common.h
index 5518332..28aec3f 100644
--- a/drivers/staging/comedi/drivers/addi-data/addi_common.h
+++ b/drivers/staging/comedi/drivers/addi-data/addi_common.h
@@ -18,26 +18,6 @@
 #include <linux/sched.h>
 #include <linux/interrupt.h>
 
-struct addi_board {
-	const char *name;
-	char *pc_EepromChip;	/*  type of chip */
-	int i_NbrAiChannel;	/*  num of A/D chans */
-	int i_NbrAiChannelDiff;	/*  num of A/D chans in diff mode */
-	int i_AiChannelList;	/*  len of chanlist */
-	int i_NbrAoChannel;	/*  num of D/A chans */
-	int i_AiMaxdata;	/*  resolution of A/D */
-	int i_AoMaxdata;	/*  resolution of D/A */
-	const struct comedi_lrange *pr_AiRangelist;	/* rangelist for A/D */
-
-	int i_NbrDiChannel;	/*  Number of DI channels */
-	int i_NbrDoChannel;	/*  Number of DO channels */
-	int i_DoMaxdata;	/*  data to set all channels high */
-
-	int i_Timer;		/*    timer subdevice present or not */
-	unsigned int ui_MinAcquisitiontimeNs;	/*  Minimum Acquisition in Nano secs */
-	unsigned int ui_MinDelaytimeNs;	/*  Minimum Delay in Nano secs */
-};
-
 struct addi_private {
 	int iobase;
 	int i_IobaseAmcc;	/*  base+size for AMCC chip */
diff --git a/drivers/staging/comedi/drivers/addi_apci_3120.c b/drivers/staging/comedi/drivers/addi_apci_3120.c
index 1fa53cf..ae81fdb 100644
--- a/drivers/staging/comedi/drivers/addi_apci_3120.c
+++ b/drivers/staging/comedi/drivers/addi_apci_3120.c
@@ -14,7 +14,20 @@ enum apci3120_boardid {
 	BOARD_APCI3001,
 };
 
-static const struct addi_board apci3120_boardtypes[] = {
+struct apci3120_board {
+	const char *name;
+	int i_NbrAiChannel;
+	int i_NbrAiChannelDiff;
+	int i_AiChannelList;
+	int i_NbrAoChannel;
+	int i_AiMaxdata;
+	int i_AoMaxdata;
+	int i_NbrDiChannel;
+	int i_NbrDoChannel;
+	int i_DoMaxdata;
+};
+
+static const struct apci3120_board apci3120_boardtypes[] = {
 	[BOARD_APCI3120] = {
 		.name			= "apci3120",
 		.i_NbrAiChannel		= 16,
@@ -43,7 +56,7 @@ static int apci3120_auto_attach(struct comedi_device *dev,
 				unsigned long context)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-	const struct addi_board *this_board = NULL;
+	const struct apci3120_board *this_board = NULL;
 	struct addi_private *devpriv;
 	struct comedi_subdevice *s;
 	int ret, order, i;
-- 
2.0.3



More information about the devel mailing list