1 /****************************************************************************
2  ****************************************************************************
3  ***
4  ***   This header was automatically generated from a Linux kernel header
5  ***   of the same name, to make information necessary for userspace to
6  ***   call into the kernel available to libc.  It contains only constants,
7  ***   structures, and macros generated from the original header, and thus,
8  ***   contains no copyrightable information.
9  ***
10  ****************************************************************************
11  ****************************************************************************/
12 #ifndef _TRANSPORT_CLASS_H_
13 #define _TRANSPORT_CLASS_H_
14 
15 #include <linux/device.h>
16 #include <linux/attribute_container.h>
17 
18 struct transport_container;
19 
20 struct transport_class {
21  struct class class;
22  int (*setup)(struct transport_container *, struct device *,
23  struct class_device *);
24  int (*configure)(struct transport_container *, struct device *,
25  struct class_device *);
26  int (*remove)(struct transport_container *, struct device *,
27  struct class_device *);
28 };
29 
30 #define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg)  struct transport_class cls = {   .class = {   .name = nm,   },   .setup = su,   .remove = rm,   .configure = cfg,  }
31 
32 struct anon_transport_class {
33  struct transport_class tclass;
34  struct attribute_container container;
35 };
36 
37 #define DECLARE_ANON_TRANSPORT_CLASS(cls, mtch, cfg)  struct anon_transport_class cls = {   .tclass = {   .configure = cfg,   },   . container = {   .match = mtch,   },  }
38 
39 #define class_to_transport_class(x)   container_of(x, struct transport_class, class)
40 
41 struct transport_container {
42  struct attribute_container ac;
43  struct attribute_group *statistics;
44 };
45 
46 #define attribute_container_to_transport_container(x)   container_of(x, struct transport_container, ac)
47 
48 #endif
49