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 *** To edit the content of this header, modify the corresponding 11 *** source file (e.g. under external/kernel-headers/original/) then 12 *** run bionic/libc/kernel/tools/update_all.py 13 *** 14 *** Any manual change here will be lost the next time this script will 15 *** be run. You've been warned! 16 *** 17 **************************************************************************** 18 ****************************************************************************/ 19 #ifndef _TRANSPORT_CLASS_H_ 20 #define _TRANSPORT_CLASS_H_ 21 #include <linux/device.h> 22 #include <linux/attribute_container.h> 23 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 24 struct transport_container; 25 struct transport_class { 26 struct class class; 27 int (*setup)(struct transport_container *, struct device *, 28 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 29 struct class_device *); 30 int (*configure)(struct transport_container *, struct device *, 31 struct class_device *); 32 int (*remove)(struct transport_container *, struct device *, 33 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 34 struct class_device *); 35 }; 36 #define DECLARE_TRANSPORT_CLASS(cls, nm, su, rm, cfg) struct transport_class cls = { .class = { .name = nm, }, .setup = su, .remove = rm, .configure = cfg, } 37 struct anon_transport_class { 38 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 39 struct transport_class tclass; 40 struct attribute_container container; 41 }; 42 #define DECLARE_ANON_TRANSPORT_CLASS(cls, mtch, cfg) struct anon_transport_class cls = { .tclass = { .configure = cfg, }, . container = { .match = mtch, }, } 43 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 44 #define class_to_transport_class(x) container_of(x, struct transport_class, class) 45 struct transport_container { 46 struct attribute_container ac; 47 struct attribute_group *statistics; 48 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */ 49 }; 50 #define attribute_container_to_transport_container(x) container_of(x, struct transport_container, ac) 51 #endif 52