From: H Hartley Sweeten Date: Mon, 8 Apr 2013 17:57:35 +0000 (-0700) Subject: staging: comedi: remove unnecessary dev->board_name initialization X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=5993f3a2692eed3c74c86882155b8703a0060ad5;p=openwrt%2Fstaging%2Fblogic.git staging: comedi: remove unnecessary dev->board_name initialization The dev->board_name is now initialized by the comedi core before calling the(*attach) or (*auto_attach) function in a driver. As long as the driver does no additional probing, it's no longer necessary initialize the board_name. Signed-off-by: H Hartley Sweeten Reviewed-by: Ian Abbott Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/comedi/drivers/8255.c b/drivers/staging/comedi/drivers/8255.c index c7aa41ad842f..0237187389e4 100644 --- a/drivers/staging/comedi/drivers/8255.c +++ b/drivers/staging/comedi/drivers/8255.c @@ -354,8 +354,6 @@ static int dev_8255_attach(struct comedi_device *dev, unsigned long iobase; int i; - dev->board_name = "8255"; - for (i = 0; i < COMEDI_NDEVCONFOPTS; i++) { iobase = it->options[i]; if (!iobase) diff --git a/drivers/staging/comedi/drivers/addi_apci_1032.c b/drivers/staging/comedi/drivers/addi_apci_1032.c index 3d32448e4e69..3d4878facc26 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1032.c +++ b/drivers/staging/comedi/drivers/addi_apci_1032.c @@ -296,8 +296,6 @@ static int apci1032_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/addi_apci_1710.c b/drivers/staging/comedi/drivers/addi_apci_1710.c index 3640c50f2cb0..acde462a6927 100644 --- a/drivers/staging/comedi/drivers/addi_apci_1710.c +++ b/drivers/staging/comedi/drivers/addi_apci_1710.c @@ -35,8 +35,6 @@ static int apci1710_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/addi_apci_2032.c b/drivers/staging/comedi/drivers/addi_apci_2032.c index 59e092eab9f3..e5fa20aa7f2d 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2032.c +++ b/drivers/staging/comedi/drivers/addi_apci_2032.c @@ -287,8 +287,6 @@ static int apci2032_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - ret = comedi_pci_enable(dev); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/addi_apci_2200.c b/drivers/staging/comedi/drivers/addi_apci_2200.c index 0953f65ab0ad..8cad37ccf73e 100644 --- a/drivers/staging/comedi/drivers/addi_apci_2200.c +++ b/drivers/staging/comedi/drivers/addi_apci_2200.c @@ -88,8 +88,6 @@ static int apci2200_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - ret = comedi_pci_enable(dev); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/addi_apci_3501.c b/drivers/staging/comedi/drivers/addi_apci_3501.c index 75a36e364932..a0cf6ecdef0e 100644 --- a/drivers/staging/comedi/drivers/addi_apci_3501.c +++ b/drivers/staging/comedi/drivers/addi_apci_3501.c @@ -339,8 +339,6 @@ static int apci3501_auto_attach(struct comedi_device *dev, int ao_n_chan; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/adl_pci8164.c b/drivers/staging/comedi/drivers/adl_pci8164.c index 469a51d97b82..b3ec60afe3a0 100644 --- a/drivers/staging/comedi/drivers/adl_pci8164.c +++ b/drivers/staging/comedi/drivers/adl_pci8164.c @@ -78,8 +78,6 @@ static int adl_pci8164_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - ret = comedi_pci_enable(dev); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/adl_pci9111.c b/drivers/staging/comedi/drivers/adl_pci9111.c index 9c27e981db0c..99bce7c74af7 100644 --- a/drivers/staging/comedi/drivers/adl_pci9111.c +++ b/drivers/staging/comedi/drivers/adl_pci9111.c @@ -865,8 +865,6 @@ static int pci9111_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - dev_private = kzalloc(sizeof(*dev_private), GFP_KERNEL); if (!dev_private) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/adq12b.c b/drivers/staging/comedi/drivers/adq12b.c index f7950dfe2ddb..dd315972d927 100644 --- a/drivers/staging/comedi/drivers/adq12b.c +++ b/drivers/staging/comedi/drivers/adq12b.c @@ -217,8 +217,6 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it) int unipolar, differential; int ret; - dev->board_name = dev->driver->driver_name; - iobase = it->options[0]; unipolar = it->options[1]; differential = it->options[2]; diff --git a/drivers/staging/comedi/drivers/adv_pci1723.c b/drivers/staging/comedi/drivers/adv_pci1723.c index 9e81e58a6e69..ccc114d6c08b 100644 --- a/drivers/staging/comedi/drivers/adv_pci1723.c +++ b/drivers/staging/comedi/drivers/adv_pci1723.c @@ -242,8 +242,6 @@ static int pci1723_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/adv_pci1724.c b/drivers/staging/comedi/drivers/adv_pci1724.c index a33929e87a2f..e60f12578d44 100644 --- a/drivers/staging/comedi/drivers/adv_pci1724.c +++ b/drivers/staging/comedi/drivers/adv_pci1724.c @@ -358,8 +358,6 @@ static int adv_pci1724_auto_attach(struct comedi_device *dev, devpriv->gain_value[i] = -1; } - dev->board_name = dev->driver->driver_name; - retval = comedi_pci_enable(dev); if (retval) return retval; diff --git a/drivers/staging/comedi/drivers/aio_iiro_16.c b/drivers/staging/comedi/drivers/aio_iiro_16.c index 64c1ae58ce7f..29aba2bb396f 100644 --- a/drivers/staging/comedi/drivers/aio_iiro_16.c +++ b/drivers/staging/comedi/drivers/aio_iiro_16.c @@ -83,8 +83,6 @@ static int aio_iiro_16_attach(struct comedi_device *dev, printk(KERN_INFO "comedi%d: aio_iiro_16: ", dev->minor); - dev->board_name = dev->driver->driver_name; - iobase = it->options[0]; if (!request_region(iobase, AIO_IIRO_16_SIZE, dev->board_name)) { diff --git a/drivers/staging/comedi/drivers/c6xdigio.c b/drivers/staging/comedi/drivers/c6xdigio.c index 070037c22db7..816b879c7e19 100644 --- a/drivers/staging/comedi/drivers/c6xdigio.c +++ b/drivers/staging/comedi/drivers/c6xdigio.c @@ -431,7 +431,6 @@ static int c6xdigio_attach(struct comedi_device *dev, return -EIO; } dev->iobase = iobase; - dev->board_name = "c6xdigio"; result = comedi_alloc_subdevices(dev, 2); if (result) diff --git a/drivers/staging/comedi/drivers/cb_pcimdas.c b/drivers/staging/comedi/drivers/cb_pcimdas.c index f6d99a3a972e..29813c9d4a2a 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdas.c +++ b/drivers/staging/comedi/drivers/cb_pcimdas.c @@ -215,8 +215,6 @@ static int cb_pcimdas_auto_attach(struct comedi_device *dev, unsigned long iobase_8255; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/cb_pcimdda.c b/drivers/staging/comedi/drivers/cb_pcimdda.c index d00f7f629d36..f7d1136be652 100644 --- a/drivers/staging/comedi/drivers/cb_pcimdda.c +++ b/drivers/staging/comedi/drivers/cb_pcimdda.c @@ -161,8 +161,6 @@ static int cb_pcimdda_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/comedi_parport.c b/drivers/staging/comedi/drivers/comedi_parport.c index 76d59dcbea07..e392f6837ab1 100644 --- a/drivers/staging/comedi/drivers/comedi_parport.c +++ b/drivers/staging/comedi/drivers/comedi_parport.c @@ -266,8 +266,6 @@ static int parport_attach(struct comedi_device *dev, unsigned long iobase; struct comedi_subdevice *s; - dev->board_name = dev->driver->driver_name; - iobase = it->options[0]; if (!request_region(iobase, PARPORT_SIZE, dev->board_name)) { dev_err(dev->class_dev, "I/O port conflict\n"); diff --git a/drivers/staging/comedi/drivers/comedi_test.c b/drivers/staging/comedi/drivers/comedi_test.c index 270fea5c6b51..c1d8e86f53a2 100644 --- a/drivers/staging/comedi/drivers/comedi_test.c +++ b/drivers/staging/comedi/drivers/comedi_test.c @@ -384,8 +384,6 @@ static int waveform_attach(struct comedi_device *dev, int i; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/contec_pci_dio.c b/drivers/staging/comedi/drivers/contec_pci_dio.c index da0be62aef60..f2230bfd4eb9 100644 --- a/drivers/staging/comedi/drivers/contec_pci_dio.c +++ b/drivers/staging/comedi/drivers/contec_pci_dio.c @@ -77,8 +77,6 @@ static int contec_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - ret = comedi_pci_enable(dev); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/das16m1.c b/drivers/staging/comedi/drivers/das16m1.c index 7ba8fc7a02f6..3c37a660a154 100644 --- a/drivers/staging/comedi/drivers/das16m1.c +++ b/drivers/staging/comedi/drivers/das16m1.c @@ -573,8 +573,6 @@ static int das16m1_attach(struct comedi_device *dev, unsigned int irq; unsigned long iobase; - dev->board_name = dev->driver->driver_name; - iobase = it->options[0]; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); diff --git a/drivers/staging/comedi/drivers/das6402.c b/drivers/staging/comedi/drivers/das6402.c index 2efddb89bbcb..c2f20c281d48 100644 --- a/drivers/staging/comedi/drivers/das6402.c +++ b/drivers/staging/comedi/drivers/das6402.c @@ -288,8 +288,6 @@ static int das6402_attach(struct comedi_device *dev, int ret; struct comedi_subdevice *s; - dev->board_name = "das6402"; - iobase = it->options[0]; if (iobase == 0) iobase = 0x300; diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c index 9e2124179a0c..ca07e54de2ee 100644 --- a/drivers/staging/comedi/drivers/dmm32at.c +++ b/drivers/staging/comedi/drivers/dmm32at.c @@ -698,8 +698,6 @@ static int dmm32at_attach(struct comedi_device *dev, unsigned long iobase; unsigned int irq; - dev->board_name = dev->driver->driver_name; - iobase = it->options[0]; irq = it->options[1]; diff --git a/drivers/staging/comedi/drivers/dt2814.c b/drivers/staging/comedi/drivers/dt2814.c index e520dbaaa194..e4d629e6d06e 100644 --- a/drivers/staging/comedi/drivers/dt2814.c +++ b/drivers/staging/comedi/drivers/dt2814.c @@ -255,7 +255,6 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it) return -EIO; } dev->iobase = iobase; - dev->board_name = "dt2814"; outb(0, dev->iobase + DT2814_CSR); udelay(100); diff --git a/drivers/staging/comedi/drivers/dt2815.c b/drivers/staging/comedi/drivers/dt2815.c index 10828fc7e16c..ad18b1ac8d32 100644 --- a/drivers/staging/comedi/drivers/dt2815.c +++ b/drivers/staging/comedi/drivers/dt2815.c @@ -171,7 +171,6 @@ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it) } dev->iobase = iobase; - dev->board_name = "dt2815"; ret = comedi_alloc_subdevices(dev, 1); if (ret) diff --git a/drivers/staging/comedi/drivers/dt2817.c b/drivers/staging/comedi/drivers/dt2817.c index 502e42e0753e..0dd6dd0f2a3d 100644 --- a/drivers/staging/comedi/drivers/dt2817.c +++ b/drivers/staging/comedi/drivers/dt2817.c @@ -135,7 +135,6 @@ static int dt2817_attach(struct comedi_device *dev, struct comedi_devconfig *it) return -EIO; } dev->iobase = iobase; - dev->board_name = "dt2817"; ret = comedi_alloc_subdevices(dev, 1); if (ret) diff --git a/drivers/staging/comedi/drivers/dt9812.c b/drivers/staging/comedi/drivers/dt9812.c index 9ca3488da4df..81eb5ed6ec97 100644 --- a/drivers/staging/comedi/drivers/dt9812.c +++ b/drivers/staging/comedi/drivers/dt9812.c @@ -1012,8 +1012,6 @@ static int dt9812_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct comedi_subdevice *s; int ret; - dev->board_name = "dt9812"; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/dyna_pci10xx.c b/drivers/staging/comedi/drivers/dyna_pci10xx.c index 17f9ec2a9072..93ec8e492ccc 100644 --- a/drivers/staging/comedi/drivers/dyna_pci10xx.c +++ b/drivers/staging/comedi/drivers/dyna_pci10xx.c @@ -187,8 +187,6 @@ static int dyna_pci10xx_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/fl512.c b/drivers/staging/comedi/drivers/fl512.c index 019c96eda6fd..07f9d6760364 100644 --- a/drivers/staging/comedi/drivers/fl512.c +++ b/drivers/staging/comedi/drivers/fl512.c @@ -125,7 +125,6 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it) return -EIO; } dev->iobase = iobase; - dev->board_name = "fl512"; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) diff --git a/drivers/staging/comedi/drivers/icp_multi.c b/drivers/staging/comedi/drivers/icp_multi.c index f29a797fd9d5..2bd916e4bfe8 100644 --- a/drivers/staging/comedi/drivers/icp_multi.c +++ b/drivers/staging/comedi/drivers/icp_multi.c @@ -503,8 +503,6 @@ static int icp_multi_auto_attach(struct comedi_device *dev, resource_size_t iobase; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/ii_pci20kc.c b/drivers/staging/comedi/drivers/ii_pci20kc.c index 93584e2be35a..03719f256d18 100644 --- a/drivers/staging/comedi/drivers/ii_pci20kc.c +++ b/drivers/staging/comedi/drivers/ii_pci20kc.c @@ -212,7 +212,6 @@ static int pci20xxx_attach(struct comedi_device *dev, dev->private = devpriv; devpriv->ioaddr = (void __iomem *)(unsigned long)it->options[0]; - dev->board_name = "pci20kc"; /* Check PCI-20001 C-2A Carrier Board ID */ if ((readb(devpriv->ioaddr) & PCI20000_ID) != PCI20000_ID) { diff --git a/drivers/staging/comedi/drivers/jr3_pci.c b/drivers/staging/comedi/drivers/jr3_pci.c index f21ebb536a2d..653c5c3891e1 100644 --- a/drivers/staging/comedi/drivers/jr3_pci.c +++ b/drivers/staging/comedi/drivers/jr3_pci.c @@ -700,7 +700,6 @@ static int jr3_pci_auto_attach(struct comedi_device *dev, return -EINVAL; break; } - dev->board_name = "jr3_pci"; result = comedi_pci_enable(dev); if (result) diff --git a/drivers/staging/comedi/drivers/ke_counter.c b/drivers/staging/comedi/drivers/ke_counter.c index bca29e5f4fc5..e0e64752e310 100644 --- a/drivers/staging/comedi/drivers/ke_counter.c +++ b/drivers/staging/comedi/drivers/ke_counter.c @@ -96,8 +96,6 @@ static int cnt_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - ret = comedi_pci_enable(dev); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/mpc624.c b/drivers/staging/comedi/drivers/mpc624.c index 67dc5ad81b0d..3b7a53f8a235 100644 --- a/drivers/staging/comedi/drivers/mpc624.c +++ b/drivers/staging/comedi/drivers/mpc624.c @@ -296,7 +296,6 @@ static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it) } dev->iobase = iobase; - dev->board_name = "mpc624"; devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) diff --git a/drivers/staging/comedi/drivers/multiq3.c b/drivers/staging/comedi/drivers/multiq3.c index 1f5f402f3d17..fe94a62de438 100644 --- a/drivers/staging/comedi/drivers/multiq3.c +++ b/drivers/staging/comedi/drivers/multiq3.c @@ -252,7 +252,6 @@ static int multiq3_attach(struct comedi_device *dev, dev->minor, irq); else printk(KERN_WARNING "comedi%d: no irq\n", dev->minor); - dev->board_name = "multiq3"; result = comedi_alloc_subdevices(dev, 5); if (result) diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c index 9cc6092eacdd..d067ef70e194 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@ -202,8 +202,6 @@ static int daq700_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - link->config_flags |= CONF_AUTO_SET_IO; ret = comedi_pcmcia_enable(dev, NULL); if (ret) diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c index e1cc9d01f200..c17ffe3cf5c4 100644 --- a/drivers/staging/comedi/drivers/ni_daq_dio24.c +++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c @@ -52,8 +52,6 @@ static int dio24_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - link->config_flags |= CONF_AUTO_SET_IO; ret = comedi_pcmcia_enable(dev, NULL); if (ret) diff --git a/drivers/staging/comedi/drivers/pcl725.c b/drivers/staging/comedi/drivers/pcl725.c index 21fbc1ae1e73..3cd5e7f04f42 100644 --- a/drivers/staging/comedi/drivers/pcl725.c +++ b/drivers/staging/comedi/drivers/pcl725.c @@ -54,7 +54,6 @@ static int pcl725_attach(struct comedi_device *dev, struct comedi_devconfig *it) printk("I/O port conflict\n"); return -EIO; } - dev->board_name = "pcl725"; dev->iobase = iobase; dev->irq = 0; diff --git a/drivers/staging/comedi/drivers/pcm3724.c b/drivers/staging/comedi/drivers/pcm3724.c index 5f062df1ead4..d78aeebd17b5 100644 --- a/drivers/staging/comedi/drivers/pcm3724.c +++ b/drivers/staging/comedi/drivers/pcm3724.c @@ -230,8 +230,6 @@ static int pcm3724_attach(struct comedi_device *dev, unsigned int iorange; int ret, i; - dev->board_name = dev->driver->driver_name; - iobase = it->options[0]; iorange = PCM3724_SIZE; diff --git a/drivers/staging/comedi/drivers/pcm3730.c b/drivers/staging/comedi/drivers/pcm3730.c index 067f14d22610..d049194f366a 100644 --- a/drivers/staging/comedi/drivers/pcm3730.c +++ b/drivers/staging/comedi/drivers/pcm3730.c @@ -64,7 +64,6 @@ static int pcm3730_attach(struct comedi_device *dev, return -EIO; } dev->iobase = iobase; - dev->board_name = "pcm3730"; dev->iobase = dev->iobase; dev->irq = 0; diff --git a/drivers/staging/comedi/drivers/pcmda12.c b/drivers/staging/comedi/drivers/pcmda12.c index 13f79f49748a..64b76e48c290 100644 --- a/drivers/staging/comedi/drivers/pcmda12.c +++ b/drivers/staging/comedi/drivers/pcmda12.c @@ -168,8 +168,6 @@ static int pcmda12_attach(struct comedi_device *dev, } dev->iobase = iobase; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/pcmmio.c b/drivers/staging/comedi/drivers/pcmmio.c index 5fa1fe08eb97..a342e3799c51 100644 --- a/drivers/staging/comedi/drivers/pcmmio.c +++ b/drivers/staging/comedi/drivers/pcmmio.c @@ -1038,8 +1038,6 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it) unsigned int irq[MAX_ASICS]; int ret; - dev->board_name = dev->driver->driver_name; - iobase = it->options[0]; irq[0] = it->options[1]; diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c index 911eb6b32296..e092ce87722e 100644 --- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c +++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c @@ -715,8 +715,6 @@ static int daqp_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/rti802.c b/drivers/staging/comedi/drivers/rti802.c index 2185ca1bcf02..1440162c8411 100644 --- a/drivers/staging/comedi/drivers/rti802.c +++ b/drivers/staging/comedi/drivers/rti802.c @@ -103,8 +103,6 @@ static int rti802_attach(struct comedi_device *dev, struct comedi_devconfig *it) } dev->iobase = iobase; - dev->board_name = "rti802"; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/s526.c b/drivers/staging/comedi/drivers/s526.c index 39232b359453..b490b47b0bb8 100644 --- a/drivers/staging/comedi/drivers/s526.c +++ b/drivers/staging/comedi/drivers/s526.c @@ -555,8 +555,6 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it) int iobase; int ret; - dev->board_name = dev->driver->driver_name; - iobase = it->options[0]; if (!iobase || !request_region(iobase, S526_IOSIZE, dev->board_name)) { comedi_error(dev, "I/O port conflict"); diff --git a/drivers/staging/comedi/drivers/s626.c b/drivers/staging/comedi/drivers/s626.c index 02f9406f8f09..b6c7cb980d33 100644 --- a/drivers/staging/comedi/drivers/s626.c +++ b/drivers/staging/comedi/drivers/s626.c @@ -2590,8 +2590,6 @@ static int s626_auto_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/serial2002.c b/drivers/staging/comedi/drivers/serial2002.c index 21e3cf162636..8900086374db 100644 --- a/drivers/staging/comedi/drivers/serial2002.c +++ b/drivers/staging/comedi/drivers/serial2002.c @@ -724,8 +724,6 @@ static int serial2002_attach(struct comedi_device *dev, struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); if (!devpriv) return -ENOMEM; diff --git a/drivers/staging/comedi/drivers/skel.c b/drivers/staging/comedi/drivers/skel.c index 6fb7d5d22094..6dc77fc07220 100644 --- a/drivers/staging/comedi/drivers/skel.c +++ b/drivers/staging/comedi/drivers/skel.c @@ -481,10 +481,12 @@ static int skel_attach(struct comedi_device *dev, struct comedi_devconfig *it) thisboard = comedi_board(dev); -/* - * Initialize dev->board_name. - */ - dev->board_name = thisboard->name; + /* + * The dev->board_name is initialized by the comedi core before + * calling the (*attach) function. It can be optionally set by + * the driver if additional probing has been done. + */ + /* dev->board_name = thisboard->name; */ /* Allocate the private data */ devpriv = kzalloc(sizeof(*devpriv), GFP_KERNEL); diff --git a/drivers/staging/comedi/drivers/ssv_dnp.c b/drivers/staging/comedi/drivers/ssv_dnp.c index afa4016f906a..a76df092a57b 100644 --- a/drivers/staging/comedi/drivers/ssv_dnp.c +++ b/drivers/staging/comedi/drivers/ssv_dnp.c @@ -167,8 +167,6 @@ static int dnp_attach(struct comedi_device *dev, struct comedi_devconfig *it) struct comedi_subdevice *s; int ret; - dev->board_name = dev->driver->driver_name; - ret = comedi_alloc_subdevices(dev, 1); if (ret) return ret; diff --git a/drivers/staging/comedi/drivers/unioxx5.c b/drivers/staging/comedi/drivers/unioxx5.c index 74b974bf1032..fdeec4b5076b 100644 --- a/drivers/staging/comedi/drivers/unioxx5.c +++ b/drivers/staging/comedi/drivers/unioxx5.c @@ -442,7 +442,6 @@ static int unioxx5_attach(struct comedi_device *dev, iobase = it->options[0]; - dev->board_name = DRIVER_NAME; dev->iobase = iobase; iobase += UNIOXX5_SUBDEV_BASE; diff --git a/drivers/staging/comedi/drivers/usbdux.c b/drivers/staging/comedi/drivers/usbdux.c index 148ecfcc5dd5..6f5da67e26cb 100644 --- a/drivers/staging/comedi/drivers/usbdux.c +++ b/drivers/staging/comedi/drivers/usbdux.c @@ -2207,8 +2207,6 @@ static int usbdux_attach_common(struct comedi_device *dev, /* pointer back to the corresponding comedi device */ udev->comedidev = dev; - dev->board_name = "usbdux"; - /* set number of subdevices */ if (udev->high_speed) { /* with pwm */ diff --git a/drivers/staging/comedi/drivers/usbduxfast.c b/drivers/staging/comedi/drivers/usbduxfast.c index 1ba0e3df492d..7f95af33085d 100644 --- a/drivers/staging/comedi/drivers/usbduxfast.c +++ b/drivers/staging/comedi/drivers/usbduxfast.c @@ -1387,7 +1387,7 @@ static int usbduxfast_attach_common(struct comedi_device *dev, down(&udfs->sem); /* pointer back to the corresponding comedi device */ udfs->comedidev = dev; - dev->board_name = "usbduxfast"; + ret = comedi_alloc_subdevices(dev, 1); if (ret) { up(&udfs->sem); diff --git a/drivers/staging/comedi/drivers/usbduxsigma.c b/drivers/staging/comedi/drivers/usbduxsigma.c index 1c2bfb4423e3..d3bc1b9910a7 100644 --- a/drivers/staging/comedi/drivers/usbduxsigma.c +++ b/drivers/staging/comedi/drivers/usbduxsigma.c @@ -2205,7 +2205,7 @@ static int usbduxsigma_attach_common(struct comedi_device *dev, down(&uds->sem); /* pointer back to the corresponding comedi device */ uds->comedidev = dev; - dev->board_name = "usbduxsigma"; + /* set number of subdevices */ if (uds->high_speed) n_subdevs = 4; /* with pwm */