diff options
Diffstat (limited to 'drivers/staging/comedi/drivers/amplc_pci224.c')
-rw-r--r-- | drivers/staging/comedi/drivers/amplc_pci224.c | 26 |
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c index 339c47c1eb97..45aba1f950fc 100644 --- a/drivers/staging/comedi/drivers/amplc_pci224.c +++ b/drivers/staging/comedi/drivers/amplc_pci224.c @@ -108,8 +108,6 @@ Caveats: #include "comedi_fc.h" #include "8253.h" -#define DRIVER_NAME "amplc_pci224" - /* * PCI IDs. */ @@ -120,7 +118,6 @@ Caveats: /* * PCI224/234 i/o space 1 (PCIBAR2) registers. */ -#define PCI224_IO1_SIZE 0x20 /* Size of i/o space 1 (8-bit registers) */ #define PCI224_Z2_CT0 0x14 /* 82C54 counter/timer 0 */ #define PCI224_Z2_CT1 0x15 /* 82C54 counter/timer 1 */ #define PCI224_Z2_CT2 0x16 /* 82C54 counter/timer 2 */ @@ -133,7 +130,6 @@ Caveats: /* * PCI224/234 i/o space 2 (PCIBAR3) 16-bit registers. */ -#define PCI224_IO2_SIZE 0x10 /* Size of i/o space 2 (16-bit registers). */ #define PCI224_DACDATA 0x00 /* (w-o) DAC FIFO data. */ #define PCI224_SOFTTRIG 0x00 /* (r-o) DAC software scan trigger. */ #define PCI224_DACCON 0x02 /* (r/w) DAC status/configuration. */ @@ -354,7 +350,7 @@ static const struct pci224_board pci224_boards[] = { .ao_bits = 16, }, { - .name = DRIVER_NAME, + .name = "amplc_pci224", .devid = PCI_DEVICE_ID_INVALID, .model = any_model, /* wildcard */ }, @@ -1206,8 +1202,8 @@ static int pci224_attach_common(struct comedi_device *dev, if (options) { for (n = 2; n < 3 + s->n_chan; n++) { if (options[n] < 0 || options[n] > 1) { - dev_warn(dev->class_dev, DRIVER_NAME - ": warning! bad options[%u]=%d\n", + dev_warn(dev->class_dev, + "warning! bad options[%u]=%d\n", n, options[n]); } } @@ -1237,8 +1233,8 @@ static int pci224_attach_common(struct comedi_device *dev, devpriv->hwrange = hwrange_pci224_external; } else { if (options && options[2] != 0) { - dev_warn(dev->class_dev, DRIVER_NAME - ": warning! bad options[2]=%d\n", + dev_warn(dev->class_dev, + "warning! bad options[2]=%d\n", options[2]); } s->range_table = &range_pci224_internal; @@ -1250,14 +1246,13 @@ static int pci224_attach_common(struct comedi_device *dev, if (irq) { ret = request_irq(irq, pci224_interrupt, IRQF_SHARED, - DRIVER_NAME, dev); + dev->board_name, dev); if (ret < 0) { dev_err(dev->class_dev, "error! unable to allocate irq %u\n", irq); return ret; - } else { - dev->irq = irq; } + dev->irq = irq; } return 0; @@ -1268,7 +1263,7 @@ static int pci224_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct pci224_private *devpriv; struct pci_dev *pci_dev; - dev_info(dev->class_dev, DRIVER_NAME ": attach\n"); + dev_info(dev->class_dev, "attach\n"); devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); if (!devpriv) @@ -1287,8 +1282,7 @@ pci224_auto_attach(struct comedi_device *dev, unsigned long context_unused) struct pci_dev *pci_dev = comedi_to_pci_dev(dev); struct pci224_private *devpriv; - dev_info(dev->class_dev, DRIVER_NAME ": attach pci %s\n", - pci_name(pci_dev)); + dev_info(dev->class_dev, "attach pci %s\n", pci_name(pci_dev)); devpriv = comedi_alloc_devpriv(dev, sizeof(*devpriv)); if (!devpriv) @@ -1297,7 +1291,7 @@ pci224_auto_attach(struct comedi_device *dev, unsigned long context_unused) dev->board_ptr = pci224_find_pci_board(pci_dev); if (dev->board_ptr == NULL) { dev_err(dev->class_dev, - DRIVER_NAME ": BUG! cannot determine board type!\n"); + "BUG! cannot determine board type!\n"); return -EINVAL; } /* |