[PATCH 63/79] staging: comedi: poc: cleanup dev->board_name usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <hsweeten@xxxxxxxxxxxxxxxxxxx>
Cc: Ian Abbott <abbotti@xxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 drivers/staging/comedi/drivers/poc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/poc.c b/drivers/staging/comedi/drivers/poc.c
index d7842c9..8a34f6f 100644
--- a/drivers/staging/comedi/drivers/poc.c
+++ b/drivers/staging/comedi/drivers/poc.c
@@ -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;
-- 
1.8.1.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux