From: David Schleef Date: Sat, 12 Feb 2000 02:26:20 +0000 (+0000) Subject: fixed _attach() using local variable for board number X-Git-Tag: r0_7_40~47 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a1dc16d33cdf5ad19155315e77eb038dd203d0de;p=comedi.git fixed _attach() using local variable for board number --- diff --git a/comedi/drivers/das1600.c b/comedi/drivers/das1600.c index 7a92a624..6f8881f9 100644 --- a/comedi/drivers/das1600.c +++ b/comedi/drivers/das1600.c @@ -325,12 +325,17 @@ static int das1600_attach(comedi_device * dev, comedi_devconfig * it) request_region(dev->iobase, DAS1600_BASE_SIZE, "das1600"); request_region(dev->iobase + 0x400, DAS1600_DIO_SIZE, "das1600"); - if (board == card_1601_12) { - dev->board_name = "das1601/12"; - } else if (board == card_1602_12) { - dev->board_name = "das1602/12"; - } else if (board == card_1602_16) { - dev->board_name = "das1602/16"; + switch(dev->board){ + case card_1601_12: + default: + dev->board_name = "das1601/12"; + break; + case card_1602_12: + dev->board_name = "das1601/12"; + break; + case card_1602_16: + dev->board_name = "das1602/16"; + break; } dev->n_subdevices=5;