Module Name:    src
Committed By:   riastradh
Date:           Fri Jan 14 21:32:27 UTC 2022

Modified Files:
        src/sys/dev/i2c: ihidev.h

Log Message:
ihidev(4): Add missing includes and header guard.

Mark the sections that are conventionally separate files for hardware
interface (*reg.h) versus software state (*var.h).


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/ihidev.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/i2c/ihidev.h
diff -u src/sys/dev/i2c/ihidev.h:1.4 src/sys/dev/i2c/ihidev.h:1.5
--- src/sys/dev/i2c/ihidev.h:1.4	Thu Jan  9 04:04:01 2020
+++ src/sys/dev/i2c/ihidev.h	Fri Jan 14 21:32:27 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: ihidev.h,v 1.4 2020/01/09 04:04:01 thorpej Exp $ */
+/* $NetBSD: ihidev.h,v 1.5 2022/01/14 21:32:27 riastradh Exp $ */
 /* $OpenBSD ihidev.h,v 1.4 2016/01/31 18:24:35 jcs Exp $ */
 
 /*-
@@ -30,6 +30,11 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifndef	_DEV_I2C_IHIDEV_H_
+#define	_DEV_I2C_IHIDEV_H_
+
+/* ihidevreg.h */
+
 /*
  * HID-over-i2c driver
  *
@@ -48,6 +53,8 @@
  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  */
 
+#include <sys/types.h>
+
 /* from usbdi.h: Match codes. */
 /* First five codes is for a whole device. */
 #define IMATCH_VENDOR_PRODUCT_REV			14
@@ -93,6 +100,15 @@ struct i2c_hid_desc {
 	uint32_t reserved;
 } __packed;
 
+/* ihidevvar.h */
+
+#include <sys/types.h>
+
+#include <sys/device.h>
+#include <sys/mutex.h>
+
+#include <dev/i2c/i2cvar.h>
+
 struct ihidev_softc {
 	device_t	sc_dev;
 	i2c_tag_t	sc_tag;
@@ -160,3 +176,4 @@ int ihidev_set_report(device_t, int, int
 int ihidev_get_report(device_t, int, int, void *, int);
 int ihidev_report_type_conv(int);
 
+#endif	/* _DEV_I2C_IHIDEV_H_ */

Reply via email to