From: H Hartley Sweeten Date: Tue, 9 Apr 2013 23:19:44 +0000 (-0700) Subject: staging: comedi: dt282x: cleanup dev->board_name usage X-Git-Tag: v3.10-rc1~192^2~147 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=25829c646e11dda92a5b3628b21fe852681fec44;p=~emulex%2Finfiniband.git staging: comedi: dt282x: 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/dt282x.c b/drivers/staging/comedi/drivers/dt282x.c index 821e948839a..19f0b999704 100644 --- a/drivers/staging/comedi/drivers/dt282x.c +++ b/drivers/staging/comedi/drivers/dt282x.c @@ -1125,14 +1125,12 @@ static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct comedi_subdevice *s; unsigned long iobase; - dev->board_name = board->name; - iobase = it->options[opt_iobase]; if (!iobase) iobase = 0x240; printk(KERN_INFO "comedi%d: dt282x: 0x%04lx", dev->minor, iobase); - if (!request_region(iobase, DT2821_SIZE, "dt282x")) { + if (!request_region(iobase, DT2821_SIZE, dev->board_name)) { printk(KERN_INFO " I/O port conflict\n"); return -EBUSY; } @@ -1186,7 +1184,8 @@ static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it) #endif if (irq > 0) { printk(KERN_INFO " ( irq = %d )", irq); - ret = request_irq(irq, dt282x_interrupt, 0, "dt282x", dev); + ret = request_irq(irq, dt282x_interrupt, 0, + dev->board_name, dev); if (ret < 0) { printk(KERN_ERR " failed to get irq\n"); return -EIO;