From: H Hartley Sweeten Date: Tue, 9 Apr 2013 23:18:00 +0000 (-0700) Subject: staging: comedi: dt2811: cleanup dev->board_name usage X-Git-Url: http://drtracing.org/?a=commitdiff_plain;h=3871a752ec5695d84dd9d24d55daed3b72023268;p=deliverable%2Flinux.git 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: H Hartley Sweeten Cc: Ian Abbott Cc: Greg Kroah-Hartman Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/dt2811.c b/drivers/staging/comedi/drivers/dt2811.c index f90ecf494aaf..be9aaa7e42c6 100644 --- a/drivers/staging/comedi/drivers/dt2811.c +++ b/drivers/staging/comedi/drivers/dt2811.c @@ -50,8 +50,6 @@ Configuration options: #include -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;