1 /****************************************************************************
2 ****************************************************************************
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.
10 ****************************************************************************
11 ****************************************************************************/
12 #ifndef _TRANSPORT_CLASS_H_
13 #define _TRANSPORT_CLASS_H_
15 #include <linux/device.h>
16 #include <linux/attribute_container.h>
18 struct transport_container;
20 struct transport_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 *);
30 #define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) struct transport_class cls = { .class = { .name = nm, }, .setup = su, .remove = rm, .configure = cfg, }
32 struct anon_transport_class {
33 struct transport_class tclass;
34 struct attribute_container container;
37 #define DECLARE_ANON_TRANSPORT_CLASS(cls, mtch, cfg) struct anon_transport_class cls = { .tclass = { .configure = cfg, }, . container = { .match = mtch, }, }
39 #define class_to_transport_class(x) container_of(x, struct transport_class, class)
41 struct transport_container {
42 struct attribute_container ac;
43 struct attribute_group *statistics;
46 #define attribute_container_to_transport_container(x) container_of(x, struct transport_container, ac)