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

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

staging: comedi: poc: 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 70998b99
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -147,8 +147,6 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
	printk(KERN_INFO "comedi%d: poc: using %s iobase 0x%lx\n", dev->minor,
	       board->name, iobase);

	dev->board_name = board->name;

	if (iobase == 0) {
		printk(KERN_ERR "io base address required\n");
		return -EINVAL;
@@ -156,7 +154,7 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)

	iosize = board->iosize;
	/* check if io addresses are available */
	if (!request_region(iobase, iosize, "dac02")) {
	if (!request_region(iobase, iosize, dev->board_name)) {
		printk(KERN_ERR "I/O port conflict: failed to allocate ports "
			"0x%lx to 0x%lx\n", iobase, iobase + iosize - 1);
		return -EIO;