Thomas Gleixner | d2912cb | 2019-06-04 10:11:33 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Rafael J. Wysocki | caa73ea | 2013-12-29 15:25:48 +0100 | [diff] [blame] | 2 | /* |
| 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. Wysocki | caa73ea | 2013-12-29 15:25:48 +0100 | [diff] [blame] | 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 | } |