#include "8255.h"
#include "plx9052.h"
-#define PC236_DRIVER_NAME "amplc_pc236"
-
#define DO_ISA IS_ENABLED(CONFIG_COMEDI_AMPLC_PC236_ISA)
#define DO_PCI IS_ENABLED(CONFIG_COMEDI_AMPLC_PC236_PCI)
.model = pci236_model,
},
{
- .name = PC236_DRIVER_NAME,
+ .name = "amplc_pc236",
.devid = PCI_DEVICE_ID_INVALID,
.bustype = pci_bustype,
.model = anypci_model, /* wildcard */
pc236_intr_disable(dev);
if (irq) {
if (request_irq(irq, pc236_interrupt, req_irq_flags,
- PC236_DRIVER_NAME, dev) >= 0) {
+ dev->board_name, dev) >= 0) {
dev->irq = irq;
s->type = COMEDI_SUBD_DI;
s->subdev_flags = SDF_READABLE | SDF_CMD_READ;
return pc236_pci_common_attach(dev, pci_dev);
}
- dev_err(dev->class_dev, PC236_DRIVER_NAME
- ": BUG! cannot determine board type!\n");
+ dev_err(dev->class_dev, "BUG! cannot determine board type!\n");
return -EINVAL;
}
if (!DO_PCI)
return -EINVAL;
- dev_info(dev->class_dev, PC236_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)
* the device code.
*/
static struct comedi_driver amplc_pc236_driver = {
- .driver_name = PC236_DRIVER_NAME,
+ .driver_name = "amplc_pc236",
.module = THIS_MODULE,
.attach = pc236_attach,
.auto_attach = pc236_auto_attach,
}
static struct pci_driver amplc_pc236_pci_driver = {
- .name = PC236_DRIVER_NAME,
+ .name = "amplc_pc236",
.id_table = pc236_pci_table,
.probe = &lc_pc236_pci_probe,
.remove = comedi_pci_auto_unconfig,
#include <linux/module.h>
#include "../comedidev.h"
-#define PC263_DRIVER_NAME "amplc_pc263"
-
/* PC263 registers */
/*
}
static struct comedi_driver amplc_pc263_driver = {
- .driver_name = PC263_DRIVER_NAME,
+ .driver_name = "amplc_pc263",
.module = THIS_MODULE,
.attach = pc263_attach,
.detach = comedi_legacy_detach,
#include "comedi_fc.h"
#include "8253.h"
-#define DRIVER_NAME "amplc_pci224"
-
/*
* PCI IDs.
*/
.ao_bits = 16,
},
{
- .name = DRIVER_NAME,
+ .name = "amplc_pci224",
.devid = PCI_DEVICE_ID_INVALID,
.model = any_model, /* wildcard */
},
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]);
}
}
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;
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);
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)
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)
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;
}
/*
#include "../comedidev.h"
-#define PCI263_DRIVER_NAME "amplc_pci263"
-
static int pci263_do_insn_bits(struct comedi_device *dev,
struct comedi_subdevice *s,
struct comedi_insn *insn,
}
static struct comedi_driver amplc_pci263_driver = {
- .driver_name = PCI263_DRIVER_NAME,
+ .driver_name = "amplc_pci263",
.module = THIS_MODULE,
.auto_attach = pci263_auto_attach,
.detach = comedi_pci_disable,
}
static struct pci_driver amplc_pci263_pci_driver = {
- .name = PCI263_DRIVER_NAME,
+ .name = "amplc_pci263",
.id_table = pci263_pci_table,
.probe = &lc_pci263_pci_probe,
.remove = comedi_pci_auto_unconfig,
#include <linux/delay.h>
#include "../comedidev.h"
-#define DRIVER_NAME "unioxx5"
#define UNIOXX5_SIZE 0x10
#define UNIOXX5_SUBDEV_BASE 0xA000 /* base addr of first subdev */
#define UNIOXX5_SUBDEV_ODDS 0x400
}
static struct comedi_driver unioxx5_driver = {
- .driver_name = DRIVER_NAME,
+ .driver_name = "unioxx5",
.module = THIS_MODULE,
.attach = unioxx5_attach,
.detach = unioxx5_detach,