2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 15:43:59 +08:00
linux-next/drivers/staging/iio
Haneen Mohammed 418880f570 Staging: iio: use the BIT macro in adc
This patch replaces bit shifting on:
0,1,2, and 3 with the BIT(x) macro.
Issue addressed by checkpatcg.pl.
This was done with the help of Coccinelle:

@r1@
identifier x;
constant int g;
@@

(
0<<\(x\|g\)
|
1<<\(x\|g\)
|
2<<\(x\|g\)
|
3<<\(x\|g\)
)

@script:python b@
g2 <<r1.g;
y;
@@
coccinelle.y = int(g2) + 1

@c@
constant int r1.g;
identifier b.y;
@@
(
-(1 << g)
+BIT(g)
|
-(0 << g)
+ 0
|
-(2 << g)
+BIT(y)
|
-(3 << g)
+(BIT(y)| BIT(g))
)

Signed-off-by: Haneen Mohammed <hamohammed.sa@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26 10:36:59 +01:00
..
accel Staging: iio: Add braces on all arms of if statement 2015-03-26 10:36:27 +01:00
adc Staging: iio: use the BIT macro in adc 2015-03-26 10:36:59 +01:00
addac staging: iio: addac: annotate Kconfig entries with module name information 2014-10-20 10:29:08 +08:00
cdc staging: iio: cdc: Don't put an else right after a return 2014-09-19 17:49:39 -07:00
Documentation iio: Move iio userspace applications out of staging 2015-03-09 17:16:08 +00:00
frequency Staging: iio: Use braces on all arms of if statement 2015-03-16 16:14:05 +01:00
gyro Staging: iio: gyro: Added description for config symbol. 2014-10-20 10:29:08 +08:00
impedance-analyzer staging: iio: ad5933: fix format string warnings 2015-01-25 22:55:34 +00:00
light Staging: iio: Remove parentheses around right side an assignment 2015-03-16 16:10:08 +01:00
magnetometer First set of new drivers, cleanups and functionality for IIO in the 4.1 cycle. 2015-03-24 22:53:52 +01:00
meter First set of new drivers, cleanups and functionality for IIO in the 4.1 cycle. 2015-03-24 22:53:52 +01:00
resolver First set of new drivers, cleanups and functionality for IIO in the 4.1 cycle. 2015-03-24 22:53:52 +01:00
trigger First set of new drivers, cleanups and functionality for IIO in the 4.1 cycle. 2015-03-24 22:53:52 +01:00
iio_dummy_evgen.c iio: dummy: Add virtual registers for dummy device 2014-11-22 11:05:44 +00:00
iio_dummy_evgen.h iio: dummy: Add virtual registers for dummy device 2014-11-22 11:05:44 +00:00
iio_simple_dummy_buffer.c iio: kfifo: Remove unused argument in iio_kfifo_allocate 2014-12-26 11:20:38 +00:00
iio_simple_dummy_events.c iio: core: Remove IIO_EV_TYPE_INSTANCE 2015-01-27 18:49:55 +00:00
iio_simple_dummy.c staging: Remove <linux/moduleparam.h> header. 2015-03-01 17:09:52 -08:00
iio_simple_dummy.h staging: iio: dummy: fix compile error when not using buffering 2015-01-01 12:20:52 +00:00
Kconfig kconfig: use bool instead of boolean for type definition attributes 2015-01-07 13:08:04 +01:00
Makefile
ring_hw.h staging: iio: Add #include guards to header files 2014-09-28 22:19:04 -04:00
TODO Staging/iio: add TODO reminder 2013-10-01 16:19:17 +01:00