blob: 2566a1baa736a27127530e58be0f045b48084af3 [file] [log] [blame]
Thomas Gleixnerd2912cb2019-06-04 10:11:33 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Rafael J. Wysockicaa73ea2013-12-29 15:25:48 +01002/*
3 * Definitions for container bus type.
4 *
5 * Copyright (C) 2013, Intel Corporation
6 * Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Rafael J. Wysockicaa73ea2013-12-29 15:25:48 +01007 */
8
Masahiro Yamada1d5a0132019-08-19 16:16:06 +09009#ifndef _LINUX_CONTAINER_H
10#define _LINUX_CONTAINER_H
11
Rafael J. Wysockicaa73ea2013-12-29 15:25:48 +010012#include <linux/device.h>
13
14/* drivers/base/power/container.c */
15extern struct bus_type container_subsys;
16
17struct container_dev {
18 struct device dev;
19 int (*offline)(struct container_dev *cdev);
20};
21
22static inline struct container_dev *to_container_dev(struct device *dev)
23{
24 return container_of(dev, struct container_dev, dev);
25}
Masahiro Yamada1d5a0132019-08-19 16:16:06 +090026
27#endif /* _LINUX_CONTAINER_H */