summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH Hartley Sweeten <hsweeten@visionengravers.com>2013-04-10 03:33:23 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-04-11 23:47:55 +0400
commitce1edddd8cd1bfce31b7387aba4e755786efc1cc (patch)
treecd2af3dfddb39e2d0d6159060f6de9446c89139e
parent3cbc2810a60bc4c96aa583e1ce8699fb5acf8e90 (diff)
downloadlinux-ce1edddd8cd1bfce31b7387aba4e755786efc1cc.tar.xz
staging: comedi: ni_at_ao: cleanup dev->board_name usage
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>
-rw-r--r--drivers/staging/comedi/drivers/ni_at_ao.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/ni_at_ao.c b/drivers/staging/comedi/drivers/ni_at_ao.c
index 907f65cdbdc0..be4e1e111480 100644
--- a/drivers/staging/comedi/drivers/ni_at_ao.c
+++ b/drivers/staging/comedi/drivers/ni_at_ao.c
@@ -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;