staging: comedi: export alloc_subdevices as comedi_alloc_subdevices
authorH Hartley Sweeten <hartleys@visionengravers.com>
Tue, 12 Jun 2012 00:45:15 +0000 (17:45 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Jun 2012 18:14:33 +0000 (11:14 -0700)
Move the inline alloc_subdevices() function from comedidev.h
to drivers.c and rename it to comedi_alloc_subdevices(). The
function is large enough to warrant being an exported symbol
rather than being an inline in every driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
105 files changed:
drivers/staging/comedi/comedidev.h
drivers/staging/comedi/drivers.c
drivers/staging/comedi/drivers/8255.c
drivers/staging/comedi/drivers/acl7225b.c
drivers/staging/comedi/drivers/addi-data/addi_common.c
drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c
drivers/staging/comedi/drivers/adl_pci6208.c
drivers/staging/comedi/drivers/adl_pci7230.c
drivers/staging/comedi/drivers/adl_pci7296.c
drivers/staging/comedi/drivers/adl_pci7432.c
drivers/staging/comedi/drivers/adl_pci8164.c
drivers/staging/comedi/drivers/adl_pci9111.c
drivers/staging/comedi/drivers/adl_pci9118.c
drivers/staging/comedi/drivers/adq12b.c
drivers/staging/comedi/drivers/adv_pci1710.c
drivers/staging/comedi/drivers/adv_pci1723.c
drivers/staging/comedi/drivers/adv_pci_dio.c
drivers/staging/comedi/drivers/aio_aio12_8.c
drivers/staging/comedi/drivers/aio_iiro_16.c
drivers/staging/comedi/drivers/amplc_dio200.c
drivers/staging/comedi/drivers/amplc_pc236.c
drivers/staging/comedi/drivers/amplc_pc263.c
drivers/staging/comedi/drivers/amplc_pci224.c
drivers/staging/comedi/drivers/amplc_pci230.c
drivers/staging/comedi/drivers/c6xdigio.c
drivers/staging/comedi/drivers/cb_das16_cs.c
drivers/staging/comedi/drivers/cb_pcidas.c
drivers/staging/comedi/drivers/cb_pcidas64.c
drivers/staging/comedi/drivers/cb_pcidda.c
drivers/staging/comedi/drivers/cb_pcidio.c
drivers/staging/comedi/drivers/cb_pcimdas.c
drivers/staging/comedi/drivers/cb_pcimdda.c
drivers/staging/comedi/drivers/comedi_bond.c
drivers/staging/comedi/drivers/comedi_parport.c
drivers/staging/comedi/drivers/comedi_test.c
drivers/staging/comedi/drivers/contec_pci_dio.c
drivers/staging/comedi/drivers/daqboard2000.c
drivers/staging/comedi/drivers/das08.c
drivers/staging/comedi/drivers/das16.c
drivers/staging/comedi/drivers/das16m1.c
drivers/staging/comedi/drivers/das1800.c
drivers/staging/comedi/drivers/das6402.c
drivers/staging/comedi/drivers/das800.c
drivers/staging/comedi/drivers/dmm32at.c
drivers/staging/comedi/drivers/dt2801.c
drivers/staging/comedi/drivers/dt2811.c
drivers/staging/comedi/drivers/dt2814.c
drivers/staging/comedi/drivers/dt2815.c
drivers/staging/comedi/drivers/dt2817.c
drivers/staging/comedi/drivers/dt282x.c
drivers/staging/comedi/drivers/dt3000.c
drivers/staging/comedi/drivers/dt9812.c
drivers/staging/comedi/drivers/dyna_pci10xx.c
drivers/staging/comedi/drivers/fl512.c
drivers/staging/comedi/drivers/gsc_hpdi.c
drivers/staging/comedi/drivers/icp_multi.c
drivers/staging/comedi/drivers/ii_pci20kc.c
drivers/staging/comedi/drivers/jr3_pci.c
drivers/staging/comedi/drivers/ke_counter.c
drivers/staging/comedi/drivers/me4000.c
drivers/staging/comedi/drivers/me_daq.c
drivers/staging/comedi/drivers/mpc624.c
drivers/staging/comedi/drivers/mpc8260cpm.c
drivers/staging/comedi/drivers/multiq3.c
drivers/staging/comedi/drivers/ni_6527.c
drivers/staging/comedi/drivers/ni_65xx.c
drivers/staging/comedi/drivers/ni_660x.c
drivers/staging/comedi/drivers/ni_670x.c
drivers/staging/comedi/drivers/ni_at_a2150.c
drivers/staging/comedi/drivers/ni_at_ao.c
drivers/staging/comedi/drivers/ni_atmio16d.c
drivers/staging/comedi/drivers/ni_daq_700.c
drivers/staging/comedi/drivers/ni_daq_dio24.c
drivers/staging/comedi/drivers/ni_labpc.c
drivers/staging/comedi/drivers/ni_mio_common.c
drivers/staging/comedi/drivers/ni_pcidio.c
drivers/staging/comedi/drivers/pcl711.c
drivers/staging/comedi/drivers/pcl724.c
drivers/staging/comedi/drivers/pcl725.c
drivers/staging/comedi/drivers/pcl726.c
drivers/staging/comedi/drivers/pcl730.c
drivers/staging/comedi/drivers/pcl812.c
drivers/staging/comedi/drivers/pcl816.c
drivers/staging/comedi/drivers/pcl818.c
drivers/staging/comedi/drivers/pcm3724.c
drivers/staging/comedi/drivers/pcm3730.c
drivers/staging/comedi/drivers/pcmad.c
drivers/staging/comedi/drivers/pcmda12.c
drivers/staging/comedi/drivers/pcmmio.c
drivers/staging/comedi/drivers/pcmuio.c
drivers/staging/comedi/drivers/poc.c
drivers/staging/comedi/drivers/quatech_daqp_cs.c
drivers/staging/comedi/drivers/rtd520.c
drivers/staging/comedi/drivers/rti800.c
drivers/staging/comedi/drivers/rti802.c
drivers/staging/comedi/drivers/s526.c
drivers/staging/comedi/drivers/s626.c
drivers/staging/comedi/drivers/serial2002.c
drivers/staging/comedi/drivers/skel.c
drivers/staging/comedi/drivers/ssv_dnp.c
drivers/staging/comedi/drivers/unioxx5.c
drivers/staging/comedi/drivers/usbdux.c
drivers/staging/comedi/drivers/usbduxfast.c
drivers/staging/comedi/drivers/usbduxsigma.c
drivers/staging/comedi/drivers/vmk80xx.c

index 9cd2b51171067e5723927229419330df225e1816..bb98f82141a171c8029c619db73df09e2371ac76 100644 (file)
@@ -292,6 +292,8 @@ static inline struct comedi_subdevice *comedi_get_write_subdevice(
        return info->device->write_subdev;
 }
 
+int comedi_alloc_subdevices(struct comedi_device *, unsigned int);
+
 void comedi_device_detach(struct comedi_device *dev);
 int comedi_device_attach(struct comedi_device *dev,
                         struct comedi_devconfig *it);
@@ -413,26 +415,6 @@ struct comedi_lrange {
 
 /* some silly little inline functions */
 
-static inline int alloc_subdevices(struct comedi_device *dev,
-                                  unsigned int num_subdevices)
-{
-       unsigned i;
-
-       dev->n_subdevices = num_subdevices;
-       dev->subdevices =
-           kcalloc(num_subdevices, sizeof(struct comedi_subdevice),
-                   GFP_KERNEL);
-       if (!dev->subdevices)
-               return -ENOMEM;
-       for (i = 0; i < num_subdevices; ++i) {
-               dev->subdevices[i].device = dev;
-               dev->subdevices[i].async_dma_dir = DMA_NONE;
-               spin_lock_init(&dev->subdevices[i].spin_lock);
-               dev->subdevices[i].minor = -1;
-       }
-       return 0;
-}
-
 static inline int alloc_private(struct comedi_device *dev, int size)
 {
        dev->private = kzalloc(size, GFP_KERNEL);
index 49e53eaa8e412f12cbf257b95b7c546db18b5c96..541364782b5f692dfbb80d6d1cdc4f7e80da322f 100644 (file)
@@ -56,6 +56,27 @@ static int poll_invalid(struct comedi_device *dev, struct comedi_subdevice *s);
 
 struct comedi_driver *comedi_drivers;
 
+int comedi_alloc_subdevices(struct comedi_device *dev,
+                           unsigned int num_subdevices)
+{
+       unsigned i;
+
+       dev->n_subdevices = num_subdevices;
+       dev->subdevices =
+           kcalloc(num_subdevices, sizeof(struct comedi_subdevice),
+                   GFP_KERNEL);
+       if (!dev->subdevices)
+               return -ENOMEM;
+       for (i = 0; i < num_subdevices; ++i) {
+               dev->subdevices[i].device = dev;
+               dev->subdevices[i].async_dma_dir = DMA_NONE;
+               spin_lock_init(&dev->subdevices[i].spin_lock);
+               dev->subdevices[i].minor = -1;
+       }
+       return 0;
+}
+EXPORT_SYMBOL_GPL(comedi_alloc_subdevices);
+
 static void cleanup_device(struct comedi_device *dev)
 {
        int i;
index 27e39e4eb6b3766bcc81ea5b77eecfa0f4e7e154..875b020217774e0d5853b93d1fa8677a7f4d1eb9 100644 (file)
@@ -388,7 +388,7 @@ static int dev_8255_attach(struct comedi_device *dev,
                return -EINVAL;
        }
 
-       ret = alloc_subdevices(dev, i);
+       ret = comedi_alloc_subdevices(dev, i);
        if (ret < 0) {
                /* FIXME this printk call should give a proper message, the
                 * below line just maintains previous functionality */
index c1963add660d494368e3d37d4d5623566c67a586..3c39148c64cb5d0ea79237958132b946e2ef0d98 100644 (file)
@@ -82,7 +82,7 @@ static int acl7225b_attach(struct comedi_device *dev,
        dev->iobase = iobase;
        dev->irq = 0;
 
-       if (alloc_subdevices(dev, 3) < 0)
+       if (comedi_alloc_subdevices(dev, 3) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 44aaf8351ba3193765ec03000b888bbb7f32cc9f..274990a7cd3f98a77153e4f9606e81103bf04ecf 100644 (file)
@@ -1688,7 +1688,7 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
        } else {
                /* Update-0.7.57->0.7.68dev->n_subdevices = 7; */
                n_subdevices = 7;
-               ret = alloc_subdevices(dev, n_subdevices);
+               ret = comedi_alloc_subdevices(dev, n_subdevices);
                if (ret < 0)
                        return ret;
 
index a76ed2553fb427697eb127476a67bd93a14ab620..9632ca182d253ffb6b850da1f2c236907e1eb896 100644 (file)
@@ -63,7 +63,7 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
        int n_subdevices = 9;
 
        /* Update-0.7.57->0.7.68dev->n_subdevices = 9; */
-       ret = alloc_subdevices(dev, n_subdevices);
+       ret = comedi_alloc_subdevices(dev, n_subdevices);
        if (ret < 0)
                return;
 
index 2f48dc72b20e5bf81a1834407eb37c698a0877d1..7d26d45d07538e1743f645fe0ce2ad6a2a98e0aa 100644 (file)
@@ -301,7 +301,7 @@ static int pci6208_attach(struct comedi_device *dev,
        dev->iobase = io_base;
        dev->board_name = thisboard->name;
 
-       if (alloc_subdevices(dev, 2) < 0)
+       if (comedi_alloc_subdevices(dev, 2) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 2c8349273d7fae5f23e6e299f169ceb41607901f..5a6e6c11e7fee89163be855c75e6a4bcd8966b2a 100644 (file)
@@ -116,7 +116,7 @@ static int adl_pci7230_attach(struct comedi_device *dev,
        if (alloc_private(dev, sizeof(struct adl_pci7230_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 2) < 0)
+       if (comedi_alloc_subdevices(dev, 2) < 0)
                return -ENOMEM;
 
        devpriv->pci_dev = adl_pci7230_find_pci(dev, it);
index 0b8b2798312294903c30c8a5c8da313e160753a3..fd9b33afd45807c12500fbea4c35ee9e93d371db 100644 (file)
@@ -92,7 +92,7 @@ static int adl_pci7296_attach(struct comedi_device *dev,
        if (alloc_private(dev, sizeof(struct adl_pci7296_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
        devpriv->pci_dev = adl_pci7296_find_pci(dev, it);
index dd818f1b75ae6fdcd3dd906e3456b30826aac07d..4976a70fb1e4b93319d389301837218b565b3513 100644 (file)
@@ -125,7 +125,7 @@ static int adl_pci7432_attach(struct comedi_device *dev,
        if (alloc_private(dev, sizeof(struct adl_pci7432_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 2) < 0)
+       if (comedi_alloc_subdevices(dev, 2) < 0)
                return -ENOMEM;
 
        devpriv->pci_dev = adl_pci7432_find_pci(dev, it);
index 3447548778928ab172d6a2a299e1ab054b03c86d..78169f7d06ac4d47e93eace32701f6b174ef2cea 100644 (file)
@@ -261,7 +261,7 @@ static int adl_pci8164_attach(struct comedi_device *dev,
        if (alloc_private(dev, sizeof(struct adl_pci8164_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
        devpriv->pci_dev = adl_pci8164_find_pci(dev, it);
index 410bbf9f5a95bae75e7d5c9b65ef5fd98c97a427..cc179466dce00d4316fc326b18bdb27b8bcf1e1f 100644 (file)
@@ -1317,7 +1317,7 @@ static int pci9111_attach(struct comedi_device *dev,
 
        /*  TODO: Add external multiplexer setup (according to option[2]). */
 
-       error = alloc_subdevices(dev, 4);
+       error = comedi_alloc_subdevices(dev, 4);
        if (error < 0)
                return error;
 
index 5a5c903f5e038ed17033686289a7267fdfec20f8..ebd8b8ec8c31ff993c0e225c81233f7607d21197 100644 (file)
@@ -2268,7 +2268,7 @@ static int pci9118_attach(struct comedi_device *dev,
        pci_write_config_word(devpriv->pcidev, PCI_COMMAND, u16w | 64);
                                /* Enable parity check for parity error */
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index 1da29896741383f342977867d1e4f2639f643953..ca8892e83db1279bac73f9e9673c05116a1a693a 100644 (file)
@@ -271,7 +271,7 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
  * Allocate the subdevice structures.  alloc_subdevice() is a
  * convenient macro defined in comedidev.h.
  */
-       if (alloc_subdevices(dev, 3) < 0)
+       if (comedi_alloc_subdevices(dev, 3) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index db9f0a56f79f919e462fa1f67e00c286577709ed..be3fc4dd885968e65cabd3acff5e6361a4d715c5 100644 (file)
@@ -1433,7 +1433,7 @@ static int pci1710_attach(struct comedi_device *dev,
        if (this_board->n_counter)
                n_subdevices++;
 
-       ret = alloc_subdevices(dev, n_subdevices);
+       ret = comedi_alloc_subdevices(dev, n_subdevices);
        if (ret < 0)
                return ret;
 
index b8768b54e9430f968fb40202f0ad1a850333bcff..0aa0af4741a58c934db64a002c8608e894e00ef5 100644 (file)
@@ -365,7 +365,7 @@ static int pci1723_attach(struct comedi_device *dev,
        if (this_board->n_diochan)
                n_subdevices++;
 
-       ret = alloc_subdevices(dev, n_subdevices);
+       ret = comedi_alloc_subdevices(dev, n_subdevices);
        if (ret < 0) {
                printk(" - Allocation failed!\n");
                return ret;
index df8236c952e77e5d57d95127796888b74fc60640..0fc4f858acca5bc779f00bcb2d40b63ee2c4c699 100644 (file)
@@ -1156,7 +1156,7 @@ static int pci_dio_attach(struct comedi_device *dev,
                                n_subdevices++;
        }
 
-       ret = alloc_subdevices(dev, n_subdevices);
+       ret = comedi_alloc_subdevices(dev, n_subdevices);
        if (ret < 0)
                return ret;
 
index d215ae16668b2b2a6567e4e312200efdf08f22b9..60466c81e2a9e49e05624cae4ee061ca631b3ddb 100644 (file)
@@ -182,7 +182,7 @@ static int aio_aio12_8_attach(struct comedi_device *dev,
        if (alloc_private(dev, sizeof(struct aio12_8_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 3) < 0)
+       if (comedi_alloc_subdevices(dev, 3) < 0)
                return -ENOMEM;
 
        s = &dev->subdevices[0];
index 5c1548b385f450cdcf46ef4f559da304ff355b2d..7d161d6739ae38bcd3523820df1efcacf0dbd9c2 100644 (file)
@@ -124,7 +124,7 @@ static int aio_iiro_16_attach(struct comedi_device *dev,
        if (alloc_private(dev, sizeof(struct aio_iiro_16_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 2) < 0)
+       if (comedi_alloc_subdevices(dev, 2) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 3afebb24b26b8bb49894ba24098e280e345a35b6..d7d056e20c0297ceef551b7ac7e326dbce66cbcc 100644 (file)
@@ -1273,7 +1273,7 @@ static int dio200_common_attach(struct comedi_device *dev, unsigned long iobase,
        devpriv->intr_sd = -1;
        dev->iobase = iobase;
        dev->board_name = thisboard->name;
-       ret = alloc_subdevices(dev, layout->n_subdevs);
+       ret = comedi_alloc_subdevices(dev, layout->n_subdevs);
        if (ret < 0) {
                dev_err(dev->class_dev, "error! out of memory!\n");
                return ret;
index 9cf514e54a5813c2f5091841cce6e537741dd27b..522e1c0c385e3a60b83b0fa58f5c7b5112b66d6b 100644 (file)
@@ -455,7 +455,7 @@ static int pc236_common_attach(struct comedi_device *dev, unsigned long iobase,
        dev->board_name = thisboard->name;
        dev->iobase = iobase;
 
-       ret = alloc_subdevices(dev, 2);
+       ret = comedi_alloc_subdevices(dev, 2);
        if (ret < 0) {
                dev_err(dev->class_dev, "error! out of memory!\n");
                return ret;
index 7020907f1af72acaf95274299f3385fde76aaa8c..cfb69fa9c89daf76f50a4221472aebbc3c4e7bc8 100644 (file)
@@ -227,7 +227,7 @@ static int pc263_common_attach(struct comedi_device *dev, unsigned long iobase)
        dev->board_name = thisboard->name;
        dev->iobase = iobase;
 
-       ret = alloc_subdevices(dev, 1);
+       ret = comedi_alloc_subdevices(dev, 1);
        if (ret < 0) {
                dev_err(dev->class_dev, "error! out of memory!\n");
                return ret;
index a1e23bafabea9e7f57dffa06703728a55fefb978..8d33aeab53b1d608e0b601d2ae9b5fafc7c8d1e2 100644 (file)
@@ -1380,7 +1380,7 @@ static int pci224_attach_common(struct comedi_device *dev,
             dev->iobase + PCI224_DACCON);
 
        /* Allocate subdevices.  There is only one!  */
-       ret = alloc_subdevices(dev, 1);
+       ret = comedi_alloc_subdevices(dev, 1);
        if (ret < 0) {
                dev_err(dev->class_dev, "error! out of memory!\n");
                return ret;
index 2a43df5d966ea7c4cc4451d4086d3790471c4491..e6598cafb39a23fe729af001e6c9a8a393d5c636 100644 (file)
@@ -2843,7 +2843,7 @@ static int pci230_attach_common(struct comedi_device *dev,
         * Allocate the subdevice structures.  alloc_subdevice() is a
         * convenient macro defined in comedidev.h.
         */
-       if (alloc_subdevices(dev, 3) < 0)
+       if (comedi_alloc_subdevices(dev, 3) < 0)
                return -ENOMEM;
        s = dev->subdevices + 0;
        /* analog input subdevice */
index fb9951a746a6c680f9d2943abcd3fe9a7a0ed265..72b000fad609203f8c7cdc6f9770efb2753a4de9 100644 (file)
@@ -433,7 +433,8 @@ static int c6xdigio_attach(struct comedi_device *dev,
        dev->iobase = iobase;
        dev->board_name = "c6xdigio";
 
-       result = alloc_subdevices(dev, 2);      /*  3 with encoder_init write */
+       /* 3 subdevices with encoder_init write */
+       result = comedi_alloc_subdevices(dev, 2);
        if (result < 0)
                return result;
 
index 35159235a1b6e9d41f3d4d0d696a09f959eee22f..9aa11c15497fbe8da3e5f4bd47234b6f77b25205 100644 (file)
@@ -195,7 +195,7 @@ static int das16cs_attach(struct comedi_device *dev,
        if (alloc_private(dev, sizeof(struct das16cs_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 074feeef829b627813f7ce3ca7a066cd1ff041d1..435f3aaedf88fafe9bd7cbda240771ed121705b8 100644 (file)
@@ -617,7 +617,7 @@ found:
 /*
  * Allocate the subdevice structures.
  */
-       if (alloc_subdevices(dev, 7) < 0)
+       if (comedi_alloc_subdevices(dev, 7) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 5bcadcb00c99eceed6304f385cf6a8483475230b..6b2f153980a98330614903bdae9fc46850f20a84 100644 (file)
@@ -1345,7 +1345,7 @@ static int setup_subdevices(struct comedi_device *dev)
        void __iomem *dio_8255_iobase;
        int i;
 
-       if (alloc_subdevices(dev, 10) < 0)
+       if (comedi_alloc_subdevices(dev, 10) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index dc4cf0b030efd17b2cefc4ab49640f54281651a7..4ab3584365e2dd649770acf0f6d831e1d6b68d0e 100644 (file)
@@ -336,7 +336,7 @@ found:
 /*
  * Allocate the subdevice structures.
  */
-       if (alloc_subdevices(dev, 3) < 0)
+       if (comedi_alloc_subdevices(dev, 3) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 58d5a3d257bd638acb7c28f9fee6f213eb3edd84..56c1d09188aafcf506422b023e1b8227ff70bd91 100644 (file)
@@ -181,7 +181,7 @@ found:
  * Allocate the subdevice structures.  alloc_subdevice() is a
  * convenient macro defined in comedidev.h.
  */
-       if (alloc_subdevices(dev, thisboard->n_8255) < 0)
+       if (comedi_alloc_subdevices(dev, thisboard->n_8255) < 0)
                return -ENOMEM;
 
        for (i = 0; i < thisboard->n_8255; i++) {
index a06b67a0b36dc5c80051d2149c67f74c1214985f..6acb3199e6f34f468542a4ec2f7dfcde6a0902fc 100644 (file)
@@ -273,7 +273,7 @@ found:
  * Allocate the subdevice structures.  alloc_subdevice() is a
  * convenient macro defined in comedidev.h.
  */
-       if (alloc_subdevices(dev, 3) < 0)
+       if (comedi_alloc_subdevices(dev, 3) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index bec250bf15bbb643bd33556a18f0f7bd58f9d340..abb6008da4dfc27ba41f75bb96a43743f6d090a2 100644 (file)
@@ -240,7 +240,7 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
  * Allocate the subdevice structures.  alloc_subdevice() is a
  * convenient macro defined in comedidev.h.
  */
-       if (alloc_subdevices(dev, 2) < 0)
+       if (comedi_alloc_subdevices(dev, 2) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 29412de06c31d1d9ad4c611f91e7ff0e3dc7e000..d56eec48e4c81064522eecabd0aa967fa6e1a466 100644 (file)
@@ -362,7 +362,7 @@ static int bonding_attach(struct comedi_device *dev,
         * Allocate the subdevice structures.  alloc_subdevice() is a
         * convenient macro defined in comedidev.h.
         */
-       if (alloc_subdevices(dev, 1) < 0)
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index bff5dcd7610731751127ac02c536cd2a2ca2c56a..c9a725fc61f29cc0c5665f194e667a61f288ad61 100644 (file)
@@ -315,7 +315,7 @@ static int parport_attach(struct comedi_device *dev,
        }
        dev->board_name = "parport";
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
        ret = alloc_private(dev, sizeof(struct parport_private));
index 9f3c3d5d02a4a0b21b93dc2a332692b6cfc33373..cd43c0d7df389b13306f77e5e29386a7db78a0ec 100644 (file)
@@ -448,7 +448,7 @@ static int waveform_attach(struct comedi_device *dev,
        devpriv->usec_period = period;
 
        dev->n_subdevices = 2;
-       if (alloc_subdevices(dev, dev->n_subdevices) < 0)
+       if (comedi_alloc_subdevices(dev, dev->n_subdevices) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 2cd7407adbeaf9ce386faedde005b36929131f2f..a5bad1bd6dcd172c04850bfe9a1542ab54d11fdf 100644 (file)
@@ -115,7 +115,7 @@ static int contec_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        if (alloc_private(dev, sizeof(struct contec_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 2) < 0)
+       if (comedi_alloc_subdevices(dev, 2) < 0)
                return -ENOMEM;
 
        for_each_pci_dev(pcidev) {
index d84794ca4380c319bb6a05f9260edd70a26bc5ae..dbd0472bc7e2daeea346af8d5daaf1bb5d71d037 100644 (file)
@@ -772,7 +772,7 @@ static int daqboard2000_attach(struct comedi_device *dev,
        if (!devpriv->plx || !devpriv->daq)
                return -ENOMEM;
 
-       result = alloc_subdevices(dev, 3);
+       result = comedi_alloc_subdevices(dev, 3);
        if (result < 0)
                goto out;
 
index f99f72b9cdf37a461ef54f96b6b10f53643ffa98..1dea21a33a273c347e04c01eabf707860a1bcd91 100644 (file)
@@ -834,7 +834,7 @@ int das08_common_attach(struct comedi_device *dev, unsigned long iobase)
 
        dev->board_name = thisboard->name;
 
-       ret = alloc_subdevices(dev, 6);
+       ret = comedi_alloc_subdevices(dev, 6);
        if (ret < 0)
                return ret;
 
index 61705366dd40c2b931f6fdbb9dda4f2c56af09bc..6a8a7eb1ae9c087009f1db23eb1774bce5b8ab43 100644 (file)
@@ -1264,7 +1264,7 @@ static int das16_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        }
        devpriv->timer_mode = timer_mode ? 1 : 0;
 
-       ret = alloc_subdevices(dev, 5);
+       ret = comedi_alloc_subdevices(dev, 5);
        if (ret < 0)
                return ret;
 
index e468ff14aa52dbc9ddd1ac563cbec1a9e457a9f1..eafd6b59a483663e90f446fd7a0dc66905a6d162 100644 (file)
@@ -646,7 +646,7 @@ static int das16m1_attach(struct comedi_device *dev,
                return -EINVAL;
        }
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index 079fb06de215686cc67068f9c73986a47417282d..12d736a6e38df6202bf6aae7aa0389b29747bde5 100644 (file)
@@ -1644,7 +1644,7 @@ static int das1800_attach(struct comedi_device *dev,
                        return -ENOMEM;
        }
 
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
        /* analog input subdevice */
index 881f392d1dba291302d536780b1043ced9f01718..2039b6c11590d2108aeba2468ca082eaee8d2dbc 100644 (file)
@@ -307,7 +307,7 @@ static int das6402_attach(struct comedi_device *dev,
        if (ret < 0)
                return ret;
 
-       ret = alloc_subdevices(dev, 1);
+       ret = comedi_alloc_subdevices(dev, 1);
        if (ret < 0)
                return ret;
 
index 4e33b2a28d97aa46ad4fe15202f8776bd4a38cb7..6263f532e5da22a80702e1b617829ec2a9596b19 100644 (file)
@@ -510,7 +510,7 @@ static int das800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        dev->board_name = thisboard->name;
 
-       if (alloc_subdevices(dev, 3) < 0)
+       if (comedi_alloc_subdevices(dev, 3) < 0)
                return -ENOMEM;
 
        /* analog input subdevice */
index 5be99b5d22e47ed0f4d1c610ce7f6e9996ae9bd7..40d7befec5ea35071fbb9834799f4a5169ea2e66 100644 (file)
@@ -375,7 +375,7 @@ static int dmm32at_attach(struct comedi_device *dev,
  * Allocate the subdevice structures.  alloc_subdevice() is a
  * convenient macro defined in comedidev.h.
  */
-       if (alloc_subdevices(dev, 3) < 0)
+       if (comedi_alloc_subdevices(dev, 3) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 625bd617a8e9dfde24154b990dd6299d33bebf17..35ce076237a47a205ca48c2cbfef5fad5879f00d 100644 (file)
@@ -628,7 +628,7 @@ havetype:
        n_ai_chans = probe_number_of_ai_chans(dev);
        printk(" (ai channels = %d)", n_ai_chans);
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                goto out;
 
index 727da9e19206bf8c75fa16568499665300e6e8fa..6ff610d1b0f9c7ef920ffc4cd1d12e905d827558 100644 (file)
@@ -465,7 +465,7 @@ static int dt2811_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        }
 #endif
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index fa4ade61be5f285d8be7ee6fa6accac0dfd6d9c5..876d5cbdbe4af60863b4384c10c515caa785c540 100644 (file)
@@ -338,7 +338,7 @@ static int dt2814_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 #endif
        }
 
-       ret = alloc_subdevices(dev, 1);
+       ret = comedi_alloc_subdevices(dev, 1);
        if (ret < 0)
                return ret;
 
index bbab712be4b99756f2fd21845f21e270729f021c..33ad1fa90762df76bb46f5e3b49d0015e2b91e57 100644 (file)
@@ -177,7 +177,7 @@ static int dt2815_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        dev->iobase = iobase;
        dev->board_name = "dt2815";
 
-       if (alloc_subdevices(dev, 1) < 0)
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
        if (alloc_private(dev, sizeof(struct dt2815_private)) < 0)
                return -ENOMEM;
index 1ee10e7bf1d23e5dcbee9ea06907dbd55ba890f5..665db07aeb8480477988f81c552d4479421eda11 100644 (file)
@@ -137,7 +137,7 @@ static int dt2817_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        dev->iobase = iobase;
        dev->board_name = "dt2817";
 
-       ret = alloc_subdevices(dev, 1);
+       ret = comedi_alloc_subdevices(dev, 1);
        if (ret < 0)
                return ret;
 
index eefda3c064d31027cbaa7977212ab86be5ea6a78..f11d1fdfcae2a29e69a250f7cdbd7cae20f6b321 100644 (file)
@@ -1268,7 +1268,7 @@ static int dt282x_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        if (ret < 0)
                return ret;
 
-       ret = alloc_subdevices(dev, 3);
+       ret = comedi_alloc_subdevices(dev, 3);
        if (ret < 0)
                return ret;
 
index af02024741276b9d699e5794dfe019c50460aec7..10415b218b5c7bbfe7e3ffdf319565efe9e58b94 100644 (file)
@@ -882,7 +882,7 @@ static int dt3000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        }
        dev->irq = devpriv->pci_dev->irq;
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index 22cda5c76ce46b22929a03a2048e609635d42fbc..56af2f28f98d6879f6875877b9e37c856247f63c 100644 (file)
@@ -1036,7 +1036,7 @@ static int dt9812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        devpriv->serial = it->options[0];
 
        /* Allocate subdevices */
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
        /* digital input subdevice */
index 367a7c88a0fd6fafc2bc55abf197f61276b28f1e..6f6fb527d5434be49a63a1011235a78dc8aea8db 100644 (file)
@@ -329,7 +329,7 @@ found:
        devpriv->BADR4 = pci_resource_start(pcidev, 4);
        devpriv->BADR5 = pci_resource_start(pcidev, 5);
 
-       if (alloc_subdevices(dev, 4) < 0) {
+       if (comedi_alloc_subdevices(dev, 4) < 0) {
                printk(KERN_ERR "comedi: dyna_pci10xx: "
                        "failed allocating subdevices\n");
                mutex_unlock(&start_stop_sem);
index d23814450b403b0e3fe6901c64e94faad7f8b187..7218a9b2cda93395d1215c19dc159b3c06afce6b 100644 (file)
@@ -131,7 +131,7 @@ static int fl512_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        printk(KERN_DEBUG "malloc ok\n");
 #endif
 
-       if (alloc_subdevices(dev, 2) < 0)
+       if (comedi_alloc_subdevices(dev, 2) < 0)
                return -ENOMEM;
 
        /*
index fe1fd2f75f0d5d293729ad0ae412eae1b45b3d75..b103cfbf32746687dcf9439e1b4b0c774970364c 100644 (file)
@@ -431,7 +431,7 @@ static int setup_subdevices(struct comedi_device *dev)
 {
        struct comedi_subdevice *s;
 
-       if (alloc_subdevices(dev, 1) < 0)
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 1f254f480a664e1da6b3a29a996933743b226813..06c66afc6aa1a6ca48630affe939b33330ff33f1 100644 (file)
@@ -903,7 +903,7 @@ static int icp_multi_attach(struct comedi_device *dev,
        if (this_board->n_ctrs)
                n_subdevices++;
 
-       ret = alloc_subdevices(dev, n_subdevices);
+       ret = comedi_alloc_subdevices(dev, n_subdevices);
        if (ret < 0)
                return ret;
 
index 6f6947602398d479bd146f8ffb26caefab4c7b19..9c11657910788f93cfa4da452187c95bfa08ea1f 100644 (file)
@@ -202,7 +202,7 @@ static int pci20xxx_attach(struct comedi_device *dev,
        struct comedi_subdevice *s;
        union pci20xxx_subdev_private *sdp;
 
-       ret = alloc_subdevices(dev, 1 + PCI20000_MODULES);
+       ret = comedi_alloc_subdevices(dev, 1 + PCI20000_MODULES);
        if (ret < 0)
                return ret;
 
index e8dfc367aa8defef103d380055fd14ed24fd0d45..182643bed561b2b4696f179d93257d8be3704e9f 100644 (file)
@@ -826,7 +826,7 @@ static int jr3_pci_attach(struct comedi_device *dev,
        if (!devpriv->iobase)
                return -ENOMEM;
 
-       result = alloc_subdevices(dev, devpriv->n_channels);
+       result = comedi_alloc_subdevices(dev, devpriv->n_channels);
        if (result < 0)
                goto out;
 
index 9f92420dd826979ba79d947973ec29509da77bc3..bcb1eb49a1f73b8e59724f353c30ad6e315193a7 100644 (file)
@@ -190,7 +190,7 @@ found:
        dev->iobase = io_base;
 
        /* allocate the subdevice structures */
-       error = alloc_subdevices(dev, 1);
+       error = comedi_alloc_subdevices(dev, 1);
        if (error < 0)
                return error;
 
index 09890b8c586ce221be6ae543254d28c06b479903..39100ddddef815ceefd943e23f6eacadff7580ec 100644 (file)
@@ -2195,7 +2195,7 @@ static int me4000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
         * convenient macro defined in comedidev.h.  It relies on
         * n_subdevices being set correctly.
         */
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
     /*=========================================================================
index fcadb0fcd1d0e25d80a41901a428832a5fd64128..231b29413eaab38753f1416da21430baeb0dcacc 100644 (file)
@@ -762,7 +762,7 @@ found:
        me_reset(dev);
 
        /* device driver capabilities */
-       error = alloc_subdevices(dev, 3);
+       error = comedi_alloc_subdevices(dev, 3);
        if (error < 0)
                return error;
 
index 4304e864a4d49e7142e5e1495ef691e30f8b71e7..48ba6b9f9430b0b331040be1df9d5a76146fd1c6 100644 (file)
@@ -349,7 +349,7 @@ static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        }
 
        /*  Subdevices structures */
-       if (alloc_subdevices(dev, 1) < 0)
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 364470e4458fcb23e89b4d3ad2004f1ae841bb55..13110510d7fe449e64a10079387e8f2af3b914e5 100644 (file)
@@ -131,7 +131,7 @@ static int mpc8260cpm_attach(struct comedi_device *dev,
        if (alloc_private(dev, sizeof(struct mpc8260cpm_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
        for (i = 0; i < 4; i++) {
index e951e73d66f5ae49f9aa08a561fa0e3fdc6bc934..00d497c270aebc785486626f77e50edd67dc25ed 100644 (file)
@@ -255,7 +255,7 @@ static int multiq3_attach(struct comedi_device *dev,
        else
                printk(KERN_WARNING "comedi%d: no irq\n", dev->minor);
        dev->board_name = "multiq3";
-       result = alloc_subdevices(dev, 5);
+       result = comedi_alloc_subdevices(dev, 5);
        if (result < 0)
                return result;
 
index b02aa0efcd8675f7dd8685f6543c001a5c1c39a5..89fee6fdcf6123f79db35d2100aad77ba5996485 100644 (file)
@@ -397,7 +397,7 @@ static int ni6527_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        printk(KERN_INFO "comedi board: %s, ID=0x%02x\n", dev->board_name,
                readb(devpriv->mite->daq_io_addr + ID_Register));
 
-       ret = alloc_subdevices(dev, 3);
+       ret = comedi_alloc_subdevices(dev, 3);
        if (ret < 0)
                return ret;
 
index 0d27a9323bc05e11f5a6d4e1193057d21f848c26..a49dceac65bca641a20913d08f3835d2c2291d3a 100644 (file)
@@ -678,7 +678,7 @@ static int ni_65xx_attach(struct comedi_device *dev,
        printk(KERN_INFO " ID=0x%02x",
               readb(private(dev)->mite->daq_io_addr + ID_Register));
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index 8c40730e296ae16ff325dd23bfb0218479aa6103..5827debd33668aadcc998ea2e54b5bb6c2c90d4f 100644 (file)
@@ -1095,7 +1095,7 @@ static int ni_660x_attach(struct comedi_device *dev,
 
        dev->n_subdevices = 2 + NI_660X_MAX_NUM_COUNTERS;
 
-       if (alloc_subdevices(dev, dev->n_subdevices) < 0)
+       if (comedi_alloc_subdevices(dev, dev->n_subdevices) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index a9cf94fd0c30f4d33f558693b5153fc12c78e6b2..45a03e64549accbc2167e9925117b56a7eb0640a 100644 (file)
@@ -202,7 +202,7 @@ static int ni_670x_attach(struct comedi_device *dev,
        dev->irq = mite_irq(devpriv->mite);
        printk(KERN_INFO " %s", dev->board_name);
 
-       if (alloc_subdevices(dev, 2) < 0)
+       if (comedi_alloc_subdevices(dev, 2) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index ae896a094150acb8bb0e7dc3994a40718f0af771..9d1a0f745bf880bddbe123240649a0f1e610da56 100644 (file)
@@ -826,7 +826,7 @@ static int a2150_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        dev->board_ptr = a2150_boards + a2150_probe(dev);
        dev->board_name = thisboard->name;
 
-       if (alloc_subdevices(dev, 1) < 0)
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
 
        /* analog input subdevice */
index bfe7fb79880d0fc7d6a26edef420839ede164385..03a4d736b454f43d96098bdfdd6c3072a1a85669 100644 (file)
@@ -356,7 +356,7 @@ static int atao_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        if (alloc_private(dev, sizeof(struct atao_private)) < 0)
                return -ENOMEM;
 
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index a0890ee202f4f7cdd87a2768884bd4d6dc051d3d..37ff6fc8615794b7e1d824cd84982263a2c521d6 100644 (file)
@@ -709,7 +709,7 @@ static int atmio16d_attach(struct comedi_device *dev,
 
        dev->board_name = board->name;
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index 75764e8d27eb6b92863412bf3f9b621d8953f6da..8860207e88d7b73a7fbe6d390164735f22b75a38 100644 (file)
@@ -409,7 +409,7 @@ static int dio700_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        dev->board_name = thisboard->name;
 
-       if (alloc_subdevices(dev, 1) < 0)
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
 
        /* DAQCard-700 dio */
index 493a2278863793b5f66098ee9b71fed492b2eda0..36c0c62382ed1078ac0a1620e33730eb7d1b4810 100644 (file)
@@ -158,7 +158,7 @@ static int dio24_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        dev->board_name = thisboard->name;
 
-       if (alloc_subdevices(dev, 1) < 0)
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
 
        /* 8255 dio */
index 1d739b26e678f21a280348dd97664b56edcf8fb2..a92570f5a7c5b1ec7f560a1d5ad01689ed5f00e0 100644 (file)
@@ -622,7 +622,7 @@ int labpc_common_attach(struct comedi_device *dev, unsigned long iobase,
 
        dev->board_name = thisboard->name;
 
-       if (alloc_subdevices(dev, 5) < 0)
+       if (comedi_alloc_subdevices(dev, 5) < 0)
                return -ENOMEM;
 
        /* analog input subdevice */
index fd232bc5f87349f2f0238f31c4f3fe982a563ba7..4261e929869fe05be052b3c64ab98ab39f15677d 100644 (file)
@@ -4412,7 +4412,7 @@ static int ni_E_init(struct comedi_device *dev, struct comedi_devconfig *it)
                return -EINVAL;
        }
 
-       if (alloc_subdevices(dev, NI_NUM_SUBDEVICES) < 0)
+       if (comedi_alloc_subdevices(dev, NI_NUM_SUBDEVICES) < 0)
                return -ENOMEM;
 
        /* analog input subdevice */
index 37b700830e21d6c4481ef0916d9a69b88ce14349..77ef312f657e1dafcdf0c0b50ec28831a96de47d 100644 (file)
@@ -1248,7 +1248,7 @@ static int nidio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        else
                n_subdevices = 1;
 
-       ret = alloc_subdevices(dev, n_subdevices);
+       ret = comedi_alloc_subdevices(dev, n_subdevices);
        if (ret < 0)
                return ret;
 
index e943b52d04a83c4d1fc2f5af918baa3b9fb2c7dd..35b95105a749185fa64b5dad34f726e06f6769fd 100644 (file)
@@ -518,7 +518,7 @@ static int pcl711_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        }
        dev->irq = irq;
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index 4136a03a5125c6b612cbb0fb4d56178f4b96a485..698c9004c74eca29d7f1550826cb8cf14e54d436 100644 (file)
@@ -156,7 +156,7 @@ static int pcl724_attach(struct comedi_device *dev, struct comedi_devconfig *it)
                                         || (it->options[1] == 96)))
                n_subdevices = 4;       /*  PCL-724 in 96 DIO configuration */
 
-       ret = alloc_subdevices(dev, n_subdevices);
+       ret = comedi_alloc_subdevices(dev, n_subdevices);
        if (ret < 0)
                return ret;
 
index 83a6fa53ddddccd7de0f49bf9bacb2958b08d252..d7ba336ce031652ea0086977e6da9fc5809fa7bf 100644 (file)
@@ -63,7 +63,7 @@ static int pcl725_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        dev->iobase = iobase;
        dev->irq = 0;
 
-       if (alloc_subdevices(dev, 2) < 0)
+       if (comedi_alloc_subdevices(dev, 2) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index e9449bb2ba007515be0e7db080732af94c028136..e756a30337670e64cf3df67131222dba96f8f35e 100644 (file)
@@ -292,7 +292,7 @@ static int pcl726_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        printk("\n");
 
-       ret = alloc_subdevices(dev, 3);
+       ret = comedi_alloc_subdevices(dev, 3);
        if (ret < 0)
                return ret;
 
index 02a4386e10317a4155970483f7eda94bdec603d0..e258bcebf198f1e0448074fde866ef11ec566608 100644 (file)
@@ -85,7 +85,7 @@ static int pcl730_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        dev->iobase = iobase;
        dev->irq = 0;
 
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 28780ede1ee5f1157e9f2bb08ce5bd37d8a0260b..128f5b644878d1623033adc85bb4b4789a80279d 100644 (file)
@@ -1382,7 +1382,7 @@ no_dma:
        if (board->n_dochan > 0)
                n_subdevices++;
 
-       ret = alloc_subdevices(dev, n_subdevices);
+       ret = comedi_alloc_subdevices(dev, n_subdevices);
        if (ret < 0) {
                free_resources(dev);
                return ret;
index 845039cd62078f8252de8699b78f13dc770519bd..37cedbc47a43a58893c41be55cf2ffec1cf5110f 100644 (file)
@@ -1194,7 +1194,7 @@ no_dma:
     subdevs[3] = COMEDI_SUBD_DO;
 */
 
-       ret = alloc_subdevices(dev, 1);
+       ret = comedi_alloc_subdevices(dev, 1);
        if (ret < 0)
                return ret;
 
index 6c84b29a8dad016bf87a15bc33e30ff772de61d2..a4c2870562fbc305cbb648cbee7c55c8c809ad2a 100644 (file)
@@ -1778,7 +1778,7 @@ no_rtc:
 
 no_dma:
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index 9eee708e8442f24c7c17c843471dd0b9f15411e7..d755b406a6f19438c42220f43bf83e4116a585f0 100644 (file)
@@ -258,7 +258,7 @@ static int pcm3724_attach(struct comedi_device *dev,
 
        n_subdevices = board->numofports;
 
-       ret = alloc_subdevices(dev, n_subdevices);
+       ret = comedi_alloc_subdevices(dev, n_subdevices);
        if (ret < 0)
                return ret;
 
index f8d1c644daf8c2afe79f7cc27940145f14883db4..48a21bd679fd8367a4b93eeaecce884a7630c3b0 100644 (file)
@@ -71,7 +71,7 @@ static int pcm3730_attach(struct comedi_device *dev,
        dev->iobase = dev->iobase;
        dev->irq = 0;
 
-       if (alloc_subdevices(dev, 6) < 0)
+       if (comedi_alloc_subdevices(dev, 6) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index 2ec0b2e63c351c1b8e9e0c56849a4fb9b32eddc7..00b0f2a6894c5f2abbfea4d34c0e2cc0f24a45f2 100644 (file)
@@ -117,7 +117,7 @@ static int pcmad_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        printk(KERN_CONT "\n");
        dev->iobase = iobase;
 
-       ret = alloc_subdevices(dev, 1);
+       ret = comedi_alloc_subdevices(dev, 1);
        if (ret < 0)
                return ret;
 
index f49c66afe5fc58c68ae35c670faf7f5436e5a3d6..3645e9ee8807b5a5f4f0bbe9ff2cedbc363a98c0 100644 (file)
@@ -197,7 +197,7 @@ static int pcmda12_attach(struct comedi_device *dev,
         * Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
         * 96-channel version of the board.
         */
-       if (alloc_subdevices(dev, 1) < 0) {
+       if (comedi_alloc_subdevices(dev, 1) < 0) {
                printk(KERN_ERR "cannot allocate subdevice data structures\n");
                return -ENOMEM;
        }
index c4482ae9d08bceec64c3ee2bb176a911caa837ce..67fdac5b81d6af4e8a6248f62fe9a352acda9bc1 100644 (file)
@@ -1077,7 +1077,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
         *
         * Allocate 1 AI + 1 AO + 2 DIO subdevs (24 lines per DIO)
         */
-       if (alloc_subdevices(dev, n_subdevs) < 0) {
+       if (comedi_alloc_subdevices(dev, n_subdevs) < 0) {
                printk(KERN_ERR "comedi%d: cannot allocate subdevice data structures\n",
                                dev->minor);
                return -ENOMEM;
index b1a9bed38551d0798f8cf955ebde07cbe94035ac..ce5068e3b46e5c6480cbc72c281e0a3e2137395e 100644 (file)
@@ -807,7 +807,7 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
         * Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
         * 96-channel version of the board.
         */
-       if (alloc_subdevices(dev, n_subdevs) < 0) {
+       if (comedi_alloc_subdevices(dev, n_subdevs) < 0) {
                dev_dbg(dev->hw_dev, "cannot allocate subdevice data structures\n");
                return -ENOMEM;
        }
index 95e348fa89c8b828112dfdd851acbc56c0a7045d..1e954f9c41655edb8a29bb8a5556aea82c8a4b4f 100644 (file)
@@ -160,7 +160,7 @@ static int poc_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        }
        dev->iobase = iobase;
 
-       if (alloc_subdevices(dev, 1) < 0)
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
        if (alloc_private(dev, sizeof(unsigned int) * board->n_chan) < 0)
                return -ENOMEM;
index 2f130b3095e950cd5ee00c86a5479f80059c187b..38a13ba38e18545e52a97c850aaa87a3668ed3a0 100644 (file)
@@ -871,7 +871,7 @@ static int daqp_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        dev->iobase = local->link->resource[0]->start;
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index 84b28b6b99d66f44ea893628ea17ae2e14074a66..7d248a7685b25481b9bb7d410e459691aa16ff01 100644 (file)
@@ -2003,7 +2003,7 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it)
         * Allocate the subdevice structures.  alloc_subdevice() is a
         * convenient macro defined in comedidev.h.
         */
-       if (alloc_subdevices(dev, 4) < 0)
+       if (comedi_alloc_subdevices(dev, 4) < 0)
                return -ENOMEM;
 
 
index 04a23687ae3e9c13fe71f5052555c832b7987b38..a80f6302375b5eb6c5819341ee4a214d63873198 100644 (file)
@@ -348,7 +348,7 @@ static int rti800_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        dev->board_name = board->name;
 
-       ret = alloc_subdevices(dev, 4);
+       ret = comedi_alloc_subdevices(dev, 4);
        if (ret < 0)
                return ret;
 
index 09da5c21858ce31bfb00ec433cbeb4d9ab233222..1aacf3f6e3f5ddb291602e88eda4be8b9de91d80 100644 (file)
@@ -103,7 +103,7 @@ static int rti802_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
        dev->board_name = "rti802";
 
-       if (alloc_subdevices(dev, 1) < 0
+       if (comedi_alloc_subdevices(dev, 1) < 0
            || alloc_private(dev, sizeof(struct rti802_private))) {
                return -ENOMEM;
        }
index 3c8e9799824edf8df8f3678854a94db8c6424b01..17d581b8ac6fccf52b6bdb44b3661bbda5094695 100644 (file)
@@ -779,7 +779,7 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it)
  * convenient macro defined in comedidev.h.
  */
        dev->n_subdevices = 4;
-       if (alloc_subdevices(dev, dev->n_subdevices) < 0)
+       if (comedi_alloc_subdevices(dev, dev->n_subdevices) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index d6dc3381205a6f48797edc72c0a3dc9f00743324..f2eeca51ebfae4f6df40df7086caaa2e839e4e6a 100644 (file)
@@ -595,7 +595,7 @@ static int s626_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        dev->board_ptr = s626_boards;
        dev->board_name = thisboard->name;
 
-       if (alloc_subdevices(dev, 6) < 0)
+       if (comedi_alloc_subdevices(dev, 6) < 0)
                return -ENOMEM;
 
        dev->iobase = (unsigned long)devpriv->base_addr;
index c25808c052511879e64c1f047910a5b752a5f560..dc41c04fae4fdf21386be40d7cd9ce7df9e70252 100644 (file)
@@ -792,7 +792,7 @@ static int serial2002_attach(struct comedi_device *dev,
        dev_dbg(dev->hw_dev, "/dev/ttyS%d @ %d\n", devpriv->port,
                devpriv->speed);
 
-       if (alloc_subdevices(dev, 5) < 0)
+       if (comedi_alloc_subdevices(dev, 5) < 0)
                return -ENOMEM;
 
        /* digital input subdevice */
index 7d13ffa7f4f97f5a29a3f210f66caffa1d5e5b20..16947c8b88037caa5accf815a5fea2dd828a29b7 100644 (file)
@@ -237,7 +237,7 @@ static int skel_attach(struct comedi_device *dev, struct comedi_devconfig *it)
  * Allocate the subdevice structures.  alloc_subdevice() is a
  * convenient macro defined in comedidev.h.
  */
-       if (alloc_subdevices(dev, 3) < 0)
+       if (comedi_alloc_subdevices(dev, 3) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index de580958e32ab2123a34683ab599364dd9b0df3d..5eaef8434e099f48e8eb58740fe839ce208828e9 100644 (file)
@@ -200,7 +200,7 @@ static int dnp_attach(struct comedi_device *dev, struct comedi_devconfig *it)
        /* Allocate the subdevice structures. alloc_subdevice() is a         */
        /* convenient macro defined in comedidev.h.                          */
 
-       if (alloc_subdevices(dev, 1) < 0)
+       if (comedi_alloc_subdevices(dev, 1) < 0)
                return -ENOMEM;
 
        s = dev->subdevices + 0;
index d5f1f22aa708ae1ad0cf086d4435f5aacd9e27dc..170bc48cfd1ce181def13e713395d57663858718 100644 (file)
@@ -468,7 +468,7 @@ static int unioxx5_attach(struct comedi_device *dev,
                return -1;
        }
 
-       if (alloc_subdevices(dev, n_subd) < 0) {
+       if (comedi_alloc_subdevices(dev, n_subd) < 0) {
                printk(KERN_ERR "out of memory\n");
                return -ENOMEM;
        }
index 13d9fd3efcfd25f11d613ae68b12e2144b46faec..ca8b3e121ff01dabda3563583410ab737a1274ba 100644 (file)
@@ -2645,7 +2645,7 @@ static int usbdux_attach_common(struct comedi_device *dev,
        }
 
        /* allocate space for the subdevices */
-       ret = alloc_subdevices(dev, dev->n_subdevices);
+       ret = comedi_alloc_subdevices(dev, dev->n_subdevices);
        if (ret < 0) {
                dev_err(&udev->interface->dev,
                        "comedi%d: error alloc space for subdev\n", dev->minor);
index 7b1d21a6fc5321081e5602d08fc8534875f98fce..b2f7350c429feebc3fdf56e8ab30ff497e421068 100644 (file)
@@ -1675,7 +1675,7 @@ static int usbduxfast_attach(struct comedi_device *dev,
        dev->n_subdevices = N_SUBDEVICES;
 
        /* allocate space for the subdevices */
-       ret = alloc_subdevices(dev, N_SUBDEVICES);
+       ret = comedi_alloc_subdevices(dev, N_SUBDEVICES);
        if (ret < 0) {
                printk(KERN_ERR "comedi%d: usbduxfast: error alloc space for "
                       "subdev\n", dev->minor);
index 441ccef4c110417fc3cee1f5d2a38967a69dbeb7..00faf4ad6ffb56740530e659df5261e242505f0a 100644 (file)
@@ -2690,7 +2690,7 @@ static int usbduxsigma_attach(struct comedi_device *dev,
        }
 
        /* allocate space for the subdevices */
-       ret = alloc_subdevices(dev, dev->n_subdevices);
+       ret = comedi_alloc_subdevices(dev, dev->n_subdevices);
        if (ret < 0) {
                dev_err(&udev->interface->dev,
                        "comedi%d: no space for subdev\n", dev->minor);
index baee8d767636a0248d2411217c669c408b6ed891..5a3e33d83c843972cf558f8db790c08840f563f5 100644 (file)
@@ -1159,7 +1159,7 @@ static int vmk80xx_attach(struct comedi_device *cdev,
        else
                n_subd = 6;
 
-       if (alloc_subdevices(cdev, n_subd) < 0) {
+       if (comedi_alloc_subdevices(cdev, n_subd) < 0) {
                up(&dev->limit_sem);
                mutex_unlock(&glb_mutex);
                return -ENOMEM;