Browse Source

staging: comedi: export alloc_subdevices as comedi_alloc_subdevices

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>
H Hartley Sweeten 13 years ago
parent
commit
2f0b9d082e
100 changed files with 122 additions and 118 deletions
  1. 2 20
      drivers/staging/comedi/comedidev.h
  2. 21 0
      drivers/staging/comedi/drivers.c
  3. 1 1
      drivers/staging/comedi/drivers/8255.c
  4. 1 1
      drivers/staging/comedi/drivers/acl7225b.c
  5. 1 1
      drivers/staging/comedi/drivers/addi-data/addi_common.c
  6. 1 1
      drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c
  7. 1 1
      drivers/staging/comedi/drivers/adl_pci6208.c
  8. 1 1
      drivers/staging/comedi/drivers/adl_pci7230.c
  9. 1 1
      drivers/staging/comedi/drivers/adl_pci7296.c
  10. 1 1
      drivers/staging/comedi/drivers/adl_pci7432.c
  11. 1 1
      drivers/staging/comedi/drivers/adl_pci8164.c
  12. 1 1
      drivers/staging/comedi/drivers/adl_pci9111.c
  13. 1 1
      drivers/staging/comedi/drivers/adl_pci9118.c
  14. 1 1
      drivers/staging/comedi/drivers/adq12b.c
  15. 1 1
      drivers/staging/comedi/drivers/adv_pci1710.c
  16. 1 1
      drivers/staging/comedi/drivers/adv_pci1723.c
  17. 1 1
      drivers/staging/comedi/drivers/adv_pci_dio.c
  18. 1 1
      drivers/staging/comedi/drivers/aio_aio12_8.c
  19. 1 1
      drivers/staging/comedi/drivers/aio_iiro_16.c
  20. 1 1
      drivers/staging/comedi/drivers/amplc_dio200.c
  21. 1 1
      drivers/staging/comedi/drivers/amplc_pc236.c
  22. 1 1
      drivers/staging/comedi/drivers/amplc_pc263.c
  23. 1 1
      drivers/staging/comedi/drivers/amplc_pci224.c
  24. 1 1
      drivers/staging/comedi/drivers/amplc_pci230.c
  25. 2 1
      drivers/staging/comedi/drivers/c6xdigio.c
  26. 1 1
      drivers/staging/comedi/drivers/cb_das16_cs.c
  27. 1 1
      drivers/staging/comedi/drivers/cb_pcidas.c
  28. 1 1
      drivers/staging/comedi/drivers/cb_pcidas64.c
  29. 1 1
      drivers/staging/comedi/drivers/cb_pcidda.c
  30. 1 1
      drivers/staging/comedi/drivers/cb_pcidio.c
  31. 1 1
      drivers/staging/comedi/drivers/cb_pcimdas.c
  32. 1 1
      drivers/staging/comedi/drivers/cb_pcimdda.c
  33. 1 1
      drivers/staging/comedi/drivers/comedi_bond.c
  34. 1 1
      drivers/staging/comedi/drivers/comedi_parport.c
  35. 1 1
      drivers/staging/comedi/drivers/comedi_test.c
  36. 1 1
      drivers/staging/comedi/drivers/contec_pci_dio.c
  37. 1 1
      drivers/staging/comedi/drivers/daqboard2000.c
  38. 1 1
      drivers/staging/comedi/drivers/das08.c
  39. 1 1
      drivers/staging/comedi/drivers/das16.c
  40. 1 1
      drivers/staging/comedi/drivers/das16m1.c
  41. 1 1
      drivers/staging/comedi/drivers/das1800.c
  42. 1 1
      drivers/staging/comedi/drivers/das6402.c
  43. 1 1
      drivers/staging/comedi/drivers/das800.c
  44. 1 1
      drivers/staging/comedi/drivers/dmm32at.c
  45. 1 1
      drivers/staging/comedi/drivers/dt2801.c
  46. 1 1
      drivers/staging/comedi/drivers/dt2811.c
  47. 1 1
      drivers/staging/comedi/drivers/dt2814.c
  48. 1 1
      drivers/staging/comedi/drivers/dt2815.c
  49. 1 1
      drivers/staging/comedi/drivers/dt2817.c
  50. 1 1
      drivers/staging/comedi/drivers/dt282x.c
  51. 1 1
      drivers/staging/comedi/drivers/dt3000.c
  52. 1 1
      drivers/staging/comedi/drivers/dt9812.c
  53. 1 1
      drivers/staging/comedi/drivers/dyna_pci10xx.c
  54. 1 1
      drivers/staging/comedi/drivers/fl512.c
  55. 1 1
      drivers/staging/comedi/drivers/gsc_hpdi.c
  56. 1 1
      drivers/staging/comedi/drivers/icp_multi.c
  57. 1 1
      drivers/staging/comedi/drivers/ii_pci20kc.c
  58. 1 1
      drivers/staging/comedi/drivers/jr3_pci.c
  59. 1 1
      drivers/staging/comedi/drivers/ke_counter.c
  60. 1 1
      drivers/staging/comedi/drivers/me4000.c
  61. 1 1
      drivers/staging/comedi/drivers/me_daq.c
  62. 1 1
      drivers/staging/comedi/drivers/mpc624.c
  63. 1 1
      drivers/staging/comedi/drivers/mpc8260cpm.c
  64. 1 1
      drivers/staging/comedi/drivers/multiq3.c
  65. 1 1
      drivers/staging/comedi/drivers/ni_6527.c
  66. 1 1
      drivers/staging/comedi/drivers/ni_65xx.c
  67. 1 1
      drivers/staging/comedi/drivers/ni_660x.c
  68. 1 1
      drivers/staging/comedi/drivers/ni_670x.c
  69. 1 1
      drivers/staging/comedi/drivers/ni_at_a2150.c
  70. 1 1
      drivers/staging/comedi/drivers/ni_at_ao.c
  71. 1 1
      drivers/staging/comedi/drivers/ni_atmio16d.c
  72. 1 1
      drivers/staging/comedi/drivers/ni_daq_700.c
  73. 1 1
      drivers/staging/comedi/drivers/ni_daq_dio24.c
  74. 1 1
      drivers/staging/comedi/drivers/ni_labpc.c
  75. 1 1
      drivers/staging/comedi/drivers/ni_mio_common.c
  76. 1 1
      drivers/staging/comedi/drivers/ni_pcidio.c
  77. 1 1
      drivers/staging/comedi/drivers/pcl711.c
  78. 1 1
      drivers/staging/comedi/drivers/pcl724.c
  79. 1 1
      drivers/staging/comedi/drivers/pcl725.c
  80. 1 1
      drivers/staging/comedi/drivers/pcl726.c
  81. 1 1
      drivers/staging/comedi/drivers/pcl730.c
  82. 1 1
      drivers/staging/comedi/drivers/pcl812.c
  83. 1 1
      drivers/staging/comedi/drivers/pcl816.c
  84. 1 1
      drivers/staging/comedi/drivers/pcl818.c
  85. 1 1
      drivers/staging/comedi/drivers/pcm3724.c
  86. 1 1
      drivers/staging/comedi/drivers/pcm3730.c
  87. 1 1
      drivers/staging/comedi/drivers/pcmad.c
  88. 1 1
      drivers/staging/comedi/drivers/pcmda12.c
  89. 1 1
      drivers/staging/comedi/drivers/pcmmio.c
  90. 1 1
      drivers/staging/comedi/drivers/pcmuio.c
  91. 1 1
      drivers/staging/comedi/drivers/poc.c
  92. 1 1
      drivers/staging/comedi/drivers/quatech_daqp_cs.c
  93. 1 1
      drivers/staging/comedi/drivers/rtd520.c
  94. 1 1
      drivers/staging/comedi/drivers/rti800.c
  95. 1 1
      drivers/staging/comedi/drivers/rti802.c
  96. 1 1
      drivers/staging/comedi/drivers/s526.c
  97. 1 1
      drivers/staging/comedi/drivers/s626.c
  98. 1 1
      drivers/staging/comedi/drivers/serial2002.c
  99. 1 1
      drivers/staging/comedi/drivers/skel.c
  100. 1 1
      drivers/staging/comedi/drivers/ssv_dnp.c

+ 2 - 20
drivers/staging/comedi/comedidev.h

@@ -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);

+ 21 - 0
drivers/staging/comedi/drivers.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/8255.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/acl7225b.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/addi-data/addi_common.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/adl_pci6208.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/adl_pci7230.c

@@ -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);

+ 1 - 1
drivers/staging/comedi/drivers/adl_pci7296.c

@@ -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);

+ 1 - 1
drivers/staging/comedi/drivers/adl_pci7432.c

@@ -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);

+ 1 - 1
drivers/staging/comedi/drivers/adl_pci8164.c

@@ -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);

+ 1 - 1
drivers/staging/comedi/drivers/adl_pci9111.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/adl_pci9118.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/adq12b.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/adv_pci1710.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/adv_pci1723.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/adv_pci_dio.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/aio_aio12_8.c

@@ -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];

+ 1 - 1
drivers/staging/comedi/drivers/aio_iiro_16.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/amplc_dio200.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/amplc_pc236.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/amplc_pc263.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/amplc_pci224.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/amplc_pci230.c

@@ -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 */

+ 2 - 1
drivers/staging/comedi/drivers/c6xdigio.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/cb_das16_cs.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/cb_pcidas.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/cb_pcidas64.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/cb_pcidda.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/cb_pcidio.c

@@ -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++) {

+ 1 - 1
drivers/staging/comedi/drivers/cb_pcimdas.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/cb_pcimdda.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/comedi_bond.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/comedi_parport.c

@@ -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));

+ 1 - 1
drivers/staging/comedi/drivers/comedi_test.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/contec_pci_dio.c

@@ -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) {

+ 1 - 1
drivers/staging/comedi/drivers/daqboard2000.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/das08.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/das16.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/das16m1.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/das1800.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/das6402.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/das800.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/dmm32at.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/dt2801.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/dt2811.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/dt2814.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/dt2815.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/dt2817.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/dt282x.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/dt3000.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/dt9812.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/dyna_pci10xx.c

@@ -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);

+ 1 - 1
drivers/staging/comedi/drivers/fl512.c

@@ -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;
 
 	/*

+ 1 - 1
drivers/staging/comedi/drivers/gsc_hpdi.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/icp_multi.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/ii_pci20kc.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/jr3_pci.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/ke_counter.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/me4000.c

@@ -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;
 
     /*=========================================================================

+ 1 - 1
drivers/staging/comedi/drivers/me_daq.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/mpc624.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/mpc8260cpm.c

@@ -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++) {

+ 1 - 1
drivers/staging/comedi/drivers/multiq3.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/ni_6527.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/ni_65xx.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/ni_660x.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/ni_670x.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/ni_at_a2150.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/ni_at_ao.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/ni_atmio16d.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/ni_daq_700.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/ni_daq_dio24.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/ni_labpc.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/ni_mio_common.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/ni_pcidio.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/pcl711.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/pcl724.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/pcl725.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/pcl726.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/pcl730.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/pcl812.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/pcl816.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/pcl818.c

@@ -1778,7 +1778,7 @@ no_rtc:
 
 no_dma:
 
-	ret = alloc_subdevices(dev, 4);
+	ret = comedi_alloc_subdevices(dev, 4);
 	if (ret < 0)
 		return ret;
 

+ 1 - 1
drivers/staging/comedi/drivers/pcm3724.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/pcm3730.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/pcmad.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/pcmda12.c

@@ -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;
 	}

+ 1 - 1
drivers/staging/comedi/drivers/pcmmio.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/pcmuio.c

@@ -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;
 	}

+ 1 - 1
drivers/staging/comedi/drivers/poc.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/quatech_daqp_cs.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/rtd520.c

@@ -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;
 
 

+ 1 - 1
drivers/staging/comedi/drivers/rti800.c

@@ -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;
 

+ 1 - 1
drivers/staging/comedi/drivers/rti802.c

@@ -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;
 	}

+ 1 - 1
drivers/staging/comedi/drivers/s526.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/s626.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/serial2002.c

@@ -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 */

+ 1 - 1
drivers/staging/comedi/drivers/skel.c

@@ -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;

+ 1 - 1
drivers/staging/comedi/drivers/ssv_dnp.c

@@ -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;

Some files were not shown because too many files changed in this diff