Skip to contentSkip to conversation

staging: iio: ad5933: header file maintenance

PATCH New Alison Schofield 1 participant 3 messages Mar 17, 2016

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

cover staging: iio: ad5933: header file maintenance

Collapse header file into source & clean up #includes in source.

Alison Schofield (2):
staging: iio: ad5933: move contents of header file to source file
staging: iio: ad5933: remove unused #includes

 drivers/staging/iio/impedance-analyzer/ad5933.c | 16 ++++++++++----
 drivers/staging/iio/impedance-analyzer/ad5933.h | 28 -------------------------
 2 files changed, 12 insertions(+), 32 deletions(-)
 delete mode 100644 drivers/staging/iio/impedance-analyzer/ad5933.h
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/2 staging: iio: ad5933: move contents of header file to source file

The contents of the header file are used only by this single source file. Move content into .c and remove .h.

---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 14 +++++++++++--
 drivers/staging/iio/impedance-analyzer/ad5933.h | 28 -------------------------
 2 files changed, 12 insertions(+), 30 deletions(-)
 delete mode 100644 drivers/staging/iio/impedance-analyzer/ad5933.h
drivers/staging/iio/impedance-analyzer/ad5933.c +12 -2
index d1218d8..a7d71d7 100644
@@ -24,8 +24,6 @@
 #include <linux/iio/buffer.h>
 #include <linux/iio/kfifo_buf.h>
 
-#include "ad5933.h"
-
 /* AD5933/AD5934 Registers */
 #define AD5933_REG_CONTROL_HB		0x80	/* R/W, 2 bytes */
 #define AD5933_REG_CONTROL_LB		0x81	/* R/W, 2 bytes */
@@ -86,6 +84,18 @@
 #define AD5933_POLL_TIME_ms		10
 #define AD5933_INIT_EXCITATION_TIME_ms	100
 
+/**
+ * struct ad5933_platform_data - platform specific data
+ * @ext_clk_Hz:		the external clock frequency in Hz, if not set
+ *			the driver uses the internal clock (16.776 MHz)
+ * @vref_mv:		the external reference voltage in millivolt
+ */
+
+struct ad5933_platform_data {
+	unsigned long			ext_clk_Hz;
+	unsigned short			vref_mv;
+};
+
 struct ad5933_state {
 	struct i2c_client		*client;
 	struct regulator		*reg;
drivers/staging/iio/impedance-analyzer/ad5933.h deleted +0 -28
deleted file mode 100644
index b140e42..0000000
@@ -1,28 +0,0 @@
-/*
- * AD5933 AD5934 Impedance Converter, Network Analyzer
- *
- * Copyright 2011 Analog Devices Inc.
- *
- * Licensed under the GPL-2.
- */
-
-#ifndef IIO_ADC_AD5933_H_
-#define IIO_ADC_AD5933_H_
-
-/*
- * TODO: struct ad5933_platform_data needs to go into include/linux/iio
- */
-
-/**
- * struct ad5933_platform_data - platform specific data
- * @ext_clk_Hz:		the external clock frequency in Hz, if not set
- *			the driver uses the internal clock (16.776 MHz)
- * @vref_mv:		the external reference voltage in millivolt
- */
-
-struct ad5933_platform_data {
-	unsigned long			ext_clk_Hz;
-	unsigned short			vref_mv;
-};
-
-#endif /* IIO_ADC_AD5933_H_ */
Signature · 1 line
2.1.4
#2 lore raw

PATCH 2/2 staging: iio: ad5933: remove unused #includes

In reply to Alison Schofield

Remove #includes no longer used in this module.

---
 drivers/staging/iio/impedance-analyzer/ad5933.c | 2 --
 1 file changed, 2 deletions(-)
drivers/staging/iio/impedance-analyzer/ad5933.c +0 -2
index a7d71d7..0576918 100644
@@ -12,12 +12,10 @@
 #include <linux/sysfs.h>
 #include <linux/i2c.h>
 #include <linux/regulator/consumer.h>
-#include <linux/slab.h>
 #include <linux/types.h>
 #include <linux/err.h>
 #include <linux/delay.h>
 #include <linux/module.h>
-#include <asm/div64.h>
 
 #include <linux/iio/iio.h>
 #include <linux/iio/sysfs.h>
Signature · 1 line
2.1.4