Skip to content

Commit

Permalink
staging: comedi: acl7225b: cleanup dev->board_name usage
Browse files Browse the repository at this point in the history
The comedi core initializes the dev->board_name before calling the
driver (*attach) function. There is not reason to reinitialize it
in the driver.

Use the dev->board_name when doing the request_resource() instead
of the open-coded string.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Apr 9, 2013
1 parent 894ab19 commit 7ffb0a8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/comedi/drivers/acl7225b.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,9 +74,8 @@ static int acl7225b_attach(struct comedi_device *dev,

iobase = it->options[0];
iorange = board->io_range;
if (!request_region(iobase, iorange, "acl7225b"))
if (!request_region(iobase, iorange, dev->board_name))
return -EIO;
dev->board_name = board->name;
dev->iobase = iobase;
dev->irq = 0;

Expand Down

0 comments on commit 7ffb0a8

Please sign in to comment.