summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/addi_apci_1500.c
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-12-03 11:25:38 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-01-09 16:54:35 -0800
commit784801d7dcc16dfd3c12ac993f0d5949cdb67dd9 (patch)
tree10766ca2f13e1876daedfc22a0873580d55deac4 /drivers/staging/comedi/drivers/addi_apci_1500.c
parentaa6d4eb21586d8117b19187411f307d4599cc1d9 (diff)
staging: comedi: addi_apci_1500: use amcc_s5933.h defines
PCI Bar 0 accesses the AMCC S5933 PCI controller used on this board. Use the defines from amcc_35933.h and remove the "magic" numbers. Rename the CamelCase private data member 'i_IobaseAmcc' used to hold the address for PCI Bar 0. Remove the unnecessary 'ui_Status' local variable in apci1500_do_bits() that is used to hold the result of some dummy reads. Rename the CamelCase local variable 'ui_InterruptStatus' that is used to check the interrupt from the amcc chip. 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>
Diffstat (limited to 'drivers/staging/comedi/drivers/addi_apci_1500.c')
-rw-r--r--drivers/staging/comedi/drivers/addi_apci_1500.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/staging/comedi/drivers/addi_apci_1500.c b/drivers/staging/comedi/drivers/addi_apci_1500.c
index 4b2e3fb230df..9571d505b895 100644
--- a/drivers/staging/comedi/drivers/addi_apci_1500.c
+++ b/drivers/staging/comedi/drivers/addi_apci_1500.c
@@ -8,6 +8,11 @@
#include "amcc_s5933.h"
/*
+ * PCI Bar 0 Register map (devpriv->amcc)
+ * see amcc_s5933.h for register and bit defines
+ */
+
+/*
* PCI Bar 1 Register map (dev->iobase)
*/
#define APCI1500_Z8536_PORTC_REG 0x00
@@ -16,7 +21,7 @@
#define APCI1500_Z8536_CTRL_REG 0x03
struct apci1500_private {
- int i_IobaseAmcc;
+ unsigned long amcc;
int i_IobaseAddon;
unsigned char b_OutputMemoryStatus;
struct task_struct *tsk_Current;
@@ -41,7 +46,7 @@ static int apci1500_auto_attach(struct comedi_device *dev,
return ret;
dev->iobase = pci_resource_start(pcidev, 1);
- devpriv->i_IobaseAmcc = pci_resource_start(pcidev, 0);
+ devpriv->amcc = pci_resource_start(pcidev, 0);
devpriv->i_IobaseAddon = pci_resource_start(pcidev, 2);
if (pcidev->irq > 0) {