]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: comedi: pcmad: cleanup dev->board_name usage
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:26:22 +0000 (16:26 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:47:52 +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/pcmad.c

index 13e84215fac3254afcb242e75792fbca99d46002..130e9291400e6775310293b965f99c478cf97b82 100644 (file)
@@ -111,7 +111,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        iobase = it->options[0];
        printk(KERN_INFO "comedi%d: pcmad: 0x%04lx ", dev->minor, iobase);
-       if (!request_region(iobase, PCMAD_SIZE, "pcmad")) {
+       if (!request_region(iobase, PCMAD_SIZE, dev->board_name)) {
                printk(KERN_CONT "I/O port conflict\n");
                return -EIO;
        }
@@ -127,8 +127,6 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                return -ENOMEM;
        dev->private = devpriv;
 
-       dev->board_name = board->name;
-
        s = &dev->subdevices[0];
        s->type = COMEDI_SUBD_AI;
        s->subdev_flags = SDF_READABLE | AREF_GROUND;