summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2014-07-18 17:01:23 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-21 14:43:01 -0700
commit3d03cfcaf6cde186f439ca1a318423007570760a (patch)
treeca00a75a42a48b93e3e0e9c987b42c453f2f1ede
parent862755ec07572036b0c69d738b88f89b6beede99 (diff)
downloadlinux-rt-3d03cfcaf6cde186f439ca1a318423007570760a.tar.gz
staging: comedi: drivers: remove unnecessary DRIVER_NAME defines
These defines are usually only used to initialize the driver_name member of the comedi_driver struct. Some of the drivers also use the define as part of dev_{level}() messages and/or when doing a request_irq(). The addition of the DRIVER_NAME to the messages is just added noise and the dev->board_name is typically used in the request_irq(). Just remove all the DRIVER_NAME defines. 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>
-rw-r--r--drivers/staging/comedi/drivers/amplc_pc236.c16
-rw-r--r--drivers/staging/comedi/drivers/amplc_pc263.c4
-rw-r--r--drivers/staging/comedi/drivers/amplc_pci224.c21
-rw-r--r--drivers/staging/comedi/drivers/amplc_pci263.c6
-rw-r--r--drivers/staging/comedi/drivers/unioxx5.c3
5 files changed, 19 insertions, 31 deletions
diff --git a/drivers/staging/comedi/drivers/amplc_pc236.c b/drivers/staging/comedi/drivers/amplc_pc236.c
index 6089341d2135..243b0f4d0312 100644
--- a/drivers/staging/comedi/drivers/amplc_pc236.c
+++ b/drivers/staging/comedi/drivers/amplc_pc236.c
@@ -57,8 +57,6 @@ unused.
#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)
@@ -111,7 +109,7 @@ static const struct pc236_board pc236_boards[] = {
.model = pci236_model,
},
{
- .name = PC236_DRIVER_NAME,
+ .name = "amplc_pc236",
.devid = PCI_DEVICE_ID_INVALID,
.bustype = pci_bustype,
.model = anypci_model, /* wildcard */
@@ -391,7 +389,7 @@ static int pc236_common_attach(struct comedi_device *dev, unsigned long iobase,
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;
@@ -459,8 +457,7 @@ static int pc236_attach(struct comedi_device *dev, struct comedi_devconfig *it)
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;
}
@@ -478,8 +475,7 @@ static int pc236_auto_attach(struct comedi_device *dev,
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)
@@ -528,7 +524,7 @@ static void pc236_detach(struct comedi_device *dev)
* 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,
@@ -554,7 +550,7 @@ static int amplc_pc236_pci_probe(struct pci_dev *dev,
}
static struct pci_driver amplc_pc236_pci_driver = {
- .name = PC236_DRIVER_NAME,
+ .name = "amplc_pc236",
.id_table = pc236_pci_table,
.probe = &amplc_pc236_pci_probe,
.remove = comedi_pci_auto_unconfig,
diff --git a/drivers/staging/comedi/drivers/amplc_pc263.c b/drivers/staging/comedi/drivers/amplc_pc263.c
index c0a20dccd88a..f8e551d8fd9e 100644
--- a/drivers/staging/comedi/drivers/amplc_pc263.c
+++ b/drivers/staging/comedi/drivers/amplc_pc263.c
@@ -36,8 +36,6 @@ The state of the outputs can be read.
#include <linux/module.h>
#include "../comedidev.h"
-#define PC263_DRIVER_NAME "amplc_pc263"
-
/* PC263 registers */
/*
@@ -97,7 +95,7 @@ static int pc263_attach(struct comedi_device *dev, struct comedi_devconfig *it)
}
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,
diff --git a/drivers/staging/comedi/drivers/amplc_pci224.c b/drivers/staging/comedi/drivers/amplc_pci224.c
index 64a961a5643a..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.
*/
@@ -352,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 */
},
@@ -1204,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]);
}
}
@@ -1235,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;
@@ -1248,7 +1246,7 @@ 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);
@@ -1265,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)
@@ -1284,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)
@@ -1294,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;
}
/*
diff --git a/drivers/staging/comedi/drivers/amplc_pci263.c b/drivers/staging/comedi/drivers/amplc_pci263.c
index 8137325004c0..748a6b108f32 100644
--- a/drivers/staging/comedi/drivers/amplc_pci263.c
+++ b/drivers/staging/comedi/drivers/amplc_pci263.c
@@ -37,8 +37,6 @@ The state of the outputs can be read.
#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,
@@ -85,7 +83,7 @@ static int pci263_auto_attach(struct comedi_device *dev,
}
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,
@@ -105,7 +103,7 @@ static int amplc_pci263_pci_probe(struct pci_dev *dev,
}
static struct pci_driver amplc_pci263_pci_driver = {
- .name = PCI263_DRIVER_NAME,
+ .name = "amplc_pci263",
.id_table = pci263_pci_table,
.probe = &amplc_pci263_pci_probe,
.remove = comedi_pci_auto_unconfig,
diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c
index adf7cb7086cc..7c2276a086ac 100644
--- a/drivers/staging/comedi/drivers/unioxx5.c
+++ b/drivers/staging/comedi/drivers/unioxx5.c
@@ -43,7 +43,6 @@ Devices: [Fastwel] UNIOxx-5 (unioxx5),
#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
@@ -496,7 +495,7 @@ static void unioxx5_detach(struct comedi_device *dev)
}
static struct comedi_driver unioxx5_driver = {
- .driver_name = DRIVER_NAME,
+ .driver_name = "unioxx5",
.module = THIS_MODULE,
.attach = unioxx5_attach,
.detach = unioxx5_detach,