Skip to contentSkip to conversation

staging: ad7746: Moved contents of the header to the source file.

PATCH In review Arushi Singhal 2 participants 2 messages Mar 23, 2017

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 staging: ad7746: Moved contents of the header to the source file.

Moved the contents of the header(ad7746.h) into the source file ad7746.c with the exception of the platform data struct which is supposed to be used from somewhere else other than the driver.

---
 drivers/staging/iio/cdc/ad7746.c | 5 +++++
 drivers/staging/iio/cdc/ad7746.h | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/iio/cdc/ad7746.c +5 -0
index 2d8397b11b19..033a41fd9bee 100644
@@ -21,6 +21,11 @@
 
 #include "ad7746.h"
 
+#define AD7466_EXCLVL_0         0 /* +-VDD/8 */
+#define AD7466_EXCLVL_1         1 /* +-VDD/4 */
+#define AD7466_EXCLVL_2         2 /* +-VDD * 3/8 */
+#define AD7466_EXCLVL_3         3 /* +-VDD/2 */
+
 /*
  * AD7746 Register Definition
  */
drivers/staging/iio/cdc/ad7746.h +0 -5
index ea8572d1df02..2fbcee88fda6 100644
@@ -13,11 +13,6 @@
  * TODO: struct ad7746_platform_data needs to go into include/linux/iio
  */
 
-#define AD7466_EXCLVL_0		0 /* +-VDD/8 */
-#define AD7466_EXCLVL_1		1 /* +-VDD/4 */
-#define AD7466_EXCLVL_2		2 /* +-VDD * 3/8 */
-#define AD7466_EXCLVL_3		3 /* +-VDD/2 */
-
 struct ad7746_platform_data {
 	unsigned char exclvl;	/*Excitation Voltage Level */
 	bool exca_en;		/* enables EXCA pin as the excitation output */
Signature · 1 line
2.11.0
#1 lore raw
Quoted 31 lines · Arushi Singhal

Moved the contents of the header(ad7746.h) into the source file ad7746.c with the exception of the platform data struct which is supposed to be used from somewhere else other than the driver.

---
 drivers/staging/iio/cdc/ad7746.c | 5 +++++
 drivers/staging/iio/cdc/ad7746.h | 5 -----
 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/iio/cdc/ad7746.c +5 -0
index 2d8397b11b19..033a41fd9bee 100644
@@ -21,6 +21,11 @@
 
 #include "ad7746.h"
 
+#define AD7466_EXCLVL_0         0 /* +-VDD/8 */
+#define AD7466_EXCLVL_1         1 /* +-VDD/4 */
+#define AD7466_EXCLVL_2         2 /* +-VDD * 3/8 */
+#define AD7466_EXCLVL_3         3 /* +-VDD/2 */
+
 /*
  * AD7746 Register Definition
  */
drivers/staging/iio/cdc/ad7746.h +0 -0
index ea8572d1df02..2fbcee88fda6 100644

drivers/staging/iio/cdc/ad7746.h line 20

Quoted 8 lines
drivers/staging/iio/cdc/ad7746.h +0 -5
@@ -13,11 +13,6 @@
  * TODO: struct ad7746_platform_data needs to go into include/linux/iio
  */
 
-#define AD7466_EXCLVL_0		0 /* +-VDD/8 */
-#define AD7466_EXCLVL_1		1 /* +-VDD/4 */
-#define AD7466_EXCLVL_2		2 /* +-VDD * 3/8 */
-#define AD7466_EXCLVL_3		3 /* +-VDD/2 */
-

I believe those are settings for the exclvl field in the platform data struct. Hence this has to stay here.

Quoted 4 lines
drivers/staging/iio/cdc/ad7746.h +0 -0
 struct ad7746_platform_data {
 	unsigned char exclvl;	/*Excitation Voltage Level */
 	bool exca_en;		/* enables EXCA pin as the excitation output */