* [PATCH] iio: Fix iio_buffer_register stub signature
@ 2012-11-13 11:48 Lars-Peter Clausen
0 siblings, 0 replies; only message in thread
From: Lars-Peter Clausen @ 2012-11-13 11:48 UTC (permalink / raw)
To: Jonathan Cameron; +Cc: linux-iio, Lars-Peter Clausen
Match the iio_buffer_register stub signature up to the real function and make
the second parameter const. This fixes a the following warnings if
CONFIG_IIO_BUFFER is disabled:
drivers/staging/iio/accel/adis16201_core.c: In function ‘adis16201_probe’:
drivers/staging/iio/accel/adis16201_core.c:536: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
drivers/staging/iio/accel/adis16203_core.c: In function ‘adis16203_probe’:
drivers/staging/iio/accel/adis16203_core.c:468: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
drivers/staging/iio/accel/adis16204_core.c: In function ‘adis16204_probe’:
drivers/staging/iio/accel/adis16204_core.c:527: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
drivers/staging/iio/accel/adis16209_core.c: In function ‘adis16209_probe’:
drivers/staging/iio/accel/adis16209_core.c:542: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
drivers/staging/iio/accel/adis16240_core.c: In function ‘adis16240_probe’:
drivers/staging/iio/accel/adis16240_core.c:588: warning: passing argument 2 of ‘iio_buffer_register’ discards qualifiers from pointer target type
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
---
include/linux/iio/buffer.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/linux/iio/buffer.h b/include/linux/iio/buffer.h
index 0270405..f3eea18 100644
--- a/include/linux/iio/buffer.h
+++ b/include/linux/iio/buffer.h
@@ -195,7 +195,7 @@ bool iio_validate_scan_mask_onehot(struct iio_dev *indio_dev,
#else /* CONFIG_IIO_BUFFER */
static inline int iio_buffer_register(struct iio_dev *indio_dev,
- struct iio_chan_spec *channels,
+ const struct iio_chan_spec *channels,
int num_channels)
{
return 0;
--
1.8.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-11-13 11:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-13 11:48 [PATCH] iio: Fix iio_buffer_register stub signature Lars-Peter Clausen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).