]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
staging: comedi: dt2811: cleanup dev->board_name usage
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:18:00 +0000 (16:18 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:47:39 +0000 (12:47 -0700)
This legacy driver does no additional probing so the dev->board_name
will already be properly initialized by the comedi core before calling
the (*attach) function.

Remove the unnecessary initialization of dev->board_name and use it
when requesting the resources instead of the open-coded strings.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/dt2811.c

index f90ecf494aafd7005b415e35c9023ab5267a3f44..be9aaa7e42c65fe913630aac16a1645204cfb20d 100644 (file)
@@ -50,8 +50,6 @@ Configuration options:
 
 #include <linux/ioport.h>
 
-static const char *driver_name = "dt2811";
-
 static const struct comedi_lrange range_dt2811_pgh_ai_5_unipolar = {
        4, {
                RANGE(0, 5),
@@ -407,13 +405,12 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        printk(KERN_INFO "comedi%d: dt2811:base=0x%04lx\n", dev->minor, iobase);
 
-       if (!request_region(iobase, DT2811_SIZE, driver_name)) {
+       if (!request_region(iobase, DT2811_SIZE, dev->board_name)) {
                printk(KERN_ERR "I/O port conflict\n");
                return -EIO;
        }
 
        dev->iobase = iobase;
-       dev->board_name = board->name;
 
 #if 0
        outb(0, dev->iobase + DT2811_ADCSR);
@@ -449,7 +446,7 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                        i = inb(dev->iobase + DT2811_ADDATHI);
                        printk(KERN_INFO "(irq = %d)\n", irq);
                        ret = request_irq(irq, dt2811_interrupt, 0,
-                                         driver_name, dev);
+                                         dev->board_name, dev);
                        if (ret < 0)
                                return -EIO;
                        dev->irq = irq;