Skip to contentSkip to conversation

staging: comedi: remove the "Allocate the subdevice..." comments

PATCH In review H Hartley Sweeten 1 participant 1 message Jun 12, 2012 Staging

lore
Share & tools
lore
#0 lore raw

PATCH 6/8 staging: comedi: remove the "Allocate the subdevice..." comments

Quoted 1 line

From 8d64162758d994937590c97f8f1e926af3e349f1 Mon Sep 17 00:00:00 2001

From: H Hartley Sweeten <[email protected]>
Date: Tue, 12 Jun 2012 10:46:36 -0700
Subject: [PATCH 6/8] staging: comedi: remove the "Allocate the subdevice..."
comments

These comments are redundant. The function name 'comedi_alloc_subdevices' provides this information.

Cc Ian Abbott <[email protected]>
Cc Frank Mori Hess <[email protected]>
Cc Greg Kroah-Hartman <[email protected]>
---
 .../staging/comedi/drivers/addi-data/addi_common.c |    1 -
 .../comedi/drivers/addi-data/hwdrv_APCI1710.c      |    1 -
 drivers/staging/comedi/drivers/adq12b.c            |    4 ----
 drivers/staging/comedi/drivers/amplc_pci224.c      |    1 -
 drivers/staging/comedi/drivers/amplc_pci230.c      |    5 +----
 drivers/staging/comedi/drivers/c6xdigio.c          |    1 -
 drivers/staging/comedi/drivers/cb_pcidas.c         |    3 ---
 drivers/staging/comedi/drivers/cb_pcidda.c         |    3 ---
 drivers/staging/comedi/drivers/cb_pcidio.c         |    4 ----
 drivers/staging/comedi/drivers/cb_pcimdas.c        |    4 ----
 drivers/staging/comedi/drivers/cb_pcimdda.c        |    4 ----
 drivers/staging/comedi/drivers/comedi_bond.c       |    4 ----
 drivers/staging/comedi/drivers/dmm32at.c           |    4 ----
 drivers/staging/comedi/drivers/dt9812.c            |    1 -
 drivers/staging/comedi/drivers/ke_counter.c        |    1 -
 drivers/staging/comedi/drivers/me4000.c            |    5 -----
 drivers/staging/comedi/drivers/mpc624.c            |    1 -
 drivers/staging/comedi/drivers/pcmda12.c           |    7 -------
 drivers/staging/comedi/drivers/pcmmio.c            |    7 +------
 drivers/staging/comedi/drivers/pcmuio.c            |    8 +-------
 drivers/staging/comedi/drivers/rtd520.c            |    4 ----
 drivers/staging/comedi/drivers/s526.c              |    4 ----
 drivers/staging/comedi/drivers/skel.c              |    4 ----
 drivers/staging/comedi/drivers/ssv_dnp.c           |    3 ---
 drivers/staging/comedi/drivers/usbdux.c            |    1 -
 drivers/staging/comedi/drivers/usbduxfast.c        |    1 -
 drivers/staging/comedi/drivers/usbduxsigma.c       |    1 -
 27 files changed, 3 insertions(+), 84 deletions(-)
drivers/staging/comedi/drivers/addi-data/addi_common.c +0 -1
index 274990a..46c590b 100644
@@ -1686,7 +1686,6 @@ static int i_ADDI_Attach(struct comedi_device *dev, struct comedi_devconfig *it)
 		devpriv->s_BoardInfos.ui_Address = io_addr[2];
 #endif
 	} else {
-		/* Update-0.7.57->0.7.68dev->n_subdevices = 7; */
 		n_subdevices = 7;
 		ret = comedi_alloc_subdevices(dev, n_subdevices);
 		if (ret < 0)
drivers/staging/comedi/drivers/addi-data/hwdrv_APCI1710.c +0 -1
index 9632ca1..aa390b0 100644
@@ -62,7 +62,6 @@ void i_ADDI_AttachPCI1710(struct comedi_device *dev)
 	int ret = 0;
 	int n_subdevices = 9;
 
-	/* Update-0.7.57->0.7.68dev->n_subdevices = 9; */
 	ret = comedi_alloc_subdevices(dev, n_subdevices);
 	if (ret < 0)
 		return;
drivers/staging/comedi/drivers/adq12b.c +0 -4
index ca8892e..afc6815 100644
@@ -267,10 +267,6 @@ static int adq12b_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	devpriv->last_channel = -1;
 	devpriv->last_range = -1;
 
-/*
- * Allocate the subdevice structures.  alloc_subdevice() is a
- * convenient macro defined in comedidev.h.
- */
 	if (comedi_alloc_subdevices(dev, 3) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/amplc_pci224.c +0 -1
index 7dd4057..d6e0d01 100644
@@ -1382,7 +1382,6 @@ static int pci224_attach_common(struct comedi_device *dev,
 	outw(devpriv->daccon | PCI224_DACCON_FIFORESET,
 	     dev->iobase + PCI224_DACCON);
 
-	/* Allocate subdevices.  There is only one!  */
 	ret = comedi_alloc_subdevices(dev, 1);
 	if (ret < 0)
 		return ret;
drivers/staging/comedi/drivers/amplc_pci230.c +1 -4
index 03c83e4..c9d8d5b 100644
@@ -2840,10 +2840,7 @@ static int pci230_attach_common(struct comedi_device *dev,
 		dev_dbg(dev->class_dev, "registered irq %u\n",
 			devpriv->pci_dev->irq);
 	}
-	/*
-	 * Allocate the subdevice structures.  alloc_subdevice() is a
-	 * convenient macro defined in comedidev.h.
-	 */
+
 	if (comedi_alloc_subdevices(dev, 3) < 0)
 		return -ENOMEM;
 	s = dev->subdevices + 0;
drivers/staging/comedi/drivers/c6xdigio.c +0 -1
index 72b000f..5fa344b 100644
@@ -433,7 +433,6 @@ static int c6xdigio_attach(struct comedi_device *dev,
 	dev->iobase = iobase;
 	dev->board_name = "c6xdigio";
 
-	/* 3 subdevices with encoder_init write */
 	result = comedi_alloc_subdevices(dev, 2);
 	if (result < 0)
 		return result;
drivers/staging/comedi/drivers/cb_pcidas.c +0 -3
index 435f3aa..e1bd99a 100644
@@ -614,9 +614,6 @@ found:
 	/* Initialize dev->board_name */
 	dev->board_name = thisboard->name;
 
-/*
- * Allocate the subdevice structures.
- */
 	if (comedi_alloc_subdevices(dev, 7) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/cb_pcidda.c +0 -3
index 4ab3584..fedaf55 100644
@@ -333,9 +333,6 @@ found:
  */
 	dev->board_name = thisboard->name;
 
-/*
- * Allocate the subdevice structures.
- */
 	if (comedi_alloc_subdevices(dev, 3) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/cb_pcidio.c +0 -4
index 56c1d09..f2fff4f 100644
@@ -177,10 +177,6 @@ found:
 	    pci_resource_start(devpriv->pci_dev,
 			       pcidio_boards[index].dioregs_badrindex);
 
-/*
- * Allocate the subdevice structures.  alloc_subdevice() is a
- * convenient macro defined in comedidev.h.
- */
 	if (comedi_alloc_subdevices(dev, thisboard->n_8255) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/cb_pcimdas.c +0 -4
index 6acb319..0ada8b9 100644
@@ -269,10 +269,6 @@ found:
 	/* Initialize dev->board_name */
 	dev->board_name = thisboard->name;
 
-/*
- * Allocate the subdevice structures.  alloc_subdevice() is a
- * convenient macro defined in comedidev.h.
- */
 	if (comedi_alloc_subdevices(dev, 3) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/cb_pcimdda.c +0 -4
index abb6008..b401aec 100644
@@ -236,10 +236,6 @@ static int attach(struct comedi_device *dev, struct comedi_devconfig *it)
  */
 	dev->board_name = thisboard->name;
 
-/*
- * Allocate the subdevice structures.  alloc_subdevice() is a
- * convenient macro defined in comedidev.h.
- */
 	if (comedi_alloc_subdevices(dev, 2) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/comedi_bond.c +0 -4
index d56eec4..96e5b35 100644
@@ -358,10 +358,6 @@ static int bonding_attach(struct comedi_device *dev,
 	 */
 	dev->board_name = devpriv->name;
 
-	/*
-	 * Allocate the subdevice structures.  alloc_subdevice() is a
-	 * convenient macro defined in comedidev.h.
-	 */
 	if (comedi_alloc_subdevices(dev, 1) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/dmm32at.c +0 -4
index 40d7bef..6b637a2 100644
@@ -371,10 +371,6 @@ static int dmm32at_attach(struct comedi_device *dev,
 	if (alloc_private(dev, sizeof(struct dmm32at_private)) < 0)
 		return -ENOMEM;
 
-/*
- * Allocate the subdevice structures.  alloc_subdevice() is a
- * convenient macro defined in comedidev.h.
- */
 	if (comedi_alloc_subdevices(dev, 3) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/dt9812.c +0 -1
index 56af2f2..678fa50 100644
@@ -1035,7 +1035,6 @@ static int dt9812_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 
 	devpriv->serial = it->options[0];
 
-	/* Allocate subdevices */
 	if (comedi_alloc_subdevices(dev, 4) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/ke_counter.c +0 -1
index bcb1eb4..7c256f4 100644
@@ -189,7 +189,6 @@ found:
 	io_base = pci_resource_start(pci_device, 0);
 	dev->iobase = io_base;
 
-	/* allocate the subdevice structures */
 	error = comedi_alloc_subdevices(dev, 1);
 	if (error < 0)
 		return error;
drivers/staging/comedi/drivers/me4000.c +0 -5
index 8d011cb..2ca8d8b 100644
@@ -2190,11 +2190,6 @@ static int me4000_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	if (result)
 		return result;
 
-	/*
-	 * Allocate the subdevice structures.  alloc_subdevice() is a
-	 * convenient macro defined in comedidev.h.  It relies on
-	 * n_subdevices being set correctly.
-	 */
 	if (comedi_alloc_subdevices(dev, 4) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/mpc624.c +0 -1
index 48ba6b9..9750336 100644
@@ -348,7 +348,6 @@ static int mpc624_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 		devpriv->ulConvertionRate = MPC624_SPEED_3_52_kHz;
 	}
 
-	/*  Subdevices structures */
 	if (comedi_alloc_subdevices(dev, 1) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/pcmda12.c +0 -7
index e1b30cc..87faa03 100644
@@ -190,13 +190,6 @@ static int pcmda12_attach(struct comedi_device *dev,
 
 	devpriv->simultaneous_xfer_mode = it->options[1];
 
-	/*
-	 * Allocate the subdevice structures.  alloc_subdevice() is a
-	 * convenient macro defined in comedidev.h.
-	 *
-	 * Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
-	 * 96-channel version of the board.
-	 */
 	if (comedi_alloc_subdevices(dev, 1) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/pcmmio.c +1 -6
index abaf6c7..3105303 100644
@@ -1071,12 +1071,7 @@ static int pcmmio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 				dev->minor);
 		return -ENOMEM;
 	}
-	/*
-	 * Allocate the subdevice structures.  alloc_subdevice() is a
-	 * convenient macro defined in comedidev.h.
-	 *
-	 * Allocate 1 AI + 1 AO + 2 DIO subdevs (24 lines per DIO)
-	 */
+
 	if (comedi_alloc_subdevices(dev, n_subdevs) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/pcmuio.c +1 -7
index e4153bd..33ab4c6 100644
@@ -800,13 +800,7 @@ static int pcmuio_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 		dev_warn(dev->hw_dev, "cannot allocate subdevice private data structures\n");
 		return -ENOMEM;
 	}
-	/*
-	 * Allocate the subdevice structures.  alloc_subdevice() is a
-	 * convenient macro defined in comedidev.h.
-	 *
-	 * Allocate 2 subdevs (32 + 16 DIO lines) or 3 32 DIO subdevs for the
-	 * 96-channel version of the board.
-	 */
+
 	if (comedi_alloc_subdevices(dev, n_subdevs) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/rtd520.c +0 -4
index 7d248a7..445333b 100644
@@ -1999,10 +1999,6 @@ static int rtd_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	/* Show board configuration */
 	printk(KERN_INFO "%s:", dev->board_name);
 
-	/*
-	 * Allocate the subdevice structures.  alloc_subdevice() is a
-	 * convenient macro defined in comedidev.h.
-	 */
 	if (comedi_alloc_subdevices(dev, 4) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/s526.c +0 -4
index dbbff70..6a30537 100644
@@ -774,10 +774,6 @@ static int s526_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	if (alloc_private(dev, sizeof(struct s526_private)) < 0)
 		return -ENOMEM;
 
-/*
- * Allocate the subdevice structures.  alloc_subdevice() is a
- * convenient macro defined in comedidev.h.
- */
 	if (comedi_alloc_subdevices(dev, 4) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/skel.c +0 -4
index 16947c8..ca10b1a 100644
@@ -233,10 +233,6 @@ static int skel_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	if (alloc_private(dev, sizeof(struct skel_private)) < 0)
 		return -ENOMEM;
 
-/*
- * Allocate the subdevice structures.  alloc_subdevice() is a
- * convenient macro defined in comedidev.h.
- */
 	if (comedi_alloc_subdevices(dev, 3) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/ssv_dnp.c +0 -3
index 5eaef84..130e4bd 100644
@@ -197,9 +197,6 @@ static int dnp_attach(struct comedi_device *dev, struct comedi_devconfig *it)
 	if (alloc_private(dev, sizeof(struct dnp_private_data)) < 0)
 		return -ENOMEM;
 
-	/* Allocate the subdevice structures. alloc_subdevice() is a         */
-	/* convenient macro defined in comedidev.h.                          */
-
 	if (comedi_alloc_subdevices(dev, 1) < 0)
 		return -ENOMEM;
 
drivers/staging/comedi/drivers/usbdux.c +0 -1
index 79df200..a6cf134 100644
@@ -2645,7 +2645,6 @@ static int usbdux_attach_common(struct comedi_device *dev,
 		n_subdevs = 4;
 	}
 
-	/* allocate space for the subdevices */
 	ret = comedi_alloc_subdevices(dev, n_subdevs);
 	if (ret < 0) {
 		up(&udev->sem);
drivers/staging/comedi/drivers/usbduxfast.c +0 -1
index 660dd4e..f7d4f56 100644
@@ -1666,7 +1666,6 @@ static int usbduxfast_attach(struct comedi_device *dev,
 
 	dev->board_name = BOARDNAME;
 
-	/* allocate space for the subdevices */
 	ret = comedi_alloc_subdevices(dev, 1);
 	if (ret < 0) {
 		up(&(usbduxfastsub[index].sem));
drivers/staging/comedi/drivers/usbduxsigma.c +0 -1
index f37e96c..f23fad9 100644
@@ -2690,7 +2690,6 @@ static int usbduxsigma_attach(struct comedi_device *dev,
 		n_subdevs = 3;
 	}
 
-	/* allocate space for the subdevices */
 	ret = comedi_alloc_subdevices(dev, n_subdevs);
 	if (ret < 0) {
 		up(&udev->sem);
Signature · 1 line
1.7.7