]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging: comedi: ni_at_ao: cleanup dev->board_name usage
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 9 Apr 2013 23:33:23 +0000 (16:33 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 11 Apr 2013 19:47:55 +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/ni_at_ao.c

index 907f65cdbdc0bc60a5504941f457f24370f737cf..be4e1e111480cab4d7442c037fbf79b7165e2f12 100644 (file)
@@ -348,14 +348,12 @@ static int atao_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        printk(KERN_INFO "comedi%d: ni_at_ao: 0x%04lx", dev->minor, iobase);
 
-       if (!request_region(iobase, ATAO_SIZE, "ni_at_ao")) {
+       if (!request_region(iobase, ATAO_SIZE, dev->board_name)) {
                printk(" I/O port conflict\n");
                return -EIO;
        }
        dev->iobase = iobase;
 
-       dev->board_name = board->name;
-
        devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL);
        if (!devpriv)
                return -ENOMEM;