From 5c520aafa0cb234a9124569f742e82d04ab5006b Mon Sep 17 00:00:00 2001 From: Ian Abbott Date: Mon, 15 Sep 2014 13:46:02 +0100 Subject: [PATCH] staging: comedi: comedi_fc: cfc_write_array_to_buffer() data is const The `data` pointer of `cfc_write_array_to_buffer()` ought to point to `const` data. Signed-off-by: Ian Abbott Reviewed-by: H Hartley Sweeten Signed-off-by: Greg Kroah-Hartman --- 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 ed0e79f5bfaa..6f872207ec3a 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 c570c6eb6b9b..fa3de9e87325 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.39.5