diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-04-09 19:25:25 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-04-11 15:47:51 -0400 |
commit | 61f9eb9a01b9c817d831b9e0bafd3b680ad94467 (patch) | |
tree | 487835c8621e69c4a50a1af9d7452fa248215cf3 /drivers/staging | |
parent | b1bc9276047d0b410dc0676edc12ce3c31e96a36 (diff) |
staging: comedi: ni_atmio16d: 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>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/comedi/drivers/ni_atmio16d.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/staging/comedi/drivers/ni_atmio16d.c b/drivers/staging/comedi/drivers/ni_atmio16d.c index 4a17494f55ed..faf3c371b3bb 100644 --- a/drivers/staging/comedi/drivers/ni_atmio16d.c +++ b/drivers/staging/comedi/drivers/ni_atmio16d.c | |||
@@ -647,14 +647,12 @@ static int atmio16d_attach(struct comedi_device *dev, | |||
647 | /* make sure the address range is free and allocate it */ | 647 | /* make sure the address range is free and allocate it */ |
648 | iobase = it->options[0]; | 648 | iobase = it->options[0]; |
649 | printk(KERN_INFO "comedi%d: atmio16d: 0x%04lx ", dev->minor, iobase); | 649 | printk(KERN_INFO "comedi%d: atmio16d: 0x%04lx ", dev->minor, iobase); |
650 | if (!request_region(iobase, ATMIO16D_SIZE, "ni_atmio16d")) { | 650 | if (!request_region(iobase, ATMIO16D_SIZE, dev->board_name)) { |
651 | printk("I/O port conflict\n"); | 651 | printk("I/O port conflict\n"); |
652 | return -EIO; | 652 | return -EIO; |
653 | } | 653 | } |
654 | dev->iobase = iobase; | 654 | dev->iobase = iobase; |
655 | 655 | ||
656 | dev->board_name = board->name; | ||
657 | |||
658 | ret = comedi_alloc_subdevices(dev, 4); | 656 | ret = comedi_alloc_subdevices(dev, 4); |
659 | if (ret) | 657 | if (ret) |
660 | return ret; | 658 | return ret; |