From: H Hartley Sweeten Date: Tue, 9 Apr 2013 01:15:46 +0000 (-0700) Subject: staging: comedi: rti800: cleanup dev->board_name usage X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=7b2234df5e2ec3fbb206fc4442099faf5859a177;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: rti800: cleanup dev->board_name usage The comedi core initializes the dev->board_name before calling the driver (*attach) function. There is not reason to reinitialize it in the driver. Use the dev->board_name when doing the request_{region,irq}() instead of the open-coded string. Signed-off-by: H Hartley Sweeten Cc: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/rti800.c b/drivers/staging/comedi/drivers/rti800.c index fdfbf412cc73..eac727e2dae2 100644 --- a/drivers/staging/comedi/drivers/rti800.c +++ b/drivers/staging/comedi/drivers/rti800.c @@ -309,7 +309,7 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct comedi_subdevice *s; iobase = it->options[0]; - if (!request_region(iobase, RTI800_SIZE, "rti800")) + if (!request_region(iobase, RTI800_SIZE, dev->board_name)) return -EIO; dev->iobase = iobase; @@ -319,14 +319,13 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it) irq = it->options[1]; if (irq) { - ret = request_irq(irq, rti800_interrupt, 0, "rti800", dev); + ret = request_irq(irq, rti800_interrupt, 0, dev->board_name, + dev); if (ret < 0) return ret; dev->irq = irq; } - dev->board_name = board->name; - ret = comedi_alloc_subdevices(dev, 4); if (ret) return ret;