[PATCH 384/577] Staging: iio: accel: fix up some sparse warnings.

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

 



Minor stuff (static, NULL, etc.)

Cc: Jonathan Cameron <jic23@xxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/iio/accel/lis3l02dq_ring.c |    3 +--
 drivers/staging/iio/accel/sca3000_ring.c   |    8 ++++----
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/iio/accel/lis3l02dq_ring.c b/drivers/staging/iio/accel/lis3l02dq_ring.c
index 9214d84..78d8572 100644
--- a/drivers/staging/iio/accel/lis3l02dq_ring.c
+++ b/drivers/staging/iio/accel/lis3l02dq_ring.c
@@ -207,7 +207,7 @@ static const u8 read_all_tx_array[] = {
  * @rx_array:	(dma capable) recieve array, must be at least
  *		4*number of channels
  **/
-int lis3l02dq_read_all(struct lis3l02dq_state *st, u8 *rx_array)
+static int lis3l02dq_read_all(struct lis3l02dq_state *st, u8 *rx_array)
 {
 	struct spi_transfer *xfers;
 	struct spi_message msg;
@@ -588,7 +588,6 @@ void lis3l02dq_uninitialize_ring(struct iio_ring_buffer *ring)
 	iio_ring_buffer_unregister(ring);
 }
 
-
 int lis3l02dq_set_ring_length(struct iio_dev *indio_dev, int length)
 {
 	/* Set sensible defaults for the ring buffer */
diff --git a/drivers/staging/iio/accel/sca3000_ring.c b/drivers/staging/iio/accel/sca3000_ring.c
index 2b39e6f..8e8c068 100644
--- a/drivers/staging/iio/accel/sca3000_ring.c
+++ b/drivers/staging/iio/accel/sca3000_ring.c
@@ -186,9 +186,9 @@ static ssize_t sca3000_store_ring_bpse(struct device *dev,
 	return ret ? ret : len;
 }
 
-static IIO_SCAN_EL_C(accel_x, 0, 0, 0, 0);
-static IIO_SCAN_EL_C(accel_y, 1, 0, 0, 0);
-static IIO_SCAN_EL_C(accel_z, 2, 0, 0, 0);
+static IIO_SCAN_EL_C(accel_x, 0, 0, 0, NULL);
+static IIO_SCAN_EL_C(accel_y, 1, 0, 0, NULL);
+static IIO_SCAN_EL_C(accel_z, 2, 0, 0, NULL);
 static IIO_CONST_ATTR(accel_precision_available, "8 11");
 static IIO_DEVICE_ATTR(accel_precision,
 		       S_IRUGO | S_IWUSR,
@@ -244,7 +244,7 @@ static struct iio_ring_buffer *sca3000_rb_allocate(struct iio_dev *indio_dev)
 
 	ring = kzalloc(sizeof *ring, GFP_KERNEL);
 	if (!ring)
-		return 0;
+		return NULL;
 	ring->private = indio_dev;
 	buf = &ring->buf;
 	iio_ring_buffer_init(buf, indio_dev);
-- 
1.7.0.3

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/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