Commit 1b7d0642 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: addi_apci_1500: separate from addi_common.h

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0317ffd2
...@@ -158,7 +158,7 @@ static int apci1500_di_config(struct comedi_device *dev, ...@@ -158,7 +158,7 @@ static int apci1500_di_config(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
int i_PatternPolarity = 0, i_PatternTransition = 0, i_PatternMask = 0; int i_PatternPolarity = 0, i_PatternTransition = 0, i_PatternMask = 0;
int i_MaxChannel = 0, i_Count = 0, i_EventMask = 0; int i_MaxChannel = 0, i_Count = 0, i_EventMask = 0;
int i_PatternTransitionCount = 0, i_RegValue; int i_PatternTransitionCount = 0, i_RegValue;
...@@ -466,7 +466,7 @@ static int apci1500_di_write(struct comedi_device *dev, ...@@ -466,7 +466,7 @@ static int apci1500_di_write(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
int i_Event1InterruptStatus = 0, i_Event2InterruptStatus = int i_Event1InterruptStatus = 0, i_Event2InterruptStatus =
0, i_RegValue; 0, i_RegValue;
...@@ -653,7 +653,7 @@ static int apci1500_di_read(struct comedi_device *dev, ...@@ -653,7 +653,7 @@ static int apci1500_di_read(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
int i_DummyRead = 0; int i_DummyRead = 0;
/* Software reset */ /* Software reset */
...@@ -789,7 +789,7 @@ static int apci1500_di_insn_bits(struct comedi_device *dev, ...@@ -789,7 +789,7 @@ static int apci1500_di_insn_bits(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
data[1] = inw(devpriv->i_IobaseAddon + APCI1500_DIGITAL_IP); data[1] = inw(devpriv->i_IobaseAddon + APCI1500_DIGITAL_IP);
...@@ -807,7 +807,7 @@ static int apci1500_do_config(struct comedi_device *dev, ...@@ -807,7 +807,7 @@ static int apci1500_do_config(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
devpriv->b_OutputMemoryStatus = data[0]; devpriv->b_OutputMemoryStatus = data[0];
return insn->n; return insn->n;
...@@ -821,7 +821,7 @@ static int apci1500_do_write(struct comedi_device *dev, ...@@ -821,7 +821,7 @@ static int apci1500_do_write(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
static unsigned int ui_Temp; static unsigned int ui_Temp;
unsigned int ui_Temp1; unsigned int ui_Temp1;
unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */ unsigned int ui_NoOfChannel = CR_CHAN(insn->chanspec); /* get the channel */
...@@ -981,7 +981,7 @@ static int apci1500_timer_config(struct comedi_device *dev, ...@@ -981,7 +981,7 @@ static int apci1500_timer_config(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
int i_TimerCounterMode, i_MasterConfiguration; int i_TimerCounterMode, i_MasterConfiguration;
devpriv->tsk_Current = current; devpriv->tsk_Current = current;
...@@ -1471,7 +1471,7 @@ static int apci1500_timer_write(struct comedi_device *dev, ...@@ -1471,7 +1471,7 @@ static int apci1500_timer_write(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
int i_CommandAndStatusValue; int i_CommandAndStatusValue;
switch (data[0]) { switch (data[0]) {
...@@ -1731,7 +1731,7 @@ static int apci1500_timer_bits(struct comedi_device *dev, ...@@ -1731,7 +1731,7 @@ static int apci1500_timer_bits(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
int i_CommandAndStatusValue; int i_CommandAndStatusValue;
switch (data[0]) { switch (data[0]) {
...@@ -1895,7 +1895,7 @@ static int apci1500_do_bits(struct comedi_device *dev, ...@@ -1895,7 +1895,7 @@ static int apci1500_do_bits(struct comedi_device *dev,
struct comedi_insn *insn, struct comedi_insn *insn,
unsigned int *data) unsigned int *data)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
unsigned int ui_Status; unsigned int ui_Status;
int i_RegValue; int i_RegValue;
int i_Constant; int i_Constant;
...@@ -2015,7 +2015,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d) ...@@ -2015,7 +2015,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d)
{ {
struct comedi_device *dev = d; struct comedi_device *dev = d;
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
unsigned int ui_InterruptStatus = 0; unsigned int ui_InterruptStatus = 0;
int i_RegValue = 0; int i_RegValue = 0;
...@@ -2186,7 +2186,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d) ...@@ -2186,7 +2186,7 @@ static irqreturn_t apci1500_interrupt(int irq, void *d)
static int apci1500_reset(struct comedi_device *dev) static int apci1500_reset(struct comedi_device *dev)
{ {
struct addi_private *devpriv = dev->private; struct apci1500_private *devpriv = dev->private;
int i_DummyRead = 0; int i_DummyRead = 0;
i_TimerCounter1Init = 0; i_TimerCounter1Init = 0;
......
#include <linux/module.h> #include <linux/module.h>
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/sched.h>
#include <linux/interrupt.h>
#include "../comedidev.h" #include "../comedidev.h"
#include "comedi_fc.h" #include "comedi_fc.h"
#include "amcc_s5933.h" #include "amcc_s5933.h"
#include "addi-data/addi_common.h" struct apci1500_private {
int iobase;
int i_IobaseAmcc;
int i_IobaseAddon;
int i_IobaseReserved;
unsigned char b_OutputMemoryStatus;
struct task_struct *tsk_Current;
};
#include "addi-data/hwdrv_apci1500.c" #include "addi-data/hwdrv_apci1500.c"
...@@ -13,7 +22,7 @@ static int apci1500_auto_attach(struct comedi_device *dev, ...@@ -13,7 +22,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
unsigned long context) unsigned long context)
{ {
struct pci_dev *pcidev = comedi_to_pci_dev(dev); struct pci_dev *pcidev = comedi_to_pci_dev(dev);
struct addi_private *devpriv; struct apci1500_private *devpriv;
struct comedi_subdevice *s; struct comedi_subdevice *s;
int ret; int ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment