Skip to content

Commit

Permalink
staging: comedi: pcl730: 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 99c671a commit 3f7b35c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/staging/comedi/drivers/pcl730.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,10 @@ static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it)
iorange = board->io_range;
printk(KERN_INFO "comedi%d: pcl730: board=%s 0x%04lx ", dev->minor,
board->name, iobase);
if (!request_region(iobase, iorange, "pcl730")) {
if (!request_region(iobase, iorange, dev->board_name)) {
printk("I/O port conflict\n");
return -EIO;
}
dev->board_name = board->name;
dev->iobase = iobase;
dev->irq = 0;

Expand Down

0 comments on commit 3f7b35c

Please sign in to comment.