diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2010-06-26 07:54:14 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-07-08 15:25:27 -0400 |
commit | c40ab87494522201a8478305204c3db8e051af73 (patch) | |
tree | 3e6dc1e3937fff499592de994e2a5d734f9d80a9 /drivers/staging/iio/adc | |
parent | 962a4ccb4ab76a297ef63e2c5de78cb56220d0f8 (diff) |
staging:iio:max1363 trivial code and comment cleanups.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/adc')
-rw-r--r-- | drivers/staging/iio/adc/max1363_core.c | 7 | ||||
-rw-r--r-- | drivers/staging/iio/adc/max1363_ring.c | 10 |
2 files changed, 8 insertions, 9 deletions
diff --git a/drivers/staging/iio/adc/max1363_core.c b/drivers/staging/iio/adc/max1363_core.c index 9b60b275de8..31d856375fa 100644 --- a/drivers/staging/iio/adc/max1363_core.c +++ b/drivers/staging/iio/adc/max1363_core.c | |||
@@ -23,16 +23,15 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/gpio.h> | ||
27 | #include <linux/workqueue.h> | 26 | #include <linux/workqueue.h> |
28 | #include <linux/device.h> | 27 | #include <linux/device.h> |
29 | #include <linux/kernel.h> | 28 | #include <linux/kernel.h> |
30 | #include <linux/sysfs.h> | 29 | #include <linux/sysfs.h> |
31 | #include <linux/list.h> | 30 | #include <linux/list.h> |
32 | #include <linux/i2c.h> | 31 | #include <linux/i2c.h> |
33 | #include <linux/rtc.h> | ||
34 | #include <linux/regulator/consumer.h> | 32 | #include <linux/regulator/consumer.h> |
35 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
34 | #include <linux/err.h> | ||
36 | 35 | ||
37 | #include "../iio.h" | 36 | #include "../iio.h" |
38 | #include "../sysfs.h" | 37 | #include "../sysfs.h" |
@@ -48,7 +47,7 @@ | |||
48 | IIO_SCAN_EL_C(in##number, number, IIO_UNSIGNED(16), 0, NULL); | 47 | IIO_SCAN_EL_C(in##number, number, IIO_UNSIGNED(16), 0, NULL); |
49 | #define MAX1363_SCAN_EL_D(p, n, number) \ | 48 | #define MAX1363_SCAN_EL_D(p, n, number) \ |
50 | IIO_SCAN_NAMED_EL_C(in##p##m##in##n, in##p-in##n, \ | 49 | IIO_SCAN_NAMED_EL_C(in##p##m##in##n, in##p-in##n, \ |
51 | number, IIO_SIGNED(16), 0 , NULL); | 50 | number, IIO_SIGNED(16), 0, NULL); |
52 | 51 | ||
53 | static MAX1363_SCAN_EL(0); | 52 | static MAX1363_SCAN_EL(0); |
54 | static MAX1363_SCAN_EL(1); | 53 | static MAX1363_SCAN_EL(1); |
@@ -167,7 +166,7 @@ static int max1363_write_basic_config(struct i2c_client *client, | |||
167 | unsigned char d2) | 166 | unsigned char d2) |
168 | { | 167 | { |
169 | int ret; | 168 | int ret; |
170 | u8 *tx_buf = kmalloc(2 , GFP_KERNEL); | 169 | u8 *tx_buf = kmalloc(2, GFP_KERNEL); |
171 | 170 | ||
172 | if (!tx_buf) | 171 | if (!tx_buf) |
173 | return -ENOMEM; | 172 | return -ENOMEM; |
diff --git a/drivers/staging/iio/adc/max1363_ring.c b/drivers/staging/iio/adc/max1363_ring.c index a49b3d7aae9..b30d680bafa 100644 --- a/drivers/staging/iio/adc/max1363_ring.c +++ b/drivers/staging/iio/adc/max1363_ring.c | |||
@@ -68,7 +68,7 @@ error_ret: | |||
68 | } | 68 | } |
69 | 69 | ||
70 | /** | 70 | /** |
71 | * max1363_ring_preenable() setup the parameters of the ring before enabling | 71 | * max1363_ring_preenable() - setup the parameters of the ring before enabling |
72 | * | 72 | * |
73 | * The complex nature of the setting of the nuber of bytes per datum is due | 73 | * The complex nature of the setting of the nuber of bytes per datum is due |
74 | * to this driver currently ensuring that the timestamp is stored at an 8 | 74 | * 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 | } | 106 | } |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * max1363_ring_postenable() typical ring post enable | 109 | * max1363_ring_postenable() - typical ring post enable |
110 | * | 110 | * |
111 | * Only not moved into the core for the hardware ring buffer cases | 111 | * Only not moved into the core for the hardware ring buffer cases |
112 | * that are more sophisticated. | 112 | * that are more sophisticated. |
@@ -120,7 +120,7 @@ static int max1363_ring_postenable(struct iio_dev *indio_dev) | |||
120 | } | 120 | } |
121 | 121 | ||
122 | /** | 122 | /** |
123 | * max1363_ring_predisable() runs just prior to ring buffer being disabled | 123 | * max1363_ring_predisable() - runs just prior to ring buffer being disabled |
124 | * | 124 | * |
125 | * Typical predisable function which ensures that no trigger events can | 125 | * Typical predisable function which ensures that no trigger events can |
126 | * occur before we disable the ring buffer (and hence would have no idea | 126 | * 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 | } | 136 | } |
137 | 137 | ||
138 | /** | 138 | /** |
139 | * max1363_poll_func_th() th of trigger launched polling to ring buffer | 139 | * max1363_poll_func_th() - th of trigger launched polling to ring buffer |
140 | * | 140 | * |
141 | * As sampling only occurs on i2c comms occuring, leave timestamping until | 141 | * As sampling only occurs on i2c comms occuring, leave timestamping until |
142 | * then. Some triggers will generate their own time stamp. Currently | 142 | * 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 | return; | 151 | return; |
152 | } | 152 | } |
153 | /** | 153 | /** |
154 | * max1363_poll_bh_to_ring() bh of trigger launched polling to ring buffer | 154 | * max1363_poll_bh_to_ring() - bh of trigger launched polling to ring buffer |
155 | * @work_s: the work struct through which this was scheduled | 155 | * @work_s: the work struct through which this was scheduled |
156 | * | 156 | * |
157 | * Currently there is no option in this driver to disable the saving of | 157 | * Currently there is no option in this driver to disable the saving of |