Commit c40ab874 authored by Jonathan Cameron's avatar Jonathan Cameron Committed by Greg Kroah-Hartman

staging:iio:max1363 trivial code and comment cleanups.

Signed-off-by: default avatarJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 962a4ccb
...@@ -23,16 +23,15 @@ ...@@ -23,16 +23,15 @@
*/ */
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/gpio.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/sysfs.h> #include <linux/sysfs.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/i2c.h> #include <linux/i2c.h>
#include <linux/rtc.h>
#include <linux/regulator/consumer.h> #include <linux/regulator/consumer.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/err.h>
#include "../iio.h" #include "../iio.h"
#include "../sysfs.h" #include "../sysfs.h"
...@@ -48,7 +47,7 @@ ...@@ -48,7 +47,7 @@
IIO_SCAN_EL_C(in##number, number, IIO_UNSIGNED(16), 0, NULL); IIO_SCAN_EL_C(in##number, number, IIO_UNSIGNED(16), 0, NULL);
#define MAX1363_SCAN_EL_D(p, n, number) \ #define MAX1363_SCAN_EL_D(p, n, number) \
IIO_SCAN_NAMED_EL_C(in##p##m##in##n, in##p-in##n, \ IIO_SCAN_NAMED_EL_C(in##p##m##in##n, in##p-in##n, \
number, IIO_SIGNED(16), 0 , NULL); number, IIO_SIGNED(16), 0, NULL);
static MAX1363_SCAN_EL(0); static MAX1363_SCAN_EL(0);
static MAX1363_SCAN_EL(1); static MAX1363_SCAN_EL(1);
...@@ -167,7 +166,7 @@ static int max1363_write_basic_config(struct i2c_client *client, ...@@ -167,7 +166,7 @@ static int max1363_write_basic_config(struct i2c_client *client,
unsigned char d2) unsigned char d2)
{ {
int ret; int ret;
u8 *tx_buf = kmalloc(2 , GFP_KERNEL); u8 *tx_buf = kmalloc(2, GFP_KERNEL);
if (!tx_buf) if (!tx_buf)
return -ENOMEM; return -ENOMEM;
......
...@@ -68,7 +68,7 @@ int max1363_single_channel_from_ring(long mask, struct max1363_state *st) ...@@ -68,7 +68,7 @@ int max1363_single_channel_from_ring(long mask, struct max1363_state *st)
} }
/** /**
* max1363_ring_preenable() setup the parameters of the ring before enabling * max1363_ring_preenable() - setup the parameters of the ring before enabling
* *
* The complex nature of the setting of the nuber of bytes per datum is due * The complex nature of the setting of the nuber of bytes per datum is due
* to this driver currently ensuring that the timestamp is stored at an 8 * to this driver currently ensuring that the timestamp is stored at an 8
...@@ -106,7 +106,7 @@ static int max1363_ring_preenable(struct iio_dev *indio_dev) ...@@ -106,7 +106,7 @@ static int max1363_ring_preenable(struct iio_dev *indio_dev)
} }
/** /**
* max1363_ring_postenable() typical ring post enable * max1363_ring_postenable() - typical ring post enable
* *
* Only not moved into the core for the hardware ring buffer cases * Only not moved into the core for the hardware ring buffer cases
* that are more sophisticated. * that are more sophisticated.
...@@ -120,7 +120,7 @@ static int max1363_ring_postenable(struct iio_dev *indio_dev) ...@@ -120,7 +120,7 @@ static int max1363_ring_postenable(struct iio_dev *indio_dev)
} }
/** /**
* max1363_ring_predisable() runs just prior to ring buffer being disabled * max1363_ring_predisable() - runs just prior to ring buffer being disabled
* *
* Typical predisable function which ensures that no trigger events can * Typical predisable function which ensures that no trigger events can
* occur before we disable the ring buffer (and hence would have no idea * occur before we disable the ring buffer (and hence would have no idea
...@@ -136,7 +136,7 @@ static int max1363_ring_predisable(struct iio_dev *indio_dev) ...@@ -136,7 +136,7 @@ static int max1363_ring_predisable(struct iio_dev *indio_dev)
} }
/** /**
* max1363_poll_func_th() th of trigger launched polling to ring buffer * max1363_poll_func_th() - th of trigger launched polling to ring buffer
* *
* As sampling only occurs on i2c comms occuring, leave timestamping until * As sampling only occurs on i2c comms occuring, leave timestamping until
* then. Some triggers will generate their own time stamp. Currently * then. Some triggers will generate their own time stamp. Currently
...@@ -151,7 +151,7 @@ static void max1363_poll_func_th(struct iio_dev *indio_dev) ...@@ -151,7 +151,7 @@ static void max1363_poll_func_th(struct iio_dev *indio_dev)
return; return;
} }
/** /**
* max1363_poll_bh_to_ring() bh of trigger launched polling to ring buffer * max1363_poll_bh_to_ring() - bh of trigger launched polling to ring buffer
* @work_s: the work struct through which this was scheduled * @work_s: the work struct through which this was scheduled
* *
* Currently there is no option in this driver to disable the saving of * Currently there is no option in this driver to disable the saving of
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment