Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
ccwgroup.h
Go to the documentation of this file.
1 #ifndef S390_CCWGROUP_H
2 #define S390_CCWGROUP_H
3 
4 struct ccw_device;
5 struct ccw_driver;
6 
15  enum {
18  } state;
19 /* private: */
21  struct mutex reg_mutex;
22 /* public: */
23  unsigned int count;
24  struct device dev;
25  struct ccw_device *cdev[0];
26 };
27 
43  int (*setup) (struct ccwgroup_device *);
44  void (*remove) (struct ccwgroup_device *);
48  int (*prepare) (struct ccwgroup_device *);
49  void (*complete) (struct ccwgroup_device *);
50  int (*freeze)(struct ccwgroup_device *);
51  int (*thaw) (struct ccwgroup_device *);
52  int (*restore)(struct ccwgroup_device *);
53 
55 };
56 
57 extern int ccwgroup_driver_register (struct ccwgroup_driver *cdriver);
58 extern void ccwgroup_driver_unregister (struct ccwgroup_driver *cdriver);
59 int ccwgroup_create_dev(struct device *root, struct ccwgroup_driver *gdrv,
60  int num_devices, const char *buf);
61 
62 extern int ccwgroup_probe_ccwdev(struct ccw_device *cdev);
63 extern void ccwgroup_remove_ccwdev(struct ccw_device *cdev);
64 
65 #define to_ccwgroupdev(x) container_of((x), struct ccwgroup_device, dev)
66 #define to_ccwgroupdrv(x) container_of((x), struct ccwgroup_driver, driver)
67 #endif