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

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

staging: comedi: dt2811: 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 5e150892
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -50,8 +50,6 @@ Configuration options:

#include <linux/ioport.h>

static const char *driver_name = "dt2811";

static const struct comedi_lrange range_dt2811_pgh_ai_5_unipolar = {
	4, {
		RANGE(0, 5),
@@ -407,13 +405,12 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it)

	printk(KERN_INFO "comedi%d: dt2811:base=0x%04lx\n", dev->minor, iobase);

	if (!request_region(iobase, DT2811_SIZE, driver_name)) {
	if (!request_region(iobase, DT2811_SIZE, dev->board_name)) {
		printk(KERN_ERR "I/O port conflict\n");
		return -EIO;
	}

	dev->iobase = iobase;
	dev->board_name = board->name;

#if 0
	outb(0, dev->iobase + DT2811_ADCSR);
@@ -449,7 +446,7 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it)
			i = inb(dev->iobase + DT2811_ADDATHI);
			printk(KERN_INFO "(irq = %d)\n", irq);
			ret = request_irq(irq, dt2811_interrupt, 0,
					  driver_name, dev);
					  dev->board_name, dev);
			if (ret < 0)
				return -EIO;
			dev->irq = irq;