All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: iio: ad5933: move contents of header file to source file
@ 2017-02-27  6:12 Gargi Sharma
  2017-02-27  9:22 ` Lars-Peter Clausen
  0 siblings, 1 reply; 2+ messages in thread
From: Gargi Sharma @ 2017-02-27  6:12 UTC (permalink / raw)
  To: outreachy-kernel
  Cc: gregkh, lars, Michael.Hennerich, jic23, pmeerw, knaack.h,
	linux-iio, Gargi Sharma

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

Signed-off-by: Gargi Sharma <gs051095@gmail.com>
---
 drivers/staging/iio/trigger/iio-trig-bfin-timer.c | 20 ++++++++++++++++++-
 drivers/staging/iio/trigger/iio-trig-bfin-timer.h | 24 -----------------------
 2 files changed, 19 insertions(+), 25 deletions(-)
 delete mode 100644 drivers/staging/iio/trigger/iio-trig-bfin-timer.h

diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
index 4e0b4ee..8077b9d 100644
--- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
+++ b/drivers/staging/iio/trigger/iio-trig-bfin-timer.c
@@ -19,7 +19,25 @@
 #include <linux/iio/iio.h>
 #include <linux/iio/trigger.h>
 
-#include "iio-trig-bfin-timer.h"
+/**
+ * struct iio_bfin_timer_trigger_pdata - timer trigger platform data
+ * @output_enable: Enable external trigger pulse generation.
+ * @active_low: Whether the trigger pulse is active low.
+ * @duty_ns: Length of the trigger pulse in nanoseconds.
+ *
+ * This struct is used to configure the output pulse generation of the blackfin
+ * timer trigger. If output_enable is set to true an external trigger signal
+ * will generated on the pin corresponding to the timer. This is useful for
+ * converters which needs an external signal to start conversion. active_low and
+ * duty_ns are used to configure the type of the trigger pulse. If output_enable
+ * is set to false no external trigger pulse will be generated and active_low
+ * and duty_ns are ignored.
+ **/
+struct iio_bfin_timer_trigger_pdata {
+	bool output_enable;
+	bool active_low;
+	unsigned int duty_ns;
+};
 
 struct bfin_timer {
 	unsigned short id, bit;
diff --git a/drivers/staging/iio/trigger/iio-trig-bfin-timer.h b/drivers/staging/iio/trigger/iio-trig-bfin-timer.h
deleted file mode 100644
index c07321f..0000000
--- a/drivers/staging/iio/trigger/iio-trig-bfin-timer.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#ifndef __IIO_BFIN_TIMER_TRIGGER_H__
-#define __IIO_BFIN_TIMER_TRIGGER_H__
-
-/**
- * struct iio_bfin_timer_trigger_pdata - timer trigger platform data
- * @output_enable: Enable external trigger pulse generation.
- * @active_low: Whether the trigger pulse is active low.
- * @duty_ns: Length of the trigger pulse in nanoseconds.
- *
- * This struct is used to configure the output pulse generation of the blackfin
- * timer trigger. If output_enable is set to true an external trigger signal
- * will generated on the pin corresponding to the timer. This is useful for
- * converters which needs an external signal to start conversion. active_low and
- * duty_ns are used to configure the type of the trigger pulse. If output_enable
- * is set to false no external trigger pulse will be generated and active_low
- * and duty_ns are ignored.
- **/
-struct iio_bfin_timer_trigger_pdata {
-	bool output_enable;
-	bool active_low;
-	unsigned int duty_ns;
-};
-
-#endif
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] staging: iio: ad5933: move contents of header file to source file
  2017-02-27  6:12 [PATCH] staging: iio: ad5933: move contents of header file to source file Gargi Sharma
@ 2017-02-27  9:22 ` Lars-Peter Clausen
  0 siblings, 0 replies; 2+ messages in thread
From: Lars-Peter Clausen @ 2017-02-27  9:22 UTC (permalink / raw)
  To: Gargi Sharma, outreachy-kernel
  Cc: gregkh, Michael.Hennerich, jic23, pmeerw, knaack.h, linux-iio

On 02/27/2017 07:12 AM, Gargi Sharma wrote:
> The contents of the header file are used only by this single
> source file.  Move content into .c and remove .h.
> 
> Signed-off-by: Gargi Sharma <gs051095@gmail.com>

Hi,

The subject of the patch doesn't quite match th content. Anyway the platform
data should stay in the header file since it is supposed to be used outside
of the driver.



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-02-27  9:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-27  6:12 [PATCH] staging: iio: ad5933: move contents of header file to source file Gargi Sharma
2017-02-27  9:22 ` Lars-Peter Clausen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.