container.h 610 B

123456789101112131415161718192021222324252627
  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 <[email protected]>
  7. */
  8. #ifndef _LINUX_CONTAINER_H
  9. #define _LINUX_CONTAINER_H
  10. #include <linux/device.h>
  11. /* drivers/base/power/container.c */
  12. extern struct bus_type container_subsys;
  13. struct container_dev {
  14. struct device dev;
  15. int (*offline)(struct container_dev *cdev);
  16. };
  17. static inline struct container_dev *to_container_dev(struct device *dev)
  18. {
  19. return container_of(dev, struct container_dev, dev);
  20. }
  21. #endif /* _LINUX_CONTAINER_H */