container.h 668 B

12345678910111213141516171819202122232425
  1. /*
  2. * Definitions for container bus type.
  3. *
  4. * Copyright (C) 2013, Intel Corporation
  5. * Author: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
  6. *
  7. * This program is free software; you can redistribute it and/or modify
  8. * it under the terms of the GNU General Public License version 2 as
  9. * published by the Free Software Foundation.
  10. */
  11. #include <linux/device.h>
  12. /* drivers/base/power/container.c */
  13. extern struct bus_type container_subsys;
  14. struct container_dev {
  15. struct device dev;
  16. int (*offline)(struct container_dev *cdev);
  17. };
  18. static inline struct container_dev *to_container_dev(struct device *dev)
  19. {
  20. return container_of(dev, struct container_dev, dev);
  21. }