Remove spurious floating point code that shouldn't be there
authorDavid Schleef <ds@schleef.org>
Sat, 1 Dec 2001 05:11:02 +0000 (05:11 +0000)
committerDavid Schleef <ds@schleef.org>
Sat, 1 Dec 2001 05:11:02 +0000 (05:11 +0000)
comedi/drivers/ni_at_a2150.c
comedi/drivers/rtd520.c

index 9a28a2ad4299a927a9657ca0a51efc3ece30326e..d3f9b0ac51c95639e7f5bfb95b9a20a5022b89b7 100644 (file)
@@ -695,8 +695,9 @@ static int a2150_ai_cmd(comedi_device *dev, comedi_subdevice *s)
        clear_dma_ff(devpriv->dma);
        set_dma_addr(devpriv->dma, virt_to_bus(devpriv->dma_buffer));
        // set size of transfer to fill in 1/3 second
+#define ONE_THIRD_SECOND 333333333
        devpriv->dma_transfer_size = sizeof(devpriv->dma_buffer[0]) * cmd->chanlist_len *
-               (1000000000.0 / 3.0 ) / cmd->scan_begin_arg;
+               ONE_THIRD_SECOND / cmd->scan_begin_arg;
        if(devpriv->dma_transfer_size > A2150_DMA_BUFFER_SIZE)
                devpriv->dma_transfer_size = A2150_DMA_BUFFER_SIZE;
        if(devpriv->dma_transfer_size < sizeof(devpriv->dma_buffer[0]))
index b5b18d0c5d2cbd0a7745485f75c4e51cc00d35e6..81967cc4f53225dcb4478ca11081808f5e9fbc77 100644 (file)
@@ -1491,7 +1491,7 @@ static int rtd_ai_cancel (
 static int rtd_ns_to_timer_base (
     unsigned int *nanosec,             /* desired period (in ns) */
     int round_mode,
-    double base)                       /* clock period (in ns) */
+    int base)                  /* clock period (in ns) */
 {
     int divider;