summaryrefslogtreecommitdiffstats
path: root/include/linux/container.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/container.h')
-rw-r--r--include/linux/container.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/linux/container.h b/include/linux/container.h
new file mode 100644
index 000000000..2566a1baa
--- /dev/null
+++ b/include/linux/container.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+/*
+ * Definitions for container bus type.
+ *
+ * Copyright (C) 2013, Intel Corporation
+ * Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
+ */
+
+#ifndef _LINUX_CONTAINER_H
+#define _LINUX_CONTAINER_H
+
+#include <linux/device.h>
+
+/* drivers/base/power/container.c */
+extern struct bus_type container_subsys;
+
+struct container_dev {
+ struct device dev;
+ int (*offline)(struct container_dev *cdev);
+};
+
+static inline struct container_dev *to_container_dev(struct device *dev)
+{
+ return container_of(dev, struct container_dev, dev);
+}
+
+#endif /* _LINUX_CONTAINER_H */