Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1402957

[PATCH v2 01/14] staging: comedi: daqboard2000: remove commented out code

From Ian Abbott <abbotti@mev.co.uk>
Newsgroups linux.kernel
Subject [PATCH v2 01/14] staging: comedi: daqboard2000: remove commented out code
Date 2016-05-18 14:50 +0200
Message-ID <rA95g-2dr-23@gated-at.bofh.it> (permalink)
References <rzJXb-2UD-3@gated-at.bofh.it> <rA8Vz-2a6-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Remove some commented out code.  Some of it uses constructs that don't
exist in the driver, and probably come from the source code for the MS
Windows driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
---
v2: added comments to offset and gain values that should be read from
EEPROM, as suggested by Hartley.
---
 drivers/staging/comedi/drivers/daqboard2000.c | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/comedi/drivers/daqboard2000.c b/drivers/staging/comedi/drivers/daqboard2000.c
index 57ab668..63d68fd 100644
--- a/drivers/staging/comedi/drivers/daqboard2000.c
+++ b/drivers/staging/comedi/drivers/daqboard2000.c
@@ -278,9 +278,7 @@ struct daqboard2000_private {
 
 static void writeAcqScanListEntry(struct comedi_device *dev, u16 entry)
 {
-	/* udelay(4); */
 	writew(entry & 0x00ff, dev->mmio + acqScanListFIFO);
-	/* udelay(4); */
 	writew((entry >> 8) & 0x00ff, dev->mmio + acqScanListFIFO);
 }
 
@@ -315,13 +313,9 @@ static void setup_sampling(struct comedi_device *dev, int chan, int gain)
 		word3 = 0;
 		break;
 	}
-/*
-  dev->eeprom.correctionDACSE[i][j][k].offset = 0x800;
-  dev->eeprom.correctionDACSE[i][j][k].gain = 0xc00;
-*/
 	/* These should be read from EEPROM */
-	word2 |= 0x0800;
-	word3 |= 0xc000;
+	word2 |= 0x0800;	/* offset */
+	word3 |= 0xc000;	/* gain */
 	writeAcqScanListEntry(dev, word0);
 	writeAcqScanListEntry(dev, word1);
 	writeAcqScanListEntry(dev, word2);
-- 
2.8.1

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 00/14] staging: comedi: daqboard2000: checkpatch clean-ups Ian Abbott <abbotti@mev.co.uk> - 2016-05-17 12:00 +0200
  [PATCH 07/14] staging: comedi: daqboard2000: rename acquisition control register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-17 12:00 +0200
  [PATCH 14/14] staging: comedi: daqboard2000: prefer usleep_range() Ian Abbott <abbotti@mev.co.uk> - 2016-05-17 12:00 +0200
    RE: [PATCH 14/14] staging: comedi: daqboard2000: prefer  usleep_range() Hartley Sweeten <HartleyS@visionengravers.com> - 2016-05-17 19:50 +0200
      Re: [PATCH 14/14] staging: comedi: daqboard2000: prefer  usleep_range() Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 12:30 +0200
  RE: [PATCH 00/14] staging: comedi: daqboard2000: checkpatch clean-ups Hartley Sweeten <HartleyS@visionengravers.com> - 2016-05-17 20:10 +0200
    Re: [PATCH 00/14] staging: comedi: daqboard2000: checkpatch clean-ups Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:10 +0200
  [PATCH v2 10/14] staging: comedi: daqboard2000: redo DAC status macros and fix busy Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
  [PATCH v2 06/14] staging: comedi: daqboard2000: rename register offset macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
    RE: [PATCH v2 06/14] staging: comedi: daqboard2000: rename register  offset macros Hartley Sweeten <HartleyS@visionengravers.com> - 2016-05-19 00:50 +0200
    [PATCH v3 06/14] staging: comedi: daqboard2000: rename register offset macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 12:00 +0200
      RE: [PATCH v3 06/14] staging: comedi: daqboard2000: rename register  offset macros Hartley Sweeten <HartleyS@visionengravers.com> - 2016-05-19 18:50 +0200
        Re: [PATCH v3 06/14] staging: comedi: daqboard2000: rename register  offset macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 19:50 +0200
  [PATCH v2 11/14] staging: comedi: daqboard2000: rename trigger control register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
  [PATCH v2 08/14] staging: comedi: daqboard2000: rename acq status register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
  [PATCH v2 07/14] staging: comedi: daqboard2000: rename acquisition control register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
  [PATCH v2 09/14] staging: comedi: daqboard2000: redo DAC control register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
  [PATCH v2 04/14] staging: comedi: daqboard2000: add blank line after struct declaration Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
  [PATCH v2 12/14] staging: comedi: daqboard2000: rename reference DACs register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
    RE: [PATCH v2 12/14] staging: comedi: daqboard2000: rename reference  DACs register macros Hartley Sweeten <HartleyS@visionengravers.com> - 2016-05-19 01:00 +0200
    [PATCH v3 12/14] staging: comedi: daqboard2000: rename reference DACs register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 12:00 +0200
      Re: [PATCH v3 12/14] staging: comedi: daqboard2000: rename reference  DACs register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 12:10 +0200
      [PATCH v4 12/14] staging: comedi: daqboard2000: rename reference DACs register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 12:20 +0200
  [PATCH v2 02/14] staging: comedi: daqboard2000: use usual block comment style Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
  [PATCH v2 14/14] staging: comedi: daqboard2000: prefer usleep_range() Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
  [PATCH v2 13/14] staging: comedi: daqboard2000: rename CamelCase functions Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:40 +0200
  [PATCH v2 05/14] staging: comedi: daqboard2000: rename serial EEPROM register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:50 +0200
  [PATCH v2 03/14] staging: comedi: daqboard2000: CHECK: spaces preferred around that '*' Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:50 +0200
  [PATCH v2 00/14] staging: comedi: daqboard2000: checkpatch clean-ups Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:50 +0200
    [PATCH v2 01/14] staging: comedi: daqboard2000: remove commented out code Ian Abbott <abbotti@mev.co.uk> - 2016-05-18 14:50 +0200
    Re: [PATCH v2 00/14] staging: comedi: daqboard2000: checkpatch  clean-ups Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 12:10 +0200
      Re: [PATCH v2 00/14] staging: comedi: daqboard2000: checkpatch  clean-ups Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 12:20 +0200
        Re: [PATCH v2 00/14] staging: comedi: daqboard2000: checkpatch  clean-ups Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:10 +0200
  [PATCH v4 00/14] staging: comedi: daqboard2000: checkpatch clean-ups Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 11/14] staging: comedi: daqboard2000: rename trigger control register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 03/14] staging: comedi: daqboard2000: CHECK: spaces preferred around that '*' Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 04/14] staging: comedi: daqboard2000: add blank line after struct declaration Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 01/14] staging: comedi: daqboard2000: remove commented out code Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 07/14] staging: comedi: daqboard2000: rename acquisition control register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 08/14] staging: comedi: daqboard2000: rename acq status register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 10/14] staging: comedi: daqboard2000: redo DAC status macros and fix busy Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 14/14] staging: comedi: daqboard2000: prefer usleep_range() Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 06/14] staging: comedi: daqboard2000: rename register offset macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 12/14] staging: comedi: daqboard2000: rename reference DACs register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 13/14] staging: comedi: daqboard2000: rename CamelCase functions Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 09/14] staging: comedi: daqboard2000: redo DAC control register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 02/14] staging: comedi: daqboard2000: use usual block comment style Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200
    [PATCH v4 05/14] staging: comedi: daqboard2000: rename serial EEPROM register macros Ian Abbott <abbotti@mev.co.uk> - 2016-05-19 20:20 +0200

csiph-web