blob: 0cc2ee91905cc05180ad2a1ec37cd89ae7dede6f [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
9#include <linux/device.h>
10
11/* drivers/base/power/container.c */
12extern struct bus_type container_subsys;
13
14struct container_dev {
15 struct device dev;
16 int (*offline)(struct container_dev *cdev);
17};
18
19static inline struct container_dev *to_container_dev(struct device *dev)
20{
21 return container_of(dev, struct container_dev, dev);
22}