staging: iio: adc: remove unused definitions
Subsystems (4)
PATCH 1/1 staging: iio: adc: remove unused definitions
Remove definitions since there are not used at all
--- drivers/staging/iio/adc/ad7192.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/staging/iio/adc/ad7192.c +0 -6
@@ -118,12 +118,6 @@/* GPOCON Register Bit Designations (AD7192_REG_GPOCON) */ #define AD7192_GPOCON_BPDSW BIT(6)/* Bridge power-down switch enable */ -#define AD7192_GPOCON_GP32EN BIT(5)/* Digital Output P3 and P2 enable */ -#define AD7192_GPOCON_GP10EN BIT(4)/* Digital Output P1 and P0 enable */ -#define AD7192_GPOCON_P3DAT BIT(3)/* P3 state */ -#define AD7192_GPOCON_P2DAT BIT(2)/* P2 state */ -#define AD7192_GPOCON_P1DAT BIT(1)/* P1 state */ -#define AD7192_GPOCON_P0DAT BIT(0)/* P0 state */ #define AD7192_INT_FREQ_MHz 4915200
Signature · 1 line
2.1.4
Quoted 6 lines · On Wednesday 07 October 2015 21:46:02 Ioana Ciornei wrote:
drivers/staging/iio/adc/ad7192.c +0
-0@@ -118,12 +118,6 @@
drivers/staging/iio/adc/ad7192.c line 122
Quoted 10 lines
drivers/staging/iio/adc/ad7192.c +0
-6/* GPOCON Register Bit Designations (AD7192_REG_GPOCON) */ #define AD7192_GPOCON_BPDSW BIT(6)/* Bridge power-down switch enable */ -#define AD7192_GPOCON_GP32EN BIT(5)/* Digital Output P3 and P2 enable */ -#define AD7192_GPOCON_GP10EN BIT(4)/* Digital Output P1 and P0 enable */ -#define AD7192_GPOCON_P3DAT BIT(3)/* P3 state */ -#define AD7192_GPOCON_P2DAT BIT(2)/* P2 state */ -#define AD7192_GPOCON_P1DAT BIT(1)/* P1 state */ -#define AD7192_GPOCON_P0DAT BIT(0)/* P0 state */ #define AD7192_INT_FREQ_MHz 4915200
I'd say it makes sense to leave these ones present, because it documents the hardware registers.
Any unused code or definitions that are purely for the code's own sake should be removed normally, but in this case the bit 6 is clearly used in the code, so it's good to know what the other bits are.
Arnd
Quoted 17 lines · Arnd Bergmann
Quoted 15 lines · On Wednesday 07 October 2015 21:46:02 Ioana Ciornei wrote:
drivers/staging/iio/adc/ad7192.c +0
-6@@ -118,12 +118,6 @@/* GPOCON Register Bit Designations (AD7192_REG_GPOCON) */ #define AD7192_GPOCON_BPDSW BIT(6)/* Bridge power-down switch enable */ -#define AD7192_GPOCON_GP32EN BIT(5)/* Digital Output P3 and P2 enable */ -#define AD7192_GPOCON_GP10EN BIT(4)/* Digital Output P1 and P0 enable */ -#define AD7192_GPOCON_P3DAT BIT(3)/* P3 state */ -#define AD7192_GPOCON_P2DAT BIT(2)/* P2 state */ -#define AD7192_GPOCON_P1DAT BIT(1)/* P1 state */ -#define AD7192_GPOCON_P0DAT BIT(0)/* P0 state */
Quoted 8 lines
drivers/staging/iio/adc/ad7192.c line 122
Quoted 1 line
drivers/staging/iio/adc/ad7192.c +0
-0#define AD7192_INT_FREQ_MHz 4915200I'd say it makes sense to leave these ones present, because it documents the hardware registers.
Any unused code or definitions that are purely for the code's own sake should be removed normally, but in this case the bit 6 is clearly used in the code, so it's good to know what the other bits are.
I also had doubts about this one.
Thanks for the feedback,
Ioana