diff options
Diffstat (limited to 'drivers/staging/comedi/drivers/adl_pci8164.c')
-rw-r--r-- | drivers/staging/comedi/drivers/adl_pci8164.c | 39 |
1 files changed, 18 insertions, 21 deletions
diff --git a/drivers/staging/comedi/drivers/adl_pci8164.c b/drivers/staging/comedi/drivers/adl_pci8164.c index 4dd9d707a79d..d06b83f38653 100644 --- a/drivers/staging/comedi/drivers/adl_pci8164.c +++ b/drivers/staging/comedi/drivers/adl_pci8164.c @@ -30,9 +30,11 @@ Updated: Mon, 14 Apr 2008 15:10:32 +0100 Configuration Options: not applicable, uses PCI auto config */ -#include "../comedidev.h" #include <linux/kernel.h> +#include <linux/pci.h> #include <linux/delay.h> + +#include "../comedidev.h" #include "comedi_fc.h" #include "8253.h" @@ -62,35 +64,35 @@ static void adl_pci8164_insn_read(struct comedi_device *dev, char *action, unsigned short offset) { int axis, axis_reg; - char *axisname; + char axisname; axis = CR_CHAN(insn->chanspec); switch (axis) { case 0: axis_reg = PCI8164_AXIS_X; - axisname = "X"; + axisname = 'X'; break; case 1: axis_reg = PCI8164_AXIS_Y; - axisname = "Y"; + axisname = 'Y'; break; case 2: axis_reg = PCI8164_AXIS_Z; - axisname = "Z"; + axisname = 'Z'; break; case 3: axis_reg = PCI8164_AXIS_U; - axisname = "U"; + axisname = 'U'; break; default: axis_reg = PCI8164_AXIS_X; - axisname = "X"; + axisname = 'X'; } data[0] = inw(dev->iobase + axis_reg + offset); dev_dbg(dev->class_dev, - "pci8164 %s read -> %04X:%04X on axis %s\n", + "pci8164 %s read -> %04X:%04X on axis %c\n", action, data[0], data[1], axisname); } @@ -142,36 +144,36 @@ static void adl_pci8164_insn_out(struct comedi_device *dev, { unsigned int axis, axis_reg; - char *axisname; + char axisname; axis = CR_CHAN(insn->chanspec); switch (axis) { case 0: axis_reg = PCI8164_AXIS_X; - axisname = "X"; + axisname = 'X'; break; case 1: axis_reg = PCI8164_AXIS_Y; - axisname = "Y"; + axisname = 'Y'; break; case 2: axis_reg = PCI8164_AXIS_Z; - axisname = "Z"; + axisname = 'Z'; break; case 3: axis_reg = PCI8164_AXIS_U; - axisname = "U"; + axisname = 'U'; break; default: axis_reg = PCI8164_AXIS_X; - axisname = "X"; + axisname = 'X'; } outw(data[0], dev->iobase + axis_reg + offset); dev_dbg(dev->class_dev, - "pci8164 %s write -> %04X:%04X on axis %s\n", + "pci8164 %s write -> %04X:%04X on axis %c\n", action, data[0], data[1], axisname); } @@ -298,11 +300,6 @@ static int adl_pci8164_pci_probe(struct pci_dev *dev, return comedi_pci_auto_config(dev, &adl_pci8164_driver); } -static void adl_pci8164_pci_remove(struct pci_dev *dev) -{ - comedi_pci_auto_unconfig(dev); -} - static DEFINE_PCI_DEVICE_TABLE(adl_pci8164_pci_table) = { { PCI_DEVICE(PCI_VENDOR_ID_ADLINK, PCI_DEVICE_ID_PCI8164) }, {0} @@ -313,7 +310,7 @@ static struct pci_driver adl_pci8164_pci_driver = { .name = "adl_pci8164", .id_table = adl_pci8164_pci_table, .probe = adl_pci8164_pci_probe, - .remove = adl_pci8164_pci_remove, + .remove = comedi_pci_auto_unconfig, }; module_comedi_pci_driver(adl_pci8164_driver, adl_pci8164_pci_driver); |