From 61f9eb9a01b9c817d831b9e0bafd3b680ad94467 Mon Sep 17 00:00:00 2001 From: H Hartley Sweeten Date: Tue, 9 Apr 2013 16:25:25 -0700 Subject: [PATCH] staging: comedi: ni_atmio16d: 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 --- drivers/staging/comedi/drivers/ni_atmio16d.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/staging/comedi/drivers/ni_atmio16d.c b/drivers/staging/comedi/drivers/ni_atmio16d.c index 4a17494f55e..faf3c371b3b 100644 --- a/drivers/staging/comedi/drivers/ni_atmio16d.c +++ b/drivers/staging/comedi/drivers/ni_atmio16d.c @@ -647,14 +647,12 @@ static int atmio16d_attach(struct comedi_device *dev, /* make sure the address range is free and allocate it */ iobase = it->options[0]; printk(KERN_INFO "comedi%d: atmio16d: 0x%04lx ", dev->minor, iobase); - if (!request_region(iobase, ATMIO16D_SIZE, "ni_atmio16d")) { + if (!request_region(iobase, ATMIO16D_SIZE, dev->board_name)) { printk("I/O port conflict\n"); return -EIO; } dev->iobase = iobase; - dev->board_name = board->name; - ret = comedi_alloc_subdevices(dev, 4); if (ret) return ret; -- 2.46.0