Merge branch 'for-5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[linux-2.6-microblaze.git] / include / linux / container.h
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Definitions for container bus type.
4  *
5  * Copyright (C) 2013, Intel Corporation
6  * Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
7  */
8
9 #include <linux/device.h>
10
11 /* drivers/base/power/container.c */
12 extern struct bus_type container_subsys;
13
14 struct container_dev {
15         struct device dev;
16         int (*offline)(struct container_dev *cdev);
17 };
18
19 static inline struct container_dev *to_container_dev(struct device *dev)
20 {
21         return container_of(dev, struct container_dev, dev);
22 }