Skip to content

Commit

Permalink
staging: comedi: ni_at_ao: cleanup dev->board_name usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 11, 2013
1 parent 3cbc281 commit ce1eddd
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions drivers/staging/comedi/drivers/ni_at_ao.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ce1eddd

Please sign in to comment.