staging: comedi: drivers: remove unnecessary DRIVER_NAME defines
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Sat, 19 Jul 2014 00:01:23 +0000 (17:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jul 2014 21:43:01 +0000 (14:43 -0700)
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>
drivers/staging/comedi/drivers/amplc_pc236.c
drivers/staging/comedi/drivers/amplc_pc263.c
drivers/staging/comedi/drivers/amplc_pci224.c
drivers/staging/comedi/drivers/amplc_pci263.c
drivers/staging/comedi/drivers/unioxx5.c

index 6089341d2135b2ee14bdb28f7a280c6dba5a1ecf..243b0f4d031219083359053314403af69841a87b 100644 (file)
@@ -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,
index c0a20dccd88ae3567dd18784022ec081bb743871..f8e551d8fd9eaa0710cfc752a1da156d503cf5e9 100644 (file)
@@ -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,
index 64a961a5643a7c894eae6cbb7283854ae1c09496..45aba1f950fc5153524a0307c1af6e1135399c01 100644 (file)
@@ -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;
        }
        /*
index 8137325004c0bbe11db638ebffda60b11251d55c..748a6b108f323cf7cbfd6981d311827a83a4d64e 100644 (file)
@@ -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,
index adf7cb7086cc12a66bfc21d804f9dfcdb48da70e..7c2276a086ac8c3e2d8a2fa4caa0f92142226453 100644 (file)
@@ -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,