Преглед изворни кода

sandbox: i2c: Move priv into a header file

Move this struct into a header file so that dtoc can include it in its
dt-platdata.c file.

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass пре 3 година
родитељ
комит
f05a7c5ba4
2 измењених фајлова са 15 додато и 4 уклоњено
  1. 14 0
      arch/sandbox/include/asm/i2c.h
  2. 1 4
      drivers/i2c/sandbox_i2c.c

+ 14 - 0
arch/sandbox/include/asm/i2c.h

@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2020 Google LLC
+ * Written by Simon Glass <sjg@chromium.org>
+ */
+
+#ifndef __asn_i2c_h
+#define __asn_i2c_h
+
+struct sandbox_i2c_priv {
+	bool test_mode;
+};
+
+#endif /* __asn_i2c_h */

+ 1 - 4
drivers/i2c/sandbox_i2c.c

@@ -10,15 +10,12 @@
 #include <errno.h>
 #include <i2c.h>
 #include <log.h>
+#include <asm/i2c.h>
 #include <asm/test.h>
 #include <dm/acpi.h>
 #include <dm/lists.h>
 #include <dm/device-internal.h>
 
-struct sandbox_i2c_priv {
-	bool test_mode;
-};
-
 static int get_emul(struct udevice *dev, struct udevice **devp,
 		    struct dm_i2c_ops **opsp)
 {