[PATCH 31/34] staging: comedi: addi_apci_035: separate from addi_common.h

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Remove the need to include addi_common.h by introducing a new private
data definition. Only include the members that are actually used by
the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c | 14 +++++++-------
 drivers/staging/comedi/drivers/addi_apci_035.c           | 13 +++++++++++--
 2 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c
index a07ee1b..d833da2 100644
--- a/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c
+++ b/drivers/staging/comedi/drivers/addi-data/hwdrv_apci035.c
@@ -118,7 +118,7 @@ static int apci035_timer_config(struct comedi_device *dev,
 				struct comedi_insn *insn,
 				unsigned int *data)
 {
-	struct addi_private *devpriv = dev->private;
+	struct apci035_private *devpriv = dev->private;
 	unsigned int ui_Status;
 	unsigned int ui_Command;
 	unsigned int ui_Mode;
@@ -248,7 +248,7 @@ static int apci035_timer_write(struct comedi_device *dev,
 			       struct comedi_insn *insn,
 			       unsigned int *data)
 {
-	struct addi_private *devpriv = dev->private;
+	struct apci035_private *devpriv = dev->private;
 	unsigned int ui_Command;
 	int i_Count;
 
@@ -345,7 +345,7 @@ static int apci035_timer_read(struct comedi_device *dev,
 			      struct comedi_insn *insn,
 			      unsigned int *data)
 {
-	struct addi_private *devpriv = dev->private;
+	struct apci035_private *devpriv = dev->private;
 	unsigned int ui_Status;	/*  Status register */
 
 	i_WatchdogNbr = insn->unused[0];
@@ -380,7 +380,7 @@ static int apci035_ai_config(struct comedi_device *dev,
 			     struct comedi_insn *insn,
 			     unsigned int *data)
 {
-	struct addi_private *devpriv = dev->private;
+	struct apci035_private *devpriv = dev->private;
 
 	devpriv->tsk_Current = current;
 	outl(0x200 | 0, devpriv->iobase + 128 + 0x4);
@@ -404,7 +404,7 @@ static int apci035_ai_read(struct comedi_device *dev,
 			   struct comedi_insn *insn,
 			   unsigned int *data)
 {
-	struct addi_private *devpriv = dev->private;
+	struct apci035_private *devpriv = dev->private;
 	unsigned int ui_CommandRegister;
 
 	/*  Set the start */
@@ -420,7 +420,7 @@ static int apci035_ai_read(struct comedi_device *dev,
 
 static int apci035_reset(struct comedi_device *dev)
 {
-	struct addi_private *devpriv = dev->private;
+	struct apci035_private *devpriv = dev->private;
 	int i_Count;
 
 	for (i_Count = 1; i_Count <= 4; i_Count++) {
@@ -437,7 +437,7 @@ static int apci035_reset(struct comedi_device *dev)
 static irqreturn_t apci035_interrupt(int irq, void *d)
 {
 	struct comedi_device *dev = d;
-	struct addi_private *devpriv = dev->private;
+	struct apci035_private *devpriv = dev->private;
 	unsigned int ui_StatusRegister1;
 	unsigned int ui_StatusRegister2;
 	unsigned int ui_ReadCommand;
diff --git a/drivers/staging/comedi/drivers/addi_apci_035.c b/drivers/staging/comedi/drivers/addi_apci_035.c
index 37b5884..d7b7e1a 100644
--- a/drivers/staging/comedi/drivers/addi_apci_035.c
+++ b/drivers/staging/comedi/drivers/addi_apci_035.c
@@ -1,11 +1,20 @@
 #include <linux/module.h>
 #include <linux/pci.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
 
 #include "../comedidev.h"
 #include "comedi_fc.h"
 #include "amcc_s5933.h"
 
-#include "addi-data/addi_common.h"
+struct apci035_private {
+	int iobase;
+	int i_IobaseAmcc;
+	int i_IobaseAddon;
+	int i_IobaseReserved;
+	unsigned char b_TimerSelectMode;
+	struct task_struct *tsk_Current;
+};
 
 #define ADDIDATA_WATCHDOG 2	/*  Or shold it be something else */
 
@@ -15,7 +24,7 @@ static int apci035_auto_attach(struct comedi_device *dev,
 			       unsigned long context)
 {
 	struct pci_dev *pcidev = comedi_to_pci_dev(dev);
-	struct addi_private *devpriv;
+	struct apci035_private *devpriv;
 	struct comedi_subdevice *s;
 	unsigned int dw_Dummy;
 	int ret;
-- 
2.0.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux