power: reset: reboot-mode: Make include file global
authorBjorn Andersson <bjorn.andersson@linaro.org>
Sat, 27 May 2017 06:51:29 +0000 (23:51 -0700)
committerSebastian Reichel <sebastian.reichel@collabora.co.uk>
Thu, 8 Jun 2017 16:18:19 +0000 (18:18 +0200)
Move the reboot-mode.h include file into include/linux to allow drivers
outside drivers/power/reset to implement reboot-mode.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
drivers/power/reset/reboot-mode.c
drivers/power/reset/reboot-mode.h [deleted file]
drivers/power/reset/syscon-reboot-mode.c
include/linux/reboot-mode.h [new file with mode: 0644]

index fb512183ace3ed818004e10f072a2d4ebc45a184..8f975ca0a8c44d5648245546fae00643fcca7740 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/module.h>
 #include <linux/of.h>
 #include <linux/reboot.h>
-#include "reboot-mode.h"
+#include <linux/reboot-mode.h>
 
 #define PREFIX "mode-"
 
diff --git a/drivers/power/reset/reboot-mode.h b/drivers/power/reset/reboot-mode.h
deleted file mode 100644 (file)
index 75f7fe5..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-#ifndef __REBOOT_MODE_H__
-#define __REBOOT_MODE_H__
-
-struct reboot_mode_driver {
-       struct device *dev;
-       struct list_head head;
-       int (*write)(struct reboot_mode_driver *reboot, unsigned int magic);
-       struct notifier_block reboot_notifier;
-};
-
-int reboot_mode_register(struct reboot_mode_driver *reboot);
-int reboot_mode_unregister(struct reboot_mode_driver *reboot);
-int devm_reboot_mode_register(struct device *dev,
-                             struct reboot_mode_driver *reboot);
-void devm_reboot_mode_unregister(struct device *dev,
-                                struct reboot_mode_driver *reboot);
-
-#endif
index c8c371b285b127457dc9228ee7de8b7f3921c9b4..563a97d7f73e41168355ce04d883071a0d9b6cd5 100644 (file)
@@ -15,7 +15,7 @@
 #include <linux/reboot.h>
 #include <linux/regmap.h>
 #include <linux/mfd/syscon.h>
-#include "reboot-mode.h"
+#include <linux/reboot-mode.h>
 
 struct syscon_reboot_mode {
        struct regmap *map;
diff --git a/include/linux/reboot-mode.h b/include/linux/reboot-mode.h
new file mode 100644 (file)
index 0000000..75f7fe5
--- /dev/null
@@ -0,0 +1,18 @@
+#ifndef __REBOOT_MODE_H__
+#define __REBOOT_MODE_H__
+
+struct reboot_mode_driver {
+       struct device *dev;
+       struct list_head head;
+       int (*write)(struct reboot_mode_driver *reboot, unsigned int magic);
+       struct notifier_block reboot_notifier;
+};
+
+int reboot_mode_register(struct reboot_mode_driver *reboot);
+int reboot_mode_unregister(struct reboot_mode_driver *reboot);
+int devm_reboot_mode_register(struct device *dev,
+                             struct reboot_mode_driver *reboot);
+void devm_reboot_mode_unregister(struct device *dev,
+                                struct reboot_mode_driver *reboot);
+
+#endif