Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 61f9eb9a authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

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: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b1bc9276
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -647,14 +647,12 @@ static int atmio16d_attach(struct comedi_device *dev,
	/* make sure the address range is free and allocate it */
	iobase = it->options[0];
	printk(KERN_INFO "comedi%d: atmio16d: 0x%04lx ", dev->minor, iobase);
	if (!request_region(iobase, ATMIO16D_SIZE, "ni_atmio16d")) {
	if (!request_region(iobase, ATMIO16D_SIZE, dev->board_name)) {
		printk("I/O port conflict\n");
		return -EIO;
	}
	dev->iobase = iobase;

	dev->board_name = board->name;

	ret = comedi_alloc_subdevices(dev, 4);
	if (ret)
		return ret;