[PATCH 06/11] staging: comedi: comedi_fc: cfc_write_array_to_buffer() data is const

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The `data` pointer of `cfc_write_array_to_buffer()` ought to point to
`const` data.

Signed-off-by: Ian Abbott <abbotti@xxxxxxxxx>
---
 drivers/staging/comedi/drivers/comedi_fc.c | 2 +-
 drivers/staging/comedi/drivers/comedi_fc.h | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/comedi/drivers/comedi_fc.c b/drivers/staging/comedi/drivers/comedi_fc.c
index ed0e79f..6f87220 100644
--- a/drivers/staging/comedi/drivers/comedi_fc.c
+++ b/drivers/staging/comedi/drivers/comedi_fc.c
@@ -24,7 +24,7 @@
 
 /* Writes an array of data points to comedi's buffer */
 unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *s,
-				       void *data, unsigned int num_bytes)
+				       const void *data, unsigned int num_bytes)
 {
 	struct comedi_async *async = s->async;
 	unsigned int retval;
diff --git a/drivers/staging/comedi/drivers/comedi_fc.h b/drivers/staging/comedi/drivers/comedi_fc.h
index c570c6eb..fa3de9e 100644
--- a/drivers/staging/comedi/drivers/comedi_fc.h
+++ b/drivers/staging/comedi/drivers/comedi_fc.h
@@ -35,8 +35,9 @@ static inline void cfc_inc_scan_progress(struct comedi_subdevice *s,
 }
 
 /* Writes an array of data points to comedi's buffer */
-unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *,
-				       void *data, unsigned int num_bytes);
+unsigned int cfc_write_array_to_buffer(struct comedi_subdevice *s,
+				       const void *data,
+				       unsigned int num_bytes);
 
 static inline unsigned int cfc_write_to_buffer(struct comedi_subdevice *s,
 					       unsigned short data)
-- 
2.1.0

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux